Encountered a problem and dropping me to a shell when boot LFS 7.7
Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If the appropriate USB storage related stuff is now built in, then you may be able to boot it manually from a grub> prompt of the Debian system's GRUB menu as sort of a test to find out if it is even capable of booting. If you want to try that, then press "c" at the Debian boot menu to get a grub> prompt. Manually enter these two simple lines after you verify that the numbers are right (since I have no way to know that)...
Code:
linux (hd1,1)/boot/vmlinuz-3.19-lfs-7.7.1 root=/dev/sdb1 ro rootdelay=10
boot
For this test, the initrd.img line is not needed since the test uses only device names and since the USB storage stuff is built in. I do this all the time while working out things like this. It's okay to leave the UUIDs in the fstab (if they are accurate) because the kernel already will have accessed the filesystem for it to even read the fstab.
P.S.: Some related things just to keep in mind include that for "/boot" to be in the linux command line in grub.cfg, the entire system should be in one partition with /boot being a directory in that partition's filesystem. But if you have a separate boot partition, then don't use "/boot" in the linux command, and "root=" will mean different things in GRUB's "set" command and the kernel's "root=" parameter. Also remember that if other USB devices are plugged in, the device names can be different than expected, and sometimes GRUB and the operating system can see the same partition and name it differently (all reasons for using UUIDs or LABELs). I boot USB systems directly from a BIOS boot menu with GRUB in the USB drive MBR, and I often have to use (hd0,1) for GRUB and /dev/sdb1 for the kernel while testing and troubleshooting. Not that you need to do any of this stuff, just FYI.
P.P.S.: I forgot to mention that building-in the USB stuff requires building in some SCSI drivers, too. Probably most LFSers already have them built in. Anyway, just in case, I usually get by with selecting these...
SCSI device support CONFIG_SCSI=y
SCSI disk support CONFIG_BLK_DEV_SD=y
SCSI CDROM support CONFIG_BLK_DEV_SR=y
SCSI generic support CONFIG_CHR_DEV_SG=y
If the appropriate USB storage related stuff is now built in, then you may be able to boot it manually from a grub> prompt of the Debian system's GRUB menu as sort of a test to find out if it is even capable of booting. If you want to try that, then press "c" at the Debian boot menu to get a grub> prompt. Manually enter these two simple lines after you verify that the numbers are right (since I have no way to know that)...
Code:
linux (hd1,1)/boot/vmlinuz-3.19-lfs-7.7.1 root=/dev/sdb1 ro rootdelay=10
boot
For this test, the initrd.img line is not needed since the test uses only device names and since the USB storage stuff is built in. I do this all the time while working out things like this. It's okay to leave the UUIDs in the fstab (if they are accurate) because the kernel already will have accessed the filesystem for it to even read the fstab.
P.S.: Some related things just to keep in mind include that for "/boot" to be in the linux command line in grub.cfg, the entire system should be in one partition with /boot being a directory in that partition's filesystem. But if you have a separate boot partition, then don't use "/boot" in the linux command, and "root=" will mean different things in GRUB's "set" command and the kernel's "root=" parameter. Also remember that if other USB devices are plugged in, the device names can be different than expected, and sometimes GRUB and the operating system can see the same partition and name it differently (all reasons for using UUIDs or LABELs). I boot USB systems directly from a BIOS boot menu with GRUB in the USB drive MBR, and I often have to use (hd0,1) for GRUB and /dev/sdb1 for the kernel while testing and troubleshooting. Not that you need to do any of this stuff, just FYI.
P.P.S.: I forgot to mention that building-in the USB stuff requires building in some SCSI drivers, too. Probably most LFSers already have them built in. Anyway, just in case, I usually get by with selecting these...
SCSI device support CONFIG_SCSI=y
SCSI disk support CONFIG_BLK_DEV_SD=y
SCSI CDROM support CONFIG_BLK_DEV_SR=y
SCSI generic support CONFIG_CHR_DEV_SG=y
without initrd I have kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I have already SCSI drivers added in my kernel.
So nothing works
I guess that I will try to reinstall it from beginning, this time on a partition of hdd
Thanks you for help!
I have tried to copy and paste the entire LFS to a new partition on my HDD, I have changed grub.cfg and fstab, and I've tried to boot, but the problem is the same!
I really think that I will have to recompile everything once again!
I was going to suggest that idea, but I figured maybe you'd heard enough about this. Anyway, true enough, starting over is one option. Practice makes perfect. But I still don't think there is any proof yet that the system itself is busted. These matters so far are GRUB related and/or possibly kernel config related. True story: I compiled my first LFS kernel probably 30 times for various and many issues and problems. Honest to God. Nowadays, I never have to do that.
For example, that kernel panic can also be caused by forgetting to compile the kernel with CONFIG_DEVTMPFS=y. Not that you did that, but it happens here all the time. Another thing is overlooked storage drivers needed to access the hard drive. Study the lsmod and lspci -v output in the Debian system. Double-check that stuff in your LFS kernel config file. In fact, why not attach the whole config file to your next post. I, for one, am willing to diff it with mine. While you're at, and if you want to, post the grub.cfg and fstab again since that's all changed now, and the fdisk -l output. Maybe somebody will see something to change somewhere in all that.
Also, now that the LFS system is on a partition of the internal hard drive, you can get rid of the UUIDs everywhere and use direct device names in fstab and grub.cfg. After that, the initrd.img file will not be needed. All of that will simplify the matter and reduce points for error.
Ponder these things a while. Then maybe try booting it again with device names and a grub.cfg with just the set command and a basic simple linux command.
P.S.: Just in case it could be helpful, I attached the config notes that I used for the current kernel that I'm using. It's just a simple text file and sort of a chart, so it's best viewed with something with a monospace font for column alignment. I started it a long time ago and constantly add things that I learn about and edit it for changes in new kernel. It appears to be never-ending at this point.
I was going to suggest that idea, but I figured maybe you'd heard enough about this. Anyway, true enough, starting over is one option. Practice makes perfect. But I still don't think there is any proof yet that the system itself is busted. These matters so far are GRUB related and/or possibly kernel config related.
For example, that kernel panic can also be caused by forgetting to compile the kernel with CONFIG_DEVTMPFS=y. Not that you did that, but it happens here all the time. Double-check that in your config file. In fact, why not attach the whole config file to you next post. I, for one, am willing to diff it with mine. While you're at, and if you want to, post the grub.cfg and fstab again, and the fdisk -l output. Maybe somebody will see something to change somewhere in all that.
Also, now that the LFS system is on a partition of the internal hard drive, you can get rid of the UUIDs everywhere and use direct device names in fstab and grub.cfg. After that, the initrd.img file will not be needed. All of that will simplify the matter and reduce points for error.
Ponder these things a while. Then maybe try booting it again with device names and a grub.cfg with just the set command and a basic simple linux command.
P.S.: Just is case it could be helpful, I attached the kernel config notes that I use and often refer to.
Thank you in advance! I will try to check if my config file is right and I'll adjust it, then I'll try again
Anyway, here I upload my current .config file.
which fstab should I post? the one from my host system or the one from lfs? Or should they be the same thing?
Attach or post the fstab and grub.cfg from the LFS system. But the lsmod and lspci -v outputs from the Debian system could be informative.
I have no grub on LFS system because I use grub from debian, and this is the interested part of grub.cfg:
Code:
menuentry "GNU/Linux, Linux 3.19-lfs-7.7"{
set root=(hd0,4)
linux /boot/vmlinuz-3.19-lfs-7.7 root=UUID=7ba70c38-5943-4b71-872c-2ccc009a768a rootdelay=10 ro
initrd /boot/initrd.img-3.19.0
}
glukosio@Glukosio-PC:~$ lspci -v
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0
Capabilities: <access denied>
Kernel driver in use: agpgart-intel
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 02) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00004000-00004fff
Memory behind bridge: c4400000-c44fffff
Prefetchable memory behind bridge: 00000000a0000000-00000000afffffff
Capabilities: <access denied>
Kernel driver in use: pcieport
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0, IRQ 46
Memory at c0000000 (64-bit, non-prefetchable) [size=4M]
Memory at b0000000 (64-bit, prefetchable) [size=256M]
I/O ports at 5050 [size=8]
Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
Kernel driver in use: i915
00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0, IRQ 43
Memory at c4506100 (64-bit, non-prefetchable) [size=16]
Capabilities: <access denied>
Kernel driver in use: mei_me
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05) (prog-if 20 [EHCI])
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, medium devsel, latency 0, IRQ 16
Memory at c4505c00 (32-bit, non-prefetchable) [size=1K]
Capabilities: <access denied>
Kernel driver in use: ehci-pci
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0, IRQ 44
Memory at c4500000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
I/O behind bridge: 00003000-00003fff
Memory behind bridge: c3400000-c43fffff
Prefetchable memory behind bridge: 00000000c0400000-00000000c13fffff
Capabilities: <access denied>
Kernel driver in use: pcieport
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
I/O behind bridge: 00002000-00002fff
Memory behind bridge: c2400000-c33fffff
Prefetchable memory behind bridge: 00000000c1400000-00000000c23fffff
Capabilities: <access denied>
Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05) (prog-if 20 [EHCI])
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, medium devsel, latency 0, IRQ 21
Memory at c4505800 (32-bit, non-prefetchable) [size=1K]
Capabilities: <access denied>
Kernel driver in use: ehci-pci
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5) (prog-if 01 [Subtractive decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=04, subordinate=04, sec-latency=32
Capabilities: <access denied>
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, medium devsel, latency 0
Capabilities: <access denied>
Kernel driver in use: lpc_ich
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 05) (prog-if 01 [AHCI 1.0])
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 42
I/O ports at 5048 [size=8]
I/O ports at 505c [size=4]
I/O ports at 5040 [size=8]
I/O ports at 5058 [size=4]
I/O ports at 5020 [size=32]
Memory at c4505000 (32-bit, non-prefetchable) [size=2K]
Capabilities: <access denied>
Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
Subsystem: Hewlett-Packard Company Device 144a
Flags: medium devsel, IRQ 19
Memory at c4506000 (64-bit, non-prefetchable) [size=256]
I/O ports at 5000 [size=32]
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at c4504000 (64-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Kernel driver in use: intel ips
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Madison [Mobility Radeon HD 5650/5750 / 6530M/6550M] (prog-if 00 [VGA controller])
Subsystem: Hewlett-Packard Company Mobility Radeon HD 5650
Flags: fast devsel, IRQ 16
Memory at a0000000 (64-bit, prefetchable) [size=256M]
Memory at c4400000 (64-bit, non-prefetchable) [size=128K]
I/O ports at 4000 [size=256]
Expansion ROM at c4440000 [disabled] [size=128K]
Capabilities: <access denied>
Kernel driver in use: radeon
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Redwood HDMI Audio [Radeon HD 5000 Series]
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0, IRQ 45
Memory at c4420000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: snd_hda_intel
02:00.0 Network controller: Qualcomm Atheros AR9285 Wireless Network Adapter (PCI-Express) (rev 01)
Subsystem: Hewlett-Packard Company U98Z062.12 802.11bgn Wireless Half-size Mini PCIe Card
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at c3400000 (64-bit, non-prefetchable) [size=64K]
Capabilities: <access denied>
Kernel driver in use: ath9k
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0, IRQ 41
I/O ports at 2000 [size=256]
Memory at c1404000 (64-bit, prefetchable) [size=4K]
Memory at c1400000 (64-bit, prefetchable) [size=16K]
Expansion ROM at c1410000 [disabled] [size=64K]
Capabilities: <access denied>
Kernel driver in use: r8169
7f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0
7f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0
7f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0
7f:02.1 Host bridge: Intel Corporation 1st Generation Core Processor QPI Physical 0 (rev 02)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0
7f:02.2 Host bridge: Intel Corporation 1st Generation Core Processor Reserved (rev 02)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0
7f:02.3 Host bridge: Intel Corporation 1st Generation Core Processor Reserved (rev 02)
Subsystem: Hewlett-Packard Company Device 144a
Flags: bus master, fast devsel, latency 0
P.S.:I checked my .config and edited it looking at the file you've sent me, and tomorrow morning I'll compile it and try! Thank you very much, even if it will not work it will be a really useful file for the future
Your LFS kernel config has "CONFIG_ATA is not set". That provides Serial ATA and Parallel ATA drivers (libata) which your Debian system is loading as a module.
Your Debian system also is loading ahci and libahci modules which (according to cateee.net) are provided by CONFIG_SATA_AHCI which I believe will become available for selection when you enable CONFIG_ATA.
I recommend building-in all of those. You've already built in scsi_mod (CONFIG_SCSI=y), sg (CONFIG_CHR_DEV_SG=y) and sd_mod (CONFIG_BLK_DEV_SD=y).
These things may be all you need to adjust for just booting up. For now, try that and see if it helps or at least gets farther along.
Later, you can experiment with those as modules if you're going to stick with that initial ram filesystem. I just prefer to build-in the hard drive stuff and not have that initial ram filesystem.
P.S.: It probably isn't important at the moment for booting, but while you're in there looking at that SCSI stuff you also can select CONFIG_BLK_DEV_SR for sr_mod (cdrom).
P.P.S: You can get rid of the "access denied" in the lspci output by running that as root. Also try it as lspci -k for driver information. All that may be helpful now and later for untangling modules and drivers. This is only the beginning. Much more lies ahead even after it boots.
P.P.S: Get rid of the rootdelay thing. That is of no use now that the system is on an internal drive.
It's written against an older kernel, but layout hasn't changed much since then. It would be nice if someone could turn this document in a sticky forum thread just like the "Configuring Xorg" one.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.