[plug] Floppy based Mini-Distro's

Brad Campbell brad at wasp.net.au
Tue Jun 15 16:14:48 WST 2004


Jay Turner wrote:
> Brad Wrote:
> 
>>I can give you one of my floppy images if you like. It supports
>>ash (which is pretty bash
>>compatible) and has dd and most other stuff you will need.
>>You would need to loopback mount the floppy, uncompress the ext2
>>initrd, loopback mount that,
>>add/delete to your hearts content, gzip it back up and copy it to
>>the floppy.
>>
>>Hell, it's at http://www.wasp.net.au/~brad/boot_floppy.img
> 
> 
> Thanks for that Brad,
> 
> I d/l your image yesterday, loopback mounted it, added my script, made a few
> other changes, and I was off.
> I would like to start playing with making a disk like this for myself, but
> based on Red Hat (I assume yours is Debian based)

Not really. I build it by hand from source. It has no existing distribution bias except perhaps my 
own experience.

> Can you point me to any tutorials on the web (saves me trawling through
> google, tldp and the likes) on how to go about it.

Not really. As I say, I learned by grabbing LRP and dissecting it. I believe there may be a 
bootdisk-howto somewhere but thats just from really foggy memory.

It's pretty easy. Grab a kernel tree and compile a kernel with all the options you think you need. 
Whack that on a fat formatted floppy. Create a blank filesystem..

dd if=/dev/zero of=fs bs=1M count=4
mke2fs -F fs
mount -o loop fs /mnt

copy all your files to /mnt and unmount.
gzip -9 fs
cp fs.gz /floppy

make a syslinux config file on the floppy and run syslinux on the disk.
Voila, your very own boot disk.

You can use the minix filesystem for the initrd (just make sure minixfs is compiled into your 
kernel) as it is a bit better for space (has less metadata), but I just use ext2 as I need it 
compiled into my kernel anyway.

You can either compile your binaries static for the boot disk, or use something like uClibc. For a 
bootdisk, Busybox is the ducks nuts, it has almost every app you may need. I'd recommend perhaps GNU 
tar though as there were some issues with Busybox tar and long file names (Dunno if that has been 
fixed, my experience with that was over 12 months ago).
As you can see on my boot disk I have busybox, basic pcmcia support, dosfstools and rsync all 
compiled against uClibc. It fits with plenty of room to spare.

The only problem with doing it this way is you start getting anal about code size, efficiency and 
compression. Well, I was anyway but doing tight boot disks has made me recompile the same code 10 
times checking object sizes with different optimisation levels and configuration until I get the 
smallest code. It starts to get to a point of diminishing returns really quickly though.

If your clever you can fit a large amount of stuff on a single floppy. I have seen people floored 
when I booted linux with a single floppy ran up the network and imaged thier machine using tar and 
nc onto another box, replaced the hard disk and sucked it all back again, or repaired windows from 
linux. It's fun!

Regards,
Brad



More information about the plug mailing list