Home News Documentation Download Screenshots Credits Help
< PREV UP NEXT >

Installation to USB made easy [^]

Until recently installing Clonezilla-SysRescCD on a USB disk would not be such a great idea, because of its size. But since USB devices become cheaper and cheaper, it is an interesting alternative.

Starting with version 3.1.0, Clonezilla-SysRescCD provides an iso file that's ISO-Hybrided. This means (as we read at the isolynux site) that

"the iso file can be booted from either CD-ROM or from a device which BIOS considers a hard disk or ZIP disk, e.g. a USB key or similar. This image can then be copied using any raw disk writing tool (on Unix systems, typically "dd" or "cat") to a USB disk, or written to a CD-ROM using standard CD burning tools.

The ISO 9660 filesystem is encapsulated in a partition (which starts at offset zero, which may confuse some systems.) This makes it possible for the operating system, once booted, to use the remainder of the device for persistent storage by creating a second partition."

Incorrect use of any raw disk writing tool could cause your
operating system (GNU/Linux / Windows) not to boot.

Confirm the command before you run it.

So, from any linux box, assuming Clonezilla-SysRescCD iso file is in your home directory, and your USB device name is sdc4, you just execute the commands:

umount /dev/sdc4
dd if=~/clonezilla-sysresccd-full-mod-3.1.0.iso of=/dev/sdc bs=512

And that's it. Your usb device is ready to boot!!!

Using the extra space [^]

If your usb device is more than 400MB in size, the above command will leave the remaining space unused. To verify it, execute the command:

fdisk -l /dev/sdc

You should get something similar to this:

Disk /dev/sdc: 1048 MB, 1048576000 bytes
64 heads, 32 sectors/track, 1000 cylinders, total 2048000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x77a5188f

   Device Boot  Start  End  Blocks  Id  System /dev/sdc1    *      1  384  393216  17  Hidden HPFS/NTFS

As you can see, we are currently using 348 out of 1000 cylinders of the disk. The remaining disk space (~600MB) can still be used, executing the following commands (user input is displayed in magenta, comments are in brown):

fdisk /dev/sdc
command (m for help): n (create new partition)
command action
e extended
p primary partition (1-4)
p
partition number (1-4): 4 (create partition sdc4)
first cylinder (385-1000, default 385):
using default value 385
last cylinder, +cylinders or +size{k,m,g} (385-1000, default 1000):
using default value 1000

command (m for help): p (display partition table)

disk /dev/sdc: 1048 mb, 1048576000 bytes
64 heads, 32 sectors/track, 1000 cylinders
units = cylinders of 2048 * 512 = 1048576 bytes
sector size (logical/physical): 512 bytes / 512 bytes
i/o size (minimum/optimal): 512 bytes / 512 bytes
disk identifier: 0x77a5188f

   device boot  start   end  blocks   id  system
/dev/sdc1   *       1   384  393216   17  hidden hpfs/ntfs
/dev/sdc4         385  1000  630784   83  linux


command (m for help): t (change partition type)
partition number (1-4): 4
hex code (type l to list codes): b
changed system type of partition 4 to b (w95 fat32)

command (m for help): p (display partition table)

disk /dev/sdc: 1048 mb, 1048576000 bytes
64 heads, 32 sectors/track, 1000 cylinders
units = cylinders of 2048 * 512 = 1048576 bytes
sector size (logical/physical): 512 bytes / 512 bytes
i/o size (minimum/optimal): 512 bytes / 512 bytes
disk identifier: 0x77a5188f

   device boot  start   end  blocks   id  system
/dev/sdc1   *       1   384  393216   17  hidden hpfs/ntfs
/dev/sdc4         385  1000  630784    b  w95 fat32

command (m for help): w (write partition table to disk and exit)
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

At this point you should disconnect and reconnect your usb device. When it's recognised, you can format the partition you've just created

mkdosfs -F 32 /dev/sdc4

The partition is now ready for use!!!

Installing the "hard" way [^]

If the "easy" way does not work there is an alternative; you will use the Clonezilla-SysRescCD ISO file (or CD) to copy and modify a couple of files on the USB disk, and finally make it bootable, using syslinux and its configuration file syslinux.cfg.

Incorrect use of syslinux could cause your operating system
(GNU/Linux / Windows) not to boot.

Confirm the command before you run it.

The only thing that's important is that your USB disk must contain a VFAT (Windows 98 or DOS) file system. If this is not the case, refer to the section "Troubleshooting", to find out how you can format it, before copying files to it.

The bootable USB disk creation procedure can be performed either from Linux or Windows.

If you want to create a bootable USB flash drive for this version
or later, remember to use the syslinux command from syslinux
3.71 or later
. Otherwise the boot menu won't work.

Installation from Linux [^]

There are two ways you can proceed, if you are going to use Linux to perform the USB installation, either using a running linux box, or using Clonezilla-SysRescCD.

I will assume that you have saved clonezilla-sysresccd-full-mod-3.1.0.iso in your home directory (~).

Using a linux box [^]

If you already have a linux box up and running, you can use it to create your Clonezilla-SysRescCD USB, without even having to burn it to CD beforehand. The only thing here is that you have to have syslinux installed.

