Beruflich Dokumente
Kultur Dokumente
SystemRescueCd on an USB-stick
Contents
[hide]
1 Introduction
o 3.1 Overview
o 5.1 Overview
Introduction
This chapter explains how to install SystemRescueCD on a USB stick manually. If you
prefer, you can order a pre-configured USB stick with the latest SystemRescueCd already on
it from the popular osdisc website
Installing SystemRescueCd on an USB stick allows you to use the system from a USB stick
(mini hard disk) instead of using a CD-ROM. You need a recent SystemResuceCD, and a
USB stick with enough space. You need at least 512 MB unless you have removed files from
the official version. Your BIOS must be able to boot from USB hard disks, and the USB
device must be defined before other devices in the boot devices order.
There is now an official SystemRescueCD installer for Windows that you should use. This
page explains how to install SystemRescueCD on a USB stick. Many methods are possible.
You should really follow one of the three recommended methods (sections A, B, C). The
other methods are more complicated and are more likely to fail.
You may also be interested in making a backing store to keep your changes between reboots.
1. Download the latest SystemRescueCd ISO image from the Download page
3. Plug in your USB stick and wait 5 seconds to allow enough time for the system to
detect it
If you are running Linux on your computer it's very easy to install SystemRescueCD on a
USB stick. You just have to download the ISO image of SystemRescueCD, and then run a
script which is at the root of the CD-ROM. You don't have to burn the ISO image to a disc to
do that, you just need to have the ISO image available from a running Linux system.
Formatting the USB stick will remove all its content, so make sure you don't need the data or
make a backup first.
1. Download the latest SystemRescueCd ISO image from the Download page
2. Mount the ISO image using the -o loop and -o exec options of the mount
command
3. Plug in your USB stick and wait 5 seconds to allow enough time for the system to
detect it
5. Run bash ./usb_inst.sh in a shell then select the correct USB device and press
OK/Enter
You first have to mount the ISO image (or a media where you have burned it). You just need
an empty directory on your system on which the ISO image can be mounted. We will use
/tmp/cdrom in this example but you can use any directory such as /mnt/cdrom:
mkdir -p /tmp/cdrom
mount -o loop,exec /path/to/systemrescuecd-x86-x.y.z.iso /tmp/cdrom
Just make sure the USB stick has been plugged in, and wait a few seconds to be sure the
device has been detected by the system.
Now you just have to execute the installation script which is at the root of the CD-ROM. This
script requires several commands to run but it won't be a problem. To be sure the script will
always work, these commands are part of the CD-ROM:
cd /tmp/cdrom
bash ./usb_inst.sh
This script will show you a list of USB sticks detected on your system. Only removable
medias are in the list. This way it's not possible to destroy a persistent device by accident.
cd ~
umount /tmp/cdrom
The official SystemRescueCd installer for Windows is quite a compact self-contained EXE
program. It can be executed directly as it requires no installation on the hard disk.
1. Download the latest SystemRescueCd ISO image from the Download page
3. Plug in your USB-stick and wait 5 seconds to allow enough time for the system to
detect it
4. Format the USB stick with a FAT32 filesystem from the explorer
8. Select the original ISO image that you have downloaded previously
If you have problems with the SystemRescueCd USB installer for Windows you can try
linuxliveusb
If you boot the CD-ROM edition of SystemRescueCD, you can use it to install
SystemRescueCD onto a USB stick. If you have a Linux system on your computer you can
also use the first method, which does not require booting from a CD-ROM at all.
SystemRescueCD comes with a script to help you to detect the right USB device and to
install SystemRescueCD onto it. Formatting the USB stick will remove all of its contents, so
make sure you don't need that contents, or make a backup first.
1. Download the most recent SystemRescueCD ISO image from the Download page
2. Burn it onto a CD-ROM. You can use software such as Nero or ImgBurn on
Windows or cdrecord/wodim/k3b under Linux.
4. Plug in your USB stick and wait 5 seconds to allow enough time for the system to
detect it.
5. Type sysresccd-usbstick dialog in a shell then select the correct USB device
and press OK/Enter
Instead of sysresccd-usbstick dialog you can also run the following commands by hand:
2. Run sysresccd-usbstick writembr xxx where xxx is the name of the usb device
3. Run sysresccd-usbstick format xxx where xxx is the name of the partition on
your device
4. Run sysresccd-usbstick copyfiles xxx where xxx is the name of the partition on
your device
5. Run sysresccd-usbstick syslinux xxx where xxx is the name of the partition on
your device
Format the USB stick from Linux using the normal mkfs tool that comes with your
favorite filesystem
If you are using SystemRescueCD-1.2 or more recent, it's recommended that you use an ext4
filesystem with the journal turned off (this is possible with Linux >= 2.6.29). USB sticks are
Flash filesystems and this type of memory only supports a limited number of writes.
Journaling filesystems will make many writes at the same location (where the journal is
stored). Therefore, to extend the lifespan of the memory we should limit the number of
writes. Here is how to use ext4 with the journaling turned off:
You could also use ext2 but it does not support extents, and then it requires more accesses to
read/write large files to the disk.
Mount this filesystem to /media/usbstick and copy the files from your
SystemRescueCD into this directory. (cf normal instructions)
title MemTest+
kernel (hd0,1)/isolinux/memtestp
initrd (hd0,1)/bootdisk/initrd.cgz
title Gag
kernel (hd0,1)/isolinux/memdisk
initrd (hd0,1)/bootdisk/gag.img
title MHDD
kernel (hd0,1)/isolinux/memdisk
initrd (hd0,1)/bootdisk/mhdd.img
title Aida
kernel (hd0,1)/isolinux/memdisk
initrd (hd0,1)/bootdisk/aida.img
title FreeDOS
kernel (hd0,1)/isolinux/memdisk
initrd (hd0,1)/bootdisk/freedos.img
You should now be able to boot from this USB stick. You can also have a look at another usb-
installation tutorial based on ext4 and grub.
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 find 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 built-in in
the kernel. If modprobe can't find this module, it might be normal.
modprobe usb-storage
Now, you have to plug in your USB stick, and have a look at the kernel messages. You may
find the device name using either dmesg | tail -n 50 or fsarchiver probe
kernel: usb 1-7: new high speed USB device using ehci_hcd and address 5
kernel: usb 1-7: New USB device found, idVendor=1516, idProduct=1213
kernel: usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 1-7: Product: DISK 2.0
kernel: usb 1-7: Manufacturer: USB
kernel: usb 1-7: SerialNumber: 0018F3218E76A9C0D2CF846A
kernel: usb 1-7: configuration #1 chosen from 1 choice
kernel: scsi6 : SCSI emulation for USB Mass Storage devices
kernel: scsi 6:0:0:0: Direct-Access USB DISK 2.0 1.00 PQ: 0 ANSI: 2
kernel: sd 6:0:0:0: Attached scsi generic sg6 type 0
kernel: sd 6:0:0:0: [sdf] 16035840 512-byte logical blocks: (8.21 GB/7.64
GiB)
kernel: sd 6:0:0:0: [sdf] Write Protect is off
kernel: sd 6:0:0:0: [sdf] Assuming drive cache: write through
kernel: sd 6:0:0:0: [sdf] Assuming drive cache: write through
kernel: sdf: sdf1
kernel: sd 6:0:0:0: [sdf] Assuming drive cache: write through
kernel: sd 6:0:0:0: [sdf] Attached SCSI removable disk
Here you can see that fsarchiver probe reports all devices and partitions found on your
system:
# fsarchiver probe
[======DISK======] [=============NAME==============] [====SIZE====] [MAJ]
[MIN]
[sda ] [ST3808110AS ] [ 74.53 GB] [ 8] [
0]
[sdf ] [DISK 2.0 ] [ 7.65 GB] [ 8] [
80]
mkdir /mnt/usbstick
mount -t vfat /dev/sdf1 /mnt/usbstick
If there is not enough space 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 very 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 this the first time. In case of problems getting the USB
stick to boot, you should really try this. Confirm that you have a backup of the data that are
on your stick before you do this. Thanks to jadjay in the forums for this addition to the
instructions. We assume your device is /dev/sdf but you must replace it with the device
name of your own USB stick. Be very sure that this is the correct device !
First, run cfdisk to check that the partition has the correct 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, so make sure you don't need the
data which it contains.
The following dd command will overwrite the first 404 bytes of the MBR of your stick. It
will erase the previous boot instructions with the default ones to make sure that it will work.
It does not change anything in the partition table since the partition table starts at offset 446 in
the MBR.
dd if=/usr/share/syslinux/mbr.bin of=/dev/sdf
Synchronize to make sure that all the changes have been flushed to the disk.
sync
Step 3: Copy files from the CD-ROM
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 a user in the forums the order matters:
Now, you have to unmount the USB stick, and make it bootable with syslinux. Of course, you
have to replace /dev/sdf1 with the device name of your stick:
umount /mnt/usbstick
syslinux /dev/sdf1
sync
A user reported that ms-sys -s /dev/sdX helps in case of problems. So you may consider
that if you initially have a problem.