Search:  
Gentoo Wiki

HOWTO_Install_to_a_file_on_a_FAT_and_boot_with_loadlin


Some time ago, I wrote a small doc that explained how one could install linux to a file located on a FAT32 filesystem, instead of installing it to a real partition.

Then the distro was booted using loadlin.

The story

The aim was to provide an installation method for people that wanted to test linux, but might have to uninstall it. Indeed, if you install linux fual-booting with an existant windows, the only way to uninstall linux is to re-run some kind of installer to get a partitionning program, remove all linux partitions and resize the windows one, so it uses the whole disk.

Why would one want to do that ??? Well I still have a bitter memory of the last time I gave Mandriva Easy to a friend : Something failed during the installation and he couldn't use his freshly installed linux, so I explained him how he could uninstall it, but being quite newbie, he didn't manage to do so and finally decided to format everything and re-install windows. I don't think he'll try linux again.

Having linux installed into a file, with a small uninstall program that would allow to delete everything from windows's control pannel would avoid such stories.

I KNOW THIS INSTALLATION METHOD IS BAD ! I am perfectly aware that having liux hosted onto a FAT filesystem is a bad idea, as you can't switch it to a full-disk installation easily, but I would consider this as something between the liveCD and the real harddisk install.

The howto

In this howto, I used DSL Linux (Damn Small Linux), because the installer can easily be hacked, simply by changing a few lines in the install script. However, this can be adapted quite easily to gentoo.

The howto is located here :

http://docs.google.com/View?docid=ajjp24f6m5xs_0grzx5c

It isn't completely finished, as you'll see : when the system is installed into a file, I managed to boot the kernel, but I didn't manage to hack the initrd so that it would mount using loopback the file as the root filesystem.

If somebody knows how to make everything work, well feel free to improve my howto :-) It's licence is Creative Commons By.

Retrieved from "http://www.gentoo-wiki.info/HOWTO_Install_to_a_file_on_a_FAT_and_boot_with_loadlin"

Last modified: Thu, 27 Dec 2007 00:54:00 +0000 Hits: 1,990