(HOW-To) Install System Rescue CD On An USB-Stick
(HOW-To) Install System Rescue CD On An USB-Stick
org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick
Contents
1 Introduction
2 Installation from Linux
2.1 step-01: Find the device name
2.2 step-02: Reinitialization of the stick
2.3 step-03: Copy files from the CDRom
2.3.1 New instructions to copy the files
2.3.2 Old instructions to copy the files
2.4 step-04: Make the disk bootable
3 Installation from Windows
3.1 step-01: Find the device letter
3.2 step-02: Format the USB-stick as FAT
3.3 step-03: Copy files from the CDRom
3.4 step-04: Make the disk bootable
4 Installation from SystemRescueCd-1.1.4 (or newer)
4.1 Overview
4.2 Example of installation
5 Installation from Linux using an ext3 filesystem
6 Booting from the USB stick
7 USB keys models known to work
Introduction
This chapter explains how to install SystemRescueCd on an USB-stick. It allows to use this system from an USB stick (mini hard disk) instead of using a CDRom. First, you
need SystemResuceCd 0.2.18 or newer, and an USB stick with enough space. If you use the official version, you need at least 512 MB. Of course, you need a computer that
supports USB, with almost a free USB socket. You BIOS must be able to boot on USB hard disks, and it must be defined before other devices in the boot devices order.
You also need a recent version syslinux (3.35 or newer) to be installed on your system. If you are doing the installation from Windows, you can just find syslinux.exe in a
zipfile on the cdrom. If you are doing the installation from linux, you can either install syslinux on your system, or just install from the cdrom edition of SystemRescueCd.
If you install SystemRescueCd on an USB stick, you may also be interested in making a backing store (http://www.sysresccd.org/news/2008/06/29/creating-a-backing-store-
to-keep-your-modifications-in-sysresccd/) to keep your changes between reboots.
Installation from Linux is recommended since several programs such as cfdisk may be required in some situations, and these tools are not available on Windows. If you have
no Linux installed on your computer, just can just install SystemRescueCd on an USB from the system you get when you boot the CDRom version of SystemRescueCd.
You need the device of the USB stick. In most cases, Linux detects this device as an SCSI hard disk. In other words, it is detected as /dev/sda1 (first partition of first SCSI
device), or /dev/sdb1 if you have another SCSI device. Since kernel 2.6.8 USB sticks may be seen as /dev/uba, /dev/ubb, ...
Here is how you can know the device name. First, start your computer under Linux with the USB stick unplugged. Then, load all USB modules (you may need to load other
USB modules first). This command should not be required if the USB storage support is build-in the kernel. If modprobe can't find this module, it might be normal.
modprobe usb-storage
Now, you have to plug your USB stick, and have a look at the kernel messages. You may find the device name.
dmesg | tail -n 50
usb 2-6: new high speed USB device using ehci_hcd and address 7
usb 2-6: configuration #1 chosen from 1 choice
scsi5 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
scsi 5:0:0:0: Direct-Access Kingston DataTraveler U3 6.50 PQ: 0 ANSI: 0 CCS
sd 5:0:0:0: [sdf] 1961695 512-byte hardware sectors (1004 MB)
sd 5:0:0:0: [sdf] Write Protect is off
sd 5:0:0:0: [sdf] Mode Sense: 45 00 00 08
sd 5:0:0:0: [sdf] Assuming drive cache: write through
sd 5:0:0:0: [sdf] 1961695 512-byte hardware sectors (1004 MB)
sd 5:0:0:0: [sdf] Write Protect is off
sd 5:0:0:0: [sdf] Mode Sense: 45 00 00 08
sd 5:0:0:0: [sdf] Assuming drive cache: write through
sdf: sdf1
sd 5:0:0:0: [sdf] Attached SCSI removable disk
sd 5:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
mkdir /mnt/usbstick
mount -t vfat /dev/sdf1 /mnt/usbstick
If there is no space enough left on the device (about 230 MB), you will have to erase the current files (all data will be lost):
rm -rf /mnt/usbstick/*
In the next sections we will assume your stick is /dev/sdf. It's really important that you use the right device name.
The following instructions may not be required, it depends on how your USB stick is configured. So you can try to skip it the first time. Anyway in case of problem to get the
USB stick to boot, you should really try that. Check you have a backup of the data that are on your stick before you do this. Thanks to jadjay in the forums
(http://www.sysresccd.org/forums/viewtopic.php?t=2340) for this addition to the instructions. We assume your device is /dev/sdf but you have to replace it with the device
name of your own USB stick. Be really sure this is the right device !
First, run cfdisk to check that the partition has the right ID in the partition table of your USB stick. Select type LBA FAT32 may be 0B or 0C, to make it bootable.
cfdisk /dev/sdf
Use mkfs.vfat to format the partition. All data will be erased, to make sure you don't need the data which are on it.
The dd command will overwrite the first 404 bytes of the MBR (http://en.wikipedia.org/wiki/Master_boot_record) of your stick. It will erase the previous boot instructions
with the default ones to make sure that it will work. It does not changes anything to the partition table since the partition table is starting at offset 446 in the MBR.
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdf
Synchronizes to make sure the all the changes have been flushed to the disk.
sync
Now, you have to copy the most important files. The SystemRescueCd disc must be mounted on /mnt/cdrom. You can mount the ISO file too, in order to avoid burning a
CD-R. The stick is mounted on /mnt/usbstick. Be careful, according to an user in the forums (http://www.sysresccd.org/forums/viewtopic.php?t=1932) the order matters:
You should use these instructions which are the new method to install SystemRescueCd if you are using syslinux-3.52 or newer.
You should install using these instructions only if you are using a version of syslinux which id older than 3.52, or you can try that if the new instruction do not work.
cp /mnt/cdrom/syslinux/syslinux.cfg /mnt/usbstick/
cp -af /mnt/cdrom/isolinux/* /mnt/usbstick/
cp -af /mnt/cdrom/bootdisk/* /mnt/usbstick/
cp -af /mnt/cdrom/ntpasswd/* /mnt/usbstick/
cp /mnt/cdrom/sysrcd.dat /mnt/usbstick/
Now, you have to unmount the USB stick, and make it bootable with syslinux. Of course, you have to replace /dev/sda1 with the device name of your stick:
umount /mnt/usbstick
syslinux /dev/sdf1
sync
An user reported (http://www.sysresccd.org/forums/viewtopic.php?t=1828) that ms-sys -s /dev/sdX helps in case of problems. So you may think about it if it does not
work.
You have to plug your USB stick while Windows is running. In the explorer, a new drive letter will appear, and you can access the file of this USB stick. In this manual, we
will suppose your USB stick letter is E:. Don't forget to change this letter in the commands if required.
First, format the device. You can just right-click on the USB-device in the Explorer, and then select "Format...", and choose a FAT filesystem (it won't work with NTFS).
http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick
Now, you have to copy the most important files from the CDRom. If you don't want to burn the CDRom, you can read the files from the ISO by mounting the disc with a tool
such as Daemon-tools.
1. Copy all the files of the cdrom edition of SystemRescueCd to the root of the USB device
2. Rename the file in isolinux which is called isolinux.cfg to syslinux.cfg
3. Remove the old syslinux directory if it exists (it has been removed in sysresccd-1.1.4)
4. Rename the directory called isolinux to syslinux
Now, you have to make your stick bootable with syslinux. You will have to run this program from a prompt console (cmd.exe). Don't forget to change this letter in the
commands if required.
syslinux -ma E:
You can find the syslinux program on the CDRom. Please, check you have syslinux version 3.52 or newer. The Windows version is provided as a ZIP archive. You just need
syslinux.exe from the archive.
Users have reported (http://www.sysresccd.org/forums/viewtopic.php?t=1695) that the option ma may be necessary with syslinux to get it to work. That's why we provides
these options in that handbook. It works only on Windows:
If you boot the cdrom edition of SystemRescueCd, you can use it to install SystemRescueCd on an USB stick. SystemRescueCd-1.1.4 comes with a new script to help you to
detect the right USB device and to install SystemRescueCd on it. Formatting the USB-stick will remove all its content, so make sure you don't need it or make a backup first.
Example of installation
Format the usb stick from linux using the normal mkfs tool that comes with your favorite filesystem
Mount this filesystem to /media/usbstick and copy the files from your rescue cd into this directory. (cf normal instructions)
Run grub-install --root-directory=/media/usbstick/ /dev/sdf (replace /dev/sdf with the name of your usbstick)
Create a menu.lst in /media/usbstick/boot/grub/. You have to replace (hd0,1) with the grub name of your usb partition.
timeout 5
color light-gray/black light-blue/black
rescuecd setkmap=uk
You should press F2, F3, F4 for more help about boot options. Then, press enter. If must work as a regular SystemRescueCd from a CDRom drive.