[blfs-dev] initramfs

Bruce Dubbs bruce.dubbs at gmail.com
Tue Feb 21 17:51:28 PST 2012


Jeremy Huntwork wrote:

> As an example, look at this init:
> 
> https://github.com/jhuntwork/LightCube-OS/blob/master/packages/mkinitramfs/init.in
> 
> And the script that creates the image:
> 
> https://github.com/jhuntwork/LightCube-OS/blob/master/packages/mkinitramfs/mkinitramfs.orig

Very interesting.  I took your scripts and hacked them a bit.  I set it 
up so that if you specify the /lib/modules/version directory, it 
includes the kernel modules.  If not, it creates initrd.img-no-kmods for 
a generic initrd.  I removed the CD portions of the scripts.

I was able to use

menuentry "BLFS Dev (LFS-7.0-Feb14) initrd, Linux 3.0.4" {
    linux   /vmlinuz-3.0.4-lfs-20120214 
root=UUID=54b934a9-302d-415e-ac11-4988408eb0a8 ro
    initrd /initrd.img-no-kmods
}

and it worked the first time.

One interesting thing is that the system I set up did not need the 
initrd.  With the initrd, the kernel said it took 9.5 seconds to get to 
the first boot script.  Without the initrd it was 4.0 seconds.

The other entry was:

menuentry "BLFS Dev (LFS-7.0-Feb14), Linux 3.0.4" {
         linux   /vmlinuz-3.0.4-lfs-20120214 root=/dev/sda8 ro
}


   -- Bruce
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: init.in
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-dev/attachments/20120221/b39acd5f/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mkinitramfs-test
URL: <http://lists.linuxfromscratch.org/pipermail/blfs-dev/attachments/20120221/b39acd5f/attachment-0001.ksh>


More information about the blfs-dev mailing list