Tutorials/NewKey
From LinutopWiki
Contents |
Build a new key from your Linutop
WARNING: never install a new system on the key you've used to boot. This will badly break the system.
To create a new key using an image provided on the Internet, you will need a second USB key. Upgrading the one on which your Linutop system is running is not a good idea, because it will create conflicts during the installation, and leave your system in an unusable state.
- Plug in a second USB key (minimum 1G)
WARNING: do not mount the USB key, this implies that you should not browse its content with Thunar (which would mount it to do so)
- Download the installation script and save it on the Desktop:
- Open a terminal (Applications -> System -> Terminal)
- In the terminal, type the following command and press the <enter> key:
# for Linutop 1: sh Desktop/newkey.sh # for Linutop 2: sh Desktop/newkey-l2.sh
- Answer "yes" to the question asked (if you agree)
- Wait a little
Your new USB key is ready!
Note that the server on which the images are stored is managed by the Linutop team, and the installation program will check the validity of the downloaded and installed files according to data generated during the image build process. In other words, the script will tell you if the image you've installed is a non-corrupt and valid copy of the one we provide.
Hints
- Make sure to have only one USB stick plugged in (in addition of the one on which you booted)
- If the process fails (due to an Internet connection shutdown for instance), re-run:
sudo ./lusm-web http://images.linutop.eu/current # for Linutop 1 sudo ./lusm-web http://images.linutop.eu/current2 # for Linutop 2
This will continue the installation where it's been stopped.
- You might want to clear the MBR of the USB stick before calling the lusm script by doing (assuming that you have booted from your main USB stick on your Linutop):
dd if=/dev/zero of=/dev/sdb bs=512 count=1
Build a new key from a Linux system
Debian based system
- Download the lusm-web script
- Make it executable:
chmod a+x path/to/lusm-web
- Plug the USB key
- Run
sudo ./lusm-web -d /dev/<your_device> http://images.linutop.eu/current # for linutop1 sudo ./lusm-web -d /dev/<your_device> http://images.linutop.eu/current2 # for linutop2
Other Linux systems
The script needs to be modified a bit. The following lines have to be removed:
unset PKGTOINSTALL for pkg in mtools syslinux parted; do dpkg -l $pkg | grep ^ii >/dev/null 2>&1 || PKGTOINSTALL="$PKGTOINSTALL $pkg" done [ -z "$PKGTOINSTALL" ] || apt-get install -y --force-yes $PKGTOINSTALL
Make sure to have parted, syslinux and mtools installed.
Duplicate the key on the internal disk (Linutop 2)
Boot on the USB key you've just created and run in a terminal:
sudo lusm -d /dev/hda
You can also use the Linutop Backup tool in the "System" menu, you only need to choose /dev/hda/ as target and click on apply. This will flash the internal USB disk with the system of the USB key you are running.

