This mini HOW-TO explains how to install SystemRescueCd on USB stick or SATA disks.
- Author: Jiri Kral, jirikral / AT / seznam / dot / cz
- Updated: by Francois Dupoux
Thanks to vonloschz for posting solution, that showed me the path :)
Instructions to install SysRescCd on an USB stick can be read from this HowTo. If you prefer, you can also follow instructions from the official manual, version 20060326 or newer.
You have to download SysRescCd-0.2.18 or newer to install it on an USB stick.
You need a 256 MB stick to be sure you will have enough space. But if you just have a 128 MB stick, it should work if you remove several files that are not mandatory, such as bootdisk images that you don't use.
- Get the device name for the USB stick
- Create appropriate file system on USB key (MBR, partition)
- Copy files from the CDRom to USB
- Install syslinux
Get the device name for the USB stick
- First, plug your USB stick
- /dev/sda is the USB key for demonstration (change it to your setup). If you don't know the name of this device on your system, type the following command:
# cat /proc/partitions
It will show the list of all block devices recognized by the kernel. The usb stick can have a name such as sda, sdb, sdc, sdd, uba, ubb, ... or sda1, sda2, sda3, sda4, ...
Creating file system on USB
It happens :), that some USB sticks do not have their MBR ok, or at all. A partition begins right at the begining of the disk. Windows are OK with this, Linux as well, while one mounts /dev/sda (or /dev/uba .. etc ) instead of /dev/sda1. This is unfortunately not ok for running anything, that expects /dev/sdaX. This problem is supposed to be fixed now. Then you should ignore this first step, and directly copy files to the USB stick. But if you have problems, try to follow this step.
Let's erase it first:
# dd if=/dev/zero of=/dev/sda
- install mbr (you will need mbr package from debian)
use --force switch, if the command below complains
# install-mbr /dev/sda (or install-mbr --force /dev/sda)
- create partition with parted (or whatever else)
# parted /dev/sda (parted) mkpartfs primary fat32 0 100% // use help or help mkpartfs command to see help (parted) print // check if the write was ok (parted) quit
File system is prepared now. Let's copy files from iso image.. or CD (taken from CD's manual and fixed one bug)
Copy files from the CDRom to USB
Mount the image and the stick first:
# mkdir -p /mnt/iso /mnt/usb # mount -o loop /path/to/systemrescuecd-x86-x.y.z.iso /mnt/iso # mount -t vfat /dev/sda1 /mnt/usb
Now, copy files from the CDRom:
# cp /mnt/iso/syslinux/syslinux.cfg /mnt/usb/ # cp /mnt/iso/sysrcd.dat /mnt/usb/ # cp /mnt/iso/isolinux/* /mnt/usb/ # cp /mnt/iso/bootdisk/* /mnt/usb/
You should have all files copied in the root of your USB stick, outside of subdirectories. You must see the following files there:
- main files: vmlinuz1, initrd1, sysrcd.dat, syslinux.cfg
- bootdisk files: several *.img files
- miscellanous files: *.lss, *.img
Almost done. installing syslinux on the USB stick is the last step
Copy and extract syslinux from the CDRom to a directory, and run this program:
# ./syslinux /dev/sda1
If you prefer, you can use the package manager from your distribution to install syslinux.
ldlinux.sys shoud be created in USB's root
The USB stick is ready. Don't forget to change your BIOS settings, in order to have USB drives bootable.
Preparing the USB stick under Windows
Of course, it is possible to do the same thing from Windows:
- insert your USB stick. We will suppose it is detected as E:
- format your USB stick with a FAT file system
- Copy all files from the Sysresccd CDRom to the USB stick, and move all files from bootdisk and isolinux to the root of the USB drive
- Move E:\syslinux\syslinux.cfg to the root of E:\
- Extract syslinux.exe from the CDRom, and run the following command: syslinux E:
- The USB stick should be ready. Don't forget to change your BIOS settings, in order to have USB drives bootable.