-
Customized initrd boots regular ext3 systems
I love the configuration of the knoppix kernel so much, I use on my regular debian desktop system. One of the biggest problems I had with it was that I couldn't mount my root fs ext3 because the modules wouldn't fit on the floppy-size initrd image (and why should it - it's running from a cd!
.
So I hacked up this little alternative initrd image tweaked from the 2004-02-16 release (with the 2.4.24-xfs knoppix kernel) that I thought I would share.
It adds an extra cheat code, "bootfs=", ( example: "bootfs=/dev/hda2" ), that will cause the knoppix boot process to skip looking for the cloop image, and will instead attempt to mount the device listed in bootfs as the root filesystem, as ext3 if it can, as ext2 otherwise, and failing that, as vfat. It will then boot that system with init from there as usual.
To make this work, you'll probably need to copy the /lib/modules/2.4.24-xfs/ and /lib/modules/extra/ directories from the knoppix system into your system's /lib/modules/ so that the booting kernel can load the right modules for itself as it goes.
I had to add the jbd.o and ext3.o modules onto the image, so I'm sure it's too big to copy onto a floppy drive along with the kernel, but it's fat and happy loading from my hard drive using the grub bootloader.
I hope you find it useful.
enjoy
-
yes ! very useful !
I've been searching for the linuxrc tweak to get this result. Thank you :P
By the way, could you describe your mods ?
- Why should we mount read only ?
- The signal to the kernel for real root dev is also mysterious, although I've seen such things in every scripts... as well as all these mount /proc...
-
The real-root-dev call was there in the initial script, so I just preserved it.
After finishing with the initrd, the kernel remounts the root fs read/write on it's own. IIRC, mounting it rw to begin with failed to boot properly. Either that, or it screwed up recovery operations in case one was necessary. Adding the jbd.o and ext3.o, and tweaking the linuxrc comprise the only changes (a diff against the original should point them out)
I was thinking about adding some more capabilities - like throwing smbfs in there allowing a remote network boot. Once you've decided that size is a small enough consideration that you're initrd doesn't need to fit on a floppy, tons of crap can suddenly be justified to have stuffed into it... ;p
-
Hi Bitster,
I have just posted a question about customising the kernel which has been driving me nuts. Could you please have a look at it and tell me what you actually did to create a customised kernel?
Robert
-
Senior Member
registered user

Originally Posted by
bitster
I was thinking about adding some more capabilities - like throwing smbfs in there allowing a remote network boot. Once you've decided that size is a small enough consideration that you're initrd doesn't need to fit on a floppy, tons of crap can suddenly be justified to have stuffed into it... ;p
Well people are always looking for an easy way to 'boot' off USB and 1394 external hard drives if you are looking for a challenge...
Similar Threads
-
By ddrex in forum Hardware & Booting
Replies: 1
Last Post: 04-07-2005, 04:35 PM
-
By cpfrank in forum General Support
Replies: 1
Last Post: 03-25-2004, 07:00 AM
-
By Dan in forum Hdd Install / Debian / Apt
Replies: 3
Last Post: 02-18-2004, 09:14 PM
-
By alex52 in forum Hdd Install / Debian / Apt
Replies: 4
Last Post: 02-01-2004, 06:08 AM
-
By j0x in forum Hardware & Booting
Replies: 4
Last Post: 04-01-2003, 12:54 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Dell 6P85J 4TB ST4000NM0063 7.2k 6Gb/s 3.5” SAS SED Hard Drive with Tray
$39.99

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A
$64.00

HGST Ultrastar HUS726040AL5210 4TB 7200RPM SAS 12Gb/s Enterprise HDD
$41.00

DELL 2TB Enterprise HDD (7200RPM, 3.5", SATA III, 128MB Cache) HUS722T2TALA600
$49.95

Seagate Exos ST2000NX0253 HDD 2TB SATA 7.2K 2.5" 512b/s
$55.00

Dell ST6000NM0034 1HT27Z-150 NWCCG 6TB SAS 3.5 7.2K ENTERPRISE SERVER DRIVE
$68.99

Toshiba 14TB MG07 MG07ACA14TEY 7.2K RPM SATA 6Gb/s 512e 3.5" Enterprise HDD
$339.00

Seagate 2.5" Barracuda 1TB SATA III 6Gbps HDD 2F110A-500
$19.99

Toshiba DT01ACA100 1 TB 3.5" SATA III 3.5 in Desktop Hard Drive
$24.99

New Western Digital WD40EFPX 68C6CN0 4TB 3.5" SATA III Internal NAS Red Plus HDD
$137.59