Thoughts of just about anything
Mondo Rescue Live CD
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.
- 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.
- Open a terminal window and drop to a root prompt.
- 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.
- Reboot so changes to the disk take affect.
- Open a terminal and drop to a root prompt again.
- Format the root partition and mount it.
- Lets create a few directories to keep our files.
- Next lets copy the currently running system to our source folder along with the boot image
- Now we need to copy our current network configuration over.
- Then we changeroot into the source environment
- Update and remove packages to make room for mondo. I just get rid of open office and extra languages for kde.
- A quick way to get a list of installed packages sorted by size is to use dpkg-query along with the sort command.
- Install Mondo Rescue and anything else you want on the CD
- Restore resolv.conf to the defaults
- Delete package cache
- Exit chroot and clean up a little.
- Package the new image.
- And finally, let’s create the .iso file
su
cfdisk New | Primary | 256 | End | Type | 82 New | Primary | [enter] | Bootable Write | yes | Quit
shutdown -r now
mkfs.reiserfs /dev/hda2 # mount -t reiserfs /dev/hda2 /mnt/hda2
mkdir -p /mnt/hda2/source/KNOPPIX # mkdir -p /mnt/hda2/master/KNOPPIX # mkdir -p /mnt/hda2/master/boot/isolinux
cp -a /KNOPPIX/* /mnt/hda2/source/KNOPPIX # cp /cdrom/boot/isolinux/* /mnt/hda2/master/boot/isolinux
rm -f /mnt/hda2/source/KNOPPIX/etc/resolv.conf # cp /etc/resolv.conf /mnt/hda2/source/KNOPPIX/etc/resolv.conf
mount -t proc none /mnt/hda2/source/KNOPPIX/proc # chroot /mnt/hda2/source/KNOPPIX
apt-get update # apt-get remove --purge 'kde-i18n-*' openoffice-de-en
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n
apt-get install mondo mondo-doc petris
cat > /etc/resolv.conf # nameserver 127.0.0.1 CTRL-D
apt-get clean # apt-get autoclean
exit # rm /mnt/hda2/source/KNOPPIX/root/.bash_history
mkisofs -L -R -l -V "KNOPPIX ISO9660" -v -allow-multidot /mnt/hda2/source/KNOPPIX | create_compressed_fs - 65536 > /mnt/hda2/master/KNOPPIX/KNOPPIX
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
| Print article | This entry was posted by Juan Frias on February 29, 2008 at 3:23 pm, and is filed under Debian, Linux. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |