------------------------------
Message: 2
Date: Wed, 21 Jan 2015 08:50:39 -0500
From: <[email protected]>
To: <[email protected]>
Subject: [lfs-support] Progress, But LFS Still Fails To Boot
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"
You managed to get lubuntu booting by using the rescue disk, so I suggest
you get back to that situation, boot lubuntu, then _copy_ the LFS kernel
(only) to your lubuntu system and add the menu entry to lubuntu's grub.cfg.
Then, try booting LFS again. Getting a grub rescue prompt is not common,
perhaps the LFS and lubuntu grub files conflicted with each other.
*************
As described above, I copied vmlinuz-3.16.2-lfs-7.6 to lubuntu's sda1 /boot
dir. Then modified lubuntu's grub.cfg (section 40_custom) as shown below:
menuentry "GNU/Linux, Linux 3.16.2-lfs-7.6" {
insmod part_msdos
insmod ext2
set root=(hd0,1)
linux /boot/vmlinuz-3.16.2-lfs-7.6 root=/dev/sda3 ro
}
When powering up grub allows me to select which kernel to load. However,
when I select the LFS option the kernel appears to start but then delivers a
kernel panic and recommends adding an init file. I then copied the
System.map-3.16.2 file to lubuntu's /boot dir also but that made no
difference. My understanding is that even if the initramfs source is ""
(empty) like below, the kernel will still produce one. Just don't seem to
be able to get it working.
kernel .config contains these settings:
Generic Driver Settings:
#CONFIG_UEVENT_HELPER is not set
CONFIG_DEVTMPFS=y
Also....
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_DEVTMPFS_MOUNT=y
Richard
*************
------------------------------
Message: 3
Date: Wed, 21 Jan 2015 15:21:49 +0100
From: "Armin K." <[email protected]>
To: LFS Support List <[email protected]>
Subject: Re: [lfs-support] Progress, But LFS Still Fails To Boot
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
On 21.1.2015 14:50, [email protected] wrote:
> You managed to get lubuntu booting by using the rescue disk, so I
suggest
> you get back to that situation, boot lubuntu, then _copy_ the LFS kernel
> (only) to your lubuntu system and add the menu entry to lubuntu's
grub.cfg.
> Then, try booting LFS again. Getting a grub rescue prompt is not common,
> perhaps the LFS and lubuntu grub files conflicted with each other.
>
> *************
> As described above, I copied vmlinuz-3.16.2-lfs-7.6 to lubuntu's sda1
/boot
> dir. Then modified lubuntu's grub.cfg (section 40_custom) as shown below:
>
> menuentry "GNU/Linux, Linux 3.16.2-lfs-7.6" {
> insmod part_msdos
> insmod ext2
> set root=(hd0,1)
>
> linux /boot/vmlinuz-3.16.2-lfs-7.6 root=/dev/sda3 ro
> }
>
> When powering up grub allows me to select which kernel to load. However,
> when I select the LFS option the kernel appears to start but then delivers
a
> kernel panic and recommends adding an init file. I then copied the
> System.map-3.16.2 file to lubuntu's /boot dir also but that made no
> difference. My understanding is that even if the initramfs source is ""
> (empty) like below, the kernel will still produce one. Just don't seem to
> be able to get it working.
>
> kernel .config contains these settings:
> Generic Driver Settings:
> #CONFIG_UEVENT_HELPER is not set
> CONFIG_DEVTMPFS=y
>
> Also....
>
> CONFIG_BLK_DEV_INITRD=y
> CONFIG_INITRAMFS_SOURCE=""
> CONFIG_DEVTMPFS_MOUNT=y
>
> Richard
>
> *************
>
Kernel panic like that comes from kernel not being able to mount the
rootfs or being able to mount rootfs, but not being able to execute
/sbin/init for some reason.
To solve the first problem, you need to reconfigure your kernel to
include (include, not as module) disk and filesystem drivers that your
root partition resides on. The following document may help you achieve
that, as well as your host's lsmod output:
http://www.linuxfromscratch.org/~krejzi/basic-kernel.txt
If the second part is true, which is not very likely, you need to check
whether the /sbin/init in your LFS installation is a valid executable
and is linked to valid libraries. Not so long ago I've managed to get
"could not execute /sbin/init" because I've built 64 bit system but
somehow managed to deselect the "64 bit" in the kernel configuration,
thus building a 32 bit kernel while the userspace was 64 bit.
------------------------------
Despite very methodical editing of the kernel configuration I'm still
getting the kernel panic. I downloaded the "basic-kernel.txt document shown
above and rebuilt the kernel completely fresh carefully checking off each
section of the document as I enabled the required parameter. I used the
"lspci -K" command to identify drivers on the functioning Lubuntu host and
to my knowledge was able to enable every one. Also got the SCSI disks, file
systems (built-in), SATA controllers, USB. Only thing I didn't enable was
support for VMWare because I'm building on bare metal. All the manually
selected options used built-in drivers, not loadable modules.
After getting the kernel panic on my original development system I thought
perhaps the 10 year old Dell motherboard was just too old to be supported so
I copied the disk and rebuilt the kernel for a 3 year old system using an
Intel P67-based Gigabyte motherboard. Again I used "lspci -K", "lsmod" to
customize the kernel for that system and got the same result, "devtempfs:
error mounting -2" message immediately after "Mounted root (ext4 filesystem)
readonly on 8:3. (link below)
With LFS's grub as a menuentry in Lubuntu's grub.cfg the "MY Dell LFS" entry
does appear in the boot menu and when it's selected it displays stream of
numbers then 4 penguins at the top of the page, then further processing
then.... , "devtempfs: error mounting -2".
It's worth noting that to copy the newly configured vmlinuz file from my
sda3 (LFS) to sda1's /boot (Lubuntu Host) I mount a FAT USB to LFS and copy
the vmlinuz to the USB, then remove it, mount the USB to the host and copy
the files and ensure the owner/permissions are correct.
I've rebuilt the kernel many times on two different machines, each time
carefully checking-off the list. It's possible I could omit the same
parameter for each machine's kernel but the similar errors on both machines
suggest something is wrong common to both setups. As a reminder, my Lubuntu
host is sda1 with the functioning /boot dir and my LFS is sda3. I've not
yet implemented any steps in the LFS errata document. The kernel's 64 bit
target looks good.
After a new kernel is built I skip grub-install as the Lubuntu host already
boots. I copy (not move) the vmlinuz.xxxx file to Lubuntu's /boot as
described above and with Lubuntu's grub.cfg edited it appears to be ready to
go, but then not.
Attached are links to relevant files:
(LFS fstab) - http://identitysecurityprivacy.org/fstab.png
(lspci output) - http://identitysecurityprivacy.org/lspci.html
(lsmod output) - http://identitysecurityprivacy.org/lsmod.html
(LFS sda3 grub.cfg) - http://identitysecurityprivacy.org/grub_sda3-lfs.html
(Lubuntu's sda1 grub with LFS menuentry) -
http://identitysecurityprivacy.org/grub_sda1boot.html
(kernel panic screenshot) -
http://identitysecurityprivacy.org/kernel_panic.png
I hope these are useful to help identify what I've missed.
Thanks in advance,
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style