Re: boot ext2 on vfat
Christian Perle <[email protected]>
| Newsgroups | gmane.linux.debian.knoppix |
|---|---|
| Organization | Silmor |
| Message-ID | <[email protected]> |
Hi mammique, On Thu, Mar 18, 2004 at 21:02:54 +0100, mammique wrote: > i'd like to know if it's possible, if anybody thought/tried, to boot > from a virtual ext2 partition (containing the system) wich is file on > vfat ? The file could be created from a knoppix-cd during HD It is possible. I just did a quick and dirty hack on an older version of knx-hdinstall. I hardcoded the parts for creating and mounting the ext2 container file (knx.img). After the file copying step, you must change the rootfs fstab entry to: /dev/loop0 / ext2 defaults,errors=remount-ro 0 1 The tricky part is the initial ramdisk. It must mount the vfat partition first, then assign the ext2 container file to /dev/loop0 and tell the kernel to use /dev/loop0 as root device: #!/bin/sh # this is /linuxrc insmod /modules/loop.o mount -t vfat /dev/hda1 /mnt/dosfs # use knx.img for loop0 losetup /dev/loop0 /mnt/dosfs/knx.img mount -t proc proc /proc # 1792 = 7*256+0 = loop0 echo 1792 > /proc/sys/kernel/real-root-dev umount /proc Kernel and initrd must be loaded off the vfat partition by loadlin.exe running in real dos mode. Note that this is only possible when using Win95/98/ME. WinNT/2k/XP do not have real dos mode, so loadlin.exe cannot run. bye, Chris -- Christian Perle chris AT linuxinfotag.de Grunaer Str. 31 http://silmor.de/~chris/ 01069 Dresden LinuxGuitarKitesBicyclesBeerPizzaRaytracing