I have a bootable Linux (Debian-based) LiveCD, that I want to duplicate onto a hard disk so that it boots from that instead. The hard disk can (should) be mounted read-only, although a writeable swap partition might be useful.
The LiveCD is a web kiosk (www.webconverger.com). The reason I want to transfer to hard disk is so that I can mount the disk read-write, make a few changes, then remount it read-only. As a read only disk it can be "reset" by restarting the PC, the whole point is that no user data gets stored.
Any ideas how I'd do this?
On Thu, 2008-02-28 at 16:26 +0000, Mark Rogers wrote:
I have a bootable Linux (Debian-based) LiveCD, that I want to duplicate onto a hard disk so that it boots from that instead. The hard disk can (should) be mounted read-only, although a writeable swap partition might be useful.
Could you download the USB image http://webconverger.org/usb/ and dd that onto your hard drive, the same way you would for a USB stick? I don't know how this would affect your ability to set things read-only, but I would have though a change to /etc/fstab should be sufficient to lock the system down?
Jim Rippon wrote:
Could you download the USB image http://webconverger.org/usb/ and dd that onto your hard drive, the same way you would for a USB stick? I don't know how this would affect your ability to set things read-only, but I would have though a change to /etc/fstab should be sufficient to lock the system down?
No idea, but I can give that a try - thanks for the suggestion. I'll try it in a VMWare VM first and see what happens.
Should I be dd'ing it direct to the drive (ie to /dev/hda) or to a partition (/dev/hda1)? Presumably the latter if I want to also have a swap partition, in which case I'll need to separately install grub?
On Thu, 2008-02-28 at 16:57 +0000, Mark Rogers wrote:
Jim Rippon wrote:
Could you download the USB image http://webconverger.org/usb/ and dd that onto your hard drive, the same way you would for a USB stick? I don't know how this would affect your ability to set things read-only, but I would have though a change to /etc/fstab should be sufficient to lock the system down?
No idea, but I can give that a try - thanks for the suggestion. I'll try it in a VMWare VM first and see what happens.
Should I be dd'ing it direct to the drive (ie to /dev/hda) or to a partition (/dev/hda1)? Presumably the latter if I want to also have a swap partition, in which case I'll need to separately install grub?
I would dd the file to the drive (/dev/hda), have a look at the partition table to see what has been created. My suspicion is that it will have created one or more partitions from the image, and you can then create your own swap partitions within.
Alternatively, you could dd the CD ISO into a partition (/dev/hda1) and either install grub to the MBR or set the partition bootable from your favourite partition editor.
Jim Rippon wrote:
Alternatively, you could dd the CD ISO into a partition (/dev/hda1) and either install grub to the MBR or set the partition bootable from your favourite partition editor.
If you're feeling *really* adventurous, you could rebuild Webconverger from source [0] [1] add enable the installer (LH_DEBIAN_INSTALLER) option.
/Lamby
[0] http://git.debian.org/?p=debian-live/config-webc.git [1] http://webconverger.org/develop/#index3h2
Jim Rippon wrote:
I would dd the file to the drive (/dev/hda), have a look at the partition table to see what has been created. My suspicion is that it will have created one or more partitions from the image, and you can then create your own swap partitions within.
OK, so I made some progress...
I booted from an Ubuntu LiveCD, with the webconverger USB image on a flash disk. Then: sudo dd if=/media/myflashdisk/webconverger.img of=/dev/hda .. has created a single bootable FAT32 partition on my hard disk. (Obviously it goes without saying to not do this if what is already on the hard disk matters to you!)
I also created a swap partition on the disk while I was in Ubuntu so I need to set that up and see what else I can play with now.
However, when I now look at the files on the partition, it's basically using isolinux to boot from the compressed image, so in practice I've got a working version booting from hard disk, but it doesn't gain me any flexibility in terms of editing the files on the disk.
I did wonder about booting into webconverger and copying from the extracted files now residing in memory over to the hard drive, but webconverger ties everything down and I can't get out of the browser.
My main interest in this is that I'm learning quite a lot of bits and pieces about the boot process as I go along, so I'd like to keep working through this if anyone has any suggestions?