Talk:HOWTO Small Footprint Gentoo on USB
From Gentoo Linux Wiki
All comments are welcome. BenGardiner 16:07, 16 Jul 2004 (GMT)
I really enjoyed this Howto. Good, clear writing. I have on hand a 128M usbstick and was able to get grub to boot, and a kernel to try to boot, but since its not big enough to hold all of the stage3 filesystem I couldn't go further.
I also have a 512M compact flash card with usb reader and tried to get it to work with that, but it doesn't want to even try to boot to grub. Do you know if there's any reason this shouldn't work with the compact flash? Plugged into a usb port on my gentoo desktop (development machine) it looks for all the world like the usbstick (only 4x bigger).
-Jeff Cunningham
[edit] Flash-Card Readers.
Jeff: I'm glad you enjoyed it, thank you kindly.
- Re: your usb flash reader: I think the only reason USB sticks are 'bootable' is because the BIOS can pretend they are a ZIP drive or some other removeable disk. If your flash-card reader shows up as a USB Mass storage device during your computers POST (like right after it counts memory, before it lists IRQs) then there is no reason why it shouldn't boot. Otherwise it will not boot.
-Ben Gardiner 15:48, 21 Jul 2004 (GMT)
[edit] Another Flash Card Attempt
I've almost got an internal USB CF card in a Shuttle XPC working, thanks to hints in your HOWTO article. So far the card has a simple Busybox install, single partition formatted as ext2 with grub-static as the bootloader (the box is actually an AMD64 3000+, hence the need for grub-static). Grub boots from the USB-HDD BIOS setting and loads a kernel from the card but once I get thru the initrd ram section it halts not finding any SCSI CF card device. However, if I go into the ram disk shell and rmmod usb_storage and ehci_hcd and reload them then after a few seconds I get a /dev/scsi/host{2,3,4,?}/etc device. When I quit out of the ramdisk shell and get the initrd boot: prompt again I can use the full devfsd path that just became visible and proceed with booting onto the CF card proper.
It almost works (after 2 days of trying). I just need to work out how to automate my manual intervention to reload, or simply delay loading, those two modules. The uncomfortable part is that when reloading these 2 modules by hand that it is inconsistent what /dev/scsi/host# the CF card reader will become... so it may not be possible to simply hardwire some devfsd path into the initrd boot file. However, my normal HDD Gentoo install boots and mounts the same CF card reader with or without using modules or initrd and it always comes up as /dev/sdb1 (sda is a SATA drive).
I don't want a liveCD-like setup. I want a "real", but small, Gentoo system running directly off the CF card with /tmp and /var/log mounted in a ram disk to cut down on writes to the card itself, and mounted as ext2 with noatime of course. If anyone has any tips to take this further I would love to hear them.
-Mark Constable 2004-11-10 3:50 +10
[edit] Min size?
What whould the minimum size of a usb key need to be to do this? I have a 128mb sd card and reader that I think is bootable I would love to have a live gentoo for school :)
-- T0ny 18:02, 6 Apr 2005 (GMT)
My results:
After following the instructions... and looking at about 3 other pages to get it all to work right (I had to edit the initrd because the sleep binary and associated libraries were not included! see here for details --> http://www.simonf.com/usb/ )
The size I ended up with (using Gentoo 2005.0 on a EPIA 10000N using genkernel, stage3-x86, added some extra packages but no X) was:
/dev/sda1 - /boot - 15MB (had some extra kernels and scripts in there)
/dev/sda2 - / - 324MB
That may give a hint as to the size of your USB key. I'm sure you could whittle this down quite a bit if you tried, but I have a 1GB stick, so I'm not going to.
-- Mark Carlson 2005-07-20
My Minimum size has been 111 meg. Mostly command line tools and stuff. I am working on shrinking it more without breaking the resulting image. It would be interesting to see just how small you can make it. I know DSL (Damn Small Linux) does well at around 50 or 60 meg, I would like to see if the same results can be applied towards a Gentoo distro. (edited - evildick - 2005-08-10)
-- evildick 2005-08-09
About the 2.6 issues. There is no need for a initrd. If usb support+usb-mass-storage is built in kernel one can pass rootdelay=15 to the kernel. This way the kernel will wait 15 seconds after booting before trying to mount the root.
