The Ultimate Boot CD (UBCD) is a good compendium of PC diagnostic and repair utilities. However for more recent PCs, a bootable USB memory stick version is much more convenient, especially for when there is no CD/DVD drive… Also, you can easily add your own utilities into the mix.
The instructions in the “readme” on UBCD were critically incomplete for one detail:
UBCD511/ubcd/tools/linux/ubcd2usb/syslinux -s -d /boot/syslinux /dev/sdX1
should be instead:
UBCD511/ubcd/tools/linux/ubcd2usb/syslinux --install -s -d /boot/syslinux /dev/sdX1
Otherwise you get the error from syslinux of “syslinux: no previous syslinux boot sector found” and the memory stick will subsequently fail to boot.
A terse command line list of what I did to copy UBCD to a bootable USB memory stick is:
Download the CD iso file as described on the UBCD downloads page;
Burn the iso to a CD and then mount the CD,
or directly mount the iso using loopback:
mkdir /tmp/ubcdmount
mount -t iso9660 -o ro,loop ubcdNNN.iso /tmp/ubcdmount
where “ubcdNNN.iso” is your UBCD iso file. (I’ll assume a mount at /tmp/ubcdmount for the examples.)
Next list your dev files with “ls -lh /dev/sd*”, insert a sacrificial USB memory stick, allow your system to detect it and then repeat the “ls -lh /dev/sd*” to note what new sdX device has appeared. The USB memory stick should be 1GByte or larger;
Make sure your memory stick has not been automatically mounted by checking with “df -h”. If it is listed, then best is to unmount it!
Next, all as root and with due care for no typos, where “sdX” is your memory stick:
cfdisk /dev/sdX
Ensure there is just the one primary partition which uses the entire device. Set the partition to type “0C”, “W95 FAT32 (LBA)” and toggle the boot flag to bootable. Select “write” and then “quit”.
If someone knows of a neat way of doing that using sfdisk that works for all memory stick sizes with just the one command, please let me know 😉
Next, replacing the “nnn” with the respective version number and “X” with your USB device letter:
mkfs.vfat -F 32 -n UBCDnnn-USB /dev/sdX1
dd if=/tmp/ubcdmount/ubcd/tools/linux/ubcd2usb/mbr.bin of=/dev/sdX
mkdir /tmp/ubcdusb
mount -v -t vfat /dev/sdX1 /tmp/ubcdusb
cp -rv /tmp/ubcdmount/* /tmp/ubcdusb
umount -v /tmp/ubcdusb
/tmp/ubcdmount/ubcd/tools/linux/ubcd2usb/syslinux --install -s -d /boot/syslinux /dev/sdX1
umount -v /tmp/ubcdmount
Just to be sure of no mounts left open for your USB, check with a “df -h”. If all clear, and the light on the USB has stopped flashing, then job done. You should now be able to boot from the memory stick.
Cheers,
Martin
Leave a Reply
You must be logged in to post a comment.