[lfs-support] Can't boot into LFS kernel.

Khoa Nguyen vankhoa011 at gmail.com
Wed Sep 12 05:27:31 PDT 2012

Hi Henrik,

Thank you very much. Your explanation is clear. I get a lot of knowledge
from you.
I've already made a initramfs as following:


And The computer boot into LFS kernel by UUID.

However, when it is booting, it don't know what is UUID or device to boot.

And go to sh shell ( busybox ) like you said.

I try to cat /etc/partitions but I don't see /dev/sdb1.
So I think the VMWARE has problem.

How do you think about it?

Thanks and Regards,
Khoa Nguyen.

On Wed, Sep 12, 2012 at 4:56 PM, Henrik /KaarPoSoft <henrik at kaarposoft.dk>wrote:

> On 09/12/12 05:03, Khoa Nguyen wrote:
>> Can you tell me more about busybox ?
>> What do you mean "busybox in an initramfs" ?
>> I understand that due to failed boot process because the kernel can't
>> mount the root file system to read /etc/inittab.
>> So we use busybox to mount manually . Right ?
>>  When the kernel boots, it mounts the root file system and executes
> /sbin/init from there.
> /sbin/init becomes process number one, and is responsible for system
> initialization (eg. running rc.d scripts and more).
> But the kernel does not understand boot=<uuid>, only
> boot=<path-to-device>, and if for some reason the kernel can not mount the
> root file system, you are stuck.
> Initramfs is a compressed archive of files. The initramfs file is read
> from disk by grub and passed to the kernel. The kernel is then mounting
> this (as a ramfs ) as the root filesystem and executes /sbin/init.
> See
> http://www.linuxfordevices.**com/c/a/Linux-For-Devices-**
> Articles/Introducing-**initramfs-a-new-model-for-**initial-RAM-disks/<http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/Introducing-initramfs-a-new-model-for-initial-RAM-disks/>
> http://lugatgt.org/content/**booting.inittools/downloads/**
> presentation.pdf<http://lugatgt.org/content/booting.inittools/downloads/presentation.pdf>
> http://kaarpux.kaarposoft.dk/**packages/l/linux.html<http://kaarpux.kaarposoft.dk/packages/l/linux.html>
> The /sbin/init in the initramfs can then do whatever is necessary to mount
> the real root filesystem from disk, and finally run /sbin/init on the real
> root file system. Or it can run a whole system directly from the initramfs,
> never touching your disk.
> My init file in the initramfs looks like this:
> http://sourceforge.net/p/**kaarpux/code/ci/HEAD/tree/**
> master/packages/l/linux.files/**init?force=True<http://sourceforge.net/p/kaarpux/code/ci/HEAD/tree/master/packages/l/linux.files/init?force=True>
> It basically mounts the /proc /sys and /dev special directories, finds the
> real root file system and mounts it, and finally executes /sbin/init on the
> real root file system.
> However, if something goes wrong (or if you specify busybox on the command
> line) it will drop into a /bin/sh shell from busybox.
> BusyBox combines tiny versions of many common UNIX utilities into a single
> small executable. It provides replacements for most of the utilities you
> usually find in GNU fileutils, shellutils, etc.
> See
> http://busybox.net/
> http://kaarpux.kaarposoft.dk/**packages/b/busybox.html<http://kaarpux.kaarposoft.dk/packages/b/busybox.html>
> My way of building the initramfs:
> http://kaarpux.kaarposoft.dk/**packages/l/linux.html<http://kaarpux.kaarposoft.dk/packages/l/linux.html>
> http://sourceforge.net/p/**kaarpux/code/ci/HEAD/tree/**
> master/packages/l/linux.yaml<http://sourceforge.net/p/kaarpux/code/ci/HEAD/tree/master/packages/l/linux.yaml>(line 128-145)
> Good luck...
> /Henrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20120912/1d66c3de/attachment.html>

More information about the lfs-support mailing list