I love Mondo Rescue and at one point there was a Live CD that would boot your PC and you can then launch it from there. It was great for backing up Windows machines, but I tried searching for it and the Live CD is no where to be found. So I decided to roll my own. I search around the web on how to make Live CDs and some of this stuff is pretty complicated, never the less I found Building Your Own Live CD page and it seems to work. The only problem is that it is some what outdated and there a few typos which make it somewhat confusing to follow. So I thought I would give it a go and present an updated version of that tutorial here.

Mondo Rescue Live CD – HowTo

We will take a standard Knoppix Live CD and modify it to include Mondo Rescue.

What you will need

  • A Hard Drive with at least 2 GB of free space
  • A Knoppix Live CD (iso file or burned CD) I am using v5.1.1 2007-01-04 for this post.
  • A brain that is fairly comfortable with the Linux command line.

Directions

I don’t have spare hard drives laying around my house so the easiest thing for me is just to setup a new virtual machine and do my work there. I recommend using Virtual Box but any other program or real machine will work just fine. Once you have a “machine” we are ready to go.

  1. Boot your machine with the Knoppix Live CD. This is fairly straight forward just pop the CD in (or mount on your vm) and push the power button.
  2. Open a terminal window and drop to a root prompt.
  3. su
  4. Partition the hard drive you are going to use. The simples configuration is two partitions one for swap and the other to mount the root system. I suggest using cfdisk as it has quite a simple interface. Make a note of the partition names and numbers in my case I will create /dev/hda1 as swap and /dev/hda2 as root.
  5. cfdisk
    New | Primary | 256 | End | Type | 82
    New | Primary | [enter] | Bootable
    Write | yes | Quit 
  6. Reboot so changes to the disk take affect.
  7. shutdown -r now
  8. Open a terminal and drop to a root prompt again.
  9. Format the root partition and mount it.
  10. mkfs.reiserfs /dev/hda2
    # mount -t reiserfs /dev/hda2 /mnt/hda2
  11. Lets create a few directories to keep our files.
  12. mkdir -p /mnt/hda2/source/KNOPPIX
    # mkdir -p /mnt/hda2/master/KNOPPIX
    # mkdir -p /mnt/hda2/master/boot/isolinux
  13. Next lets copy the currently running system to our source folder along with the boot image
  14. cp -a /KNOPPIX/* /mnt/hda2/source/KNOPPIX
    # cp /cdrom/boot/isolinux/* /mnt/hda2/master/boot/isolinux
  15. Now we need to copy our current network configuration over.
  16. rm -f /mnt/hda2/source/KNOPPIX/etc/resolv.conf
    # cp /etc/resolv.conf /mnt/hda2/source/KNOPPIX/etc/resolv.conf
  17. Then we changeroot into the source environment
  18. mount -t proc none /mnt/hda2/source/KNOPPIX/proc
    # chroot /mnt/hda2/source/KNOPPIX
  19. Update and remove packages to make room for mondo. I just get rid of open office and extra languages for kde.
  20. apt-get update
    # apt-get remove --purge 'kde-i18n-*' openoffice-de-en
  21. A quick way to get a list of installed packages sorted by size is to use dpkg-query along with the sort command.
  22. dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n
  23. Install Mondo Rescue and anything else you want on the CD
  24. apt-get install mondo mondo-doc petris
  25. Restore resolv.conf to the defaults
  26. cat > /etc/resolv.conf
    # nameserver 127.0.0.1
    CTRL-D
  27. Delete package cache
  28. apt-get clean
    # apt-get autoclean
  29. Exit chroot and clean up a little.
  30. exit
    # rm  /mnt/hda2/source/KNOPPIX/root/.bash_history
  31. Package the new image.
  32. mkisofs -L -R -l -V "KNOPPIX ISO9660" -v -allow-multidot /mnt/hda2/source/KNOPPIX | create_compressed_fs - 65536 >  /mnt/hda2/master/KNOPPIX/KNOPPIX
  33. And finally, let’s create the .iso file
  34. cd /mnt/hda2/master
    # mkisofs -pad -l -r -J -v -V "MONDO KNOPPIX" -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -hide-rr-moved -o Mondo_Knoppix.iso /mnt/hda2/master

And that’s it! Fire your virtual machine with your new ISO or burn it to a CD and boot from it.
mondorescue mondoarchive livecd how to