PCLOS Minime - Run Live from Hard Disk Drive

ClareOldie

LiveCDs are a marvellous innovation. They allow testing of the Operating System to see if it suits you, before installing it. CDs are very portable and allow you to carry your favourite OS with you easily. When used frequently their drawbacks begin to show. I find that running an OS from a CD is much slower than that from a Hard Disk, and also much noisier. On the other hand, it is a hassle to install the OS, particularly if it is only for a short time.

With PCLOS there is a half-way measure available. The files in the ".iso" can be copied to a HDD and run "live" from the HDD. This releases the CD Drive for other operations, eliminates the noise of a fast spinning CD, and also runs much faster - much closer to the speed of an actual install than running live from a CD. I will try to describe the steps I took to implement this on an old HDD and using the PCLOS MiniMe release. It could, I guess, be done with a re-master of an install which included all the extras you might need. For this exercise that was not necessary.

I attached the HDD (only 1.6G in this case) as the only HDD in the system, booted from Minime CD, partitioned and mounted the HDD into three primary partitions -

 1. 50Mb to hold the bootloader           hda1
 2. 500Mb as swap                         hda2
 3. Approx 1Gig for the Operating System  hda3

I then copied the .iso from a USB stick to the 1Gig partition (hda3) and mounted it using "mount -r -t iso9660 -o loop /path/to/iso /mnt/iso" as root in a console. Next, I copied the "isolinux" directory, from the mounted .iso to hda3 and the file "livecd.sqfs", which is rather large, to be in the same location. When this was done I unmounted the .iso (deleted it from hda3 if you wish).

What we have at this point is a HDD partitioned to suit, with the OS files on partition hda3 and a swap partition on hda2. We also have the partition hda1 awaiting our bootloader. I used GRUB for this as I had a copy handy and am familiar with it.

I installed GRUB to hda1 and ran it to put the bootloader into the MBR of hda. I then edited the menu.lst file to boot hda3. The entry is as follows:

title PCLinuxOS Live from HDD
root(hd0,2)
kernel/isolinux/vmlinuz root=/dev/hda3 ro ide=nodma bootfrom=/dev/hda3
initrd/isolinux/initrd.gz
boot

Note: The ide=nodma is to allow the OS to run on old hardware that is not DMA compatible. bootfrom tells it to boot from the HDD not the CD as would be done normally.

Bugs: Proper (clean) shutdown is not achieved - yet. This is no great problem, as it is a live session and nothing is written permanently to the OS. Just shut down as normal until it stops and then turn off the computer.

After that it was just a matter of rebooting the computer, taking out the Minime CD and letting the new "install" boot. It was noticeably faster than the CD, and quieter.

This exercise was undertaken with the help and guidance of Ikerekes, without whose assistance I could not even have started.

Top