I will assume that your CD drive is /dev/sr0 and that your USB device is /dev/sdc4. You may have to change any of them to reflect your system configuration.

Boot into linux, connect your USB device and execute the following commands:

mkdir /mnt/mycd
mount ~/clonezilla-sysresccd-full-mod-3.1.0.iso /mnt/mycd -o loop
mkdir /mnt/usbdevice
mount /dev/sdc4 /mnt/usbdevice
cp -r /mnt/mycd/* /mnt/usbdevice
umount /mnt/mycd; rmdir /mnt/mycd
cd /mnt/usbdevice
rm isolinux/*.cfg
mv isolinux/* .
rmdir isolinux
cd; umount /dev/sdc4
rmdir /mnt/usbdevice

Finally make your USB device bootable, by executing

syslinux /dev/sdc4

and you are done.

Using Clonezilla-SysRescCD [^]

If you already burnt Clonezilla-SysRescCD to CD, you can use it to create your Clonezilla-SysRescCD USB.

I will assume that your CD drive is /dev/sr0 and that your USB device is /dev/sdc4. You may have to change any of them to reflect your system configuration.

Boot SystemRescueCD using the option To RAM, and when it is fully loaded, execute the following commands:

mkdir /mnt/mycd
mount /dev/sr0 /mnt/mycd
mkdir /mnt/usbdevice
mount /dev/sdc4 /mnt/usbdevice
cp -r /mnt/mycd/* /mnt/usbdevice
umount /mnt/mycd
cd /mnt/usbdevice
rm isolinux/*.cfg
mv isolinux/* .
rmdir isolinux
cd; umount /dev/sdc4

Finally make your USB device bootable, by executing

syslinux /dev/sdc4

and you are done.

Installation from Windows [^]

Installing Clonezilla-SysRescCD from Windows is as easy as it is in Linux. You have to burn Clonezilla-SysRescCD to CD or use a CD/DVD ROM emulator software like Daemon Tools to mount the ISO file.

I will assume that your USB device is drive K: and your CD drive or mounted ISO file is drive D:. You may have to change any of them, in order to reflect your system configuration.

You will have to

Now all you have to do is make your USB disk bootable. In order to do that you have to open a DOS window (in Windows XP press "Start / Run " and type cmd). Then type at DOS prompt:

K:
cd utils/bootprog
syslinux -ma K:

Booting from USB [^]

Before trying to boot from your USB device, you have to set your boot device at your BIOS. This means you have to reboot having your USB device connected, get into your BIOS (usually pressing DEL) and make the appropriate settings in the BOOT section.

Booting Clonezilla Live should not be a problem. Just select the desired option and press ENTER to boot.

Booting SystemRescueCD has been made equally simple with SystemRescueCD v 1.0.0, so you shouldn't have any problem (option cdroot is not required any more).

If you have any problems here, you may try adding any of these boot parameters:

usbstick
doscsi

Troubleshooting [^]

Whether you can successfully boot from a USB disk or not, depends mainly on your BIOS. Chances are that you will not be able to boot on an old computer, with an old (and possibly buggy) BIOS. So I would recommend testing your Clonezilla-SysRescCD USB on a new computer.

Customizing sysresc.cfg [^]

As stated previously, Clonezilla-SysRescCD USB is booted by syslinux through its configuration file syslinux.cfg. This file loads sysresc.cfg in order to boot SystemRescueCD.

If you have to specify any additional boot parameters for SystemRescueCD, you may want to write these changes to the configuration file, so that you don't have to insert them by hand every time.

The procedure to do that is the following:

Boot SystemRescueCD (or if that's not possible yet, bot Clonezilla Linux and get to the command line) using the option To RAM, and when it is fully loaded, execute the following commands:

mkdir /mnt/usbdevice
mount /dev/[device] /mnt/usbdevice
cd /mnt/usbdevice
cp sysresc.cfg sysresc.bak
sed 's|scandelay=5|scandelay=x [additional params]|'
sysresc.cfg > sys.cfg
mv sys.cfg sysresc.cfg
cd; umount /dev/[device]
syslinux /dev/[device]
reboot

where x is a number from 1 to 10.

After executing these commands, you will have a new sysresc.cfg file, and a backup file called sysresc.bak (in case things go wrong).

If, for example, you want to increase the device scan delay to maximum, the above commands would become:

mkdir /mnt/usbdevice
mount /dev/sdc4 /mnt/usbdevice
cd /mnt/usbdevice
cp sysresc.cfg sysresc.bak
sed 's|scandelay=5|scandelay=10|' sysresc.cfg > sys.cfg
mv sys.cfg sysresc.cfg
cd; umount /dev/sdc4
syslinux /dev/sdc4
reboot

If, in addition to that, you had to use the boot parameter usbstick, then it would be:

mkdir /mnt/usbdevice
mount /dev/sdc4 /mnt/usbdevice
cd /mnt/usbdevice
cp sysresc.cfg sysresc.bak
sed 's|scandelay=5|scandelay=10 usbstick|' sysresc.cfg > sys.cfg
mv sys.cfg sysresc.cfg
cd; umount /dev/sdc4
syslinux /dev/sdc4
reboot

In case something goes wrong with your new settings, you can always rename sysresc.bak to sysresc.cfg, either from linux or Windows.