LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS appears to not boot (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-appears-to-not-boot-4175715877/)

budrz89 08-19-2022 07:32 PM

LFS appears to not boot
 
5 Attachment(s)
Hi everyone,

I just finished the latest stable LFS book and my LFS doesn't seem to be booting. I say "seem" because the keyboard appears to be responding (at least the caps lock light turns on or off when I press it) and my boot and dmesg logs seem to say that it's booting (unless I'm wrong about that).

After the grub menu, it would say

Code:

Loading Linux 5.19.1 ...
indefinitely.

Here are the packages that are installed

Code:

acl 2.3.1-1
attr 2.5.1-1
autoconf 2.71-1
automake 1.16.5-1
bash 5.1.16-1
bc 5.2.2-1
binutils 2.38-1
bison 3.8.2-1
bzip2 1.0.8-1
check 0.15.2-1
cmake 3.22.2-1
coreutils 9.0-1
curl 7.81.0-1
dejagnu 1.6.3-1
diffutils 3.8-1
docbook-xml 4.5-1
docbook-xsl 1.79.2-1
e2fsprogs 1.46.5-1
efibootmgr 17-1
efivar 38-1
eudev 3.2.11-1
expat 2.4.6-1
expect 5.45.4-1
file 5.41-1
findutils 4.9.0-1
flex 2.6.4-1
freetype 2.11.1-1
gawk 5.1.1-1
gcc 11.2.0-1
gdbm 1.23-1
gettext 0.21-1
glibc 2.35-1
gmp 6.2.1-1
gperf 3.1-1
graphite2 1.3.14-1
grep 3.7-1
groff 1.22.4-1
grub 2.06-1
gzip 1.12-1
harfbuzz 3.4.0-1
iana-etc 20220207-1
icu 70.1-1
inetutils 2.2-1
intltool 0.51.0-1
iproute2 5.16.0-1
kbd 2.4.0-1
kmod 29-1
less 590-1
lfs-bootscripts 20210608-1
libarchive 3.6.0-1
libcap 2.63-1
libelf 0.186-1
libffi 3.4.2-1
libpipeline 1.5.5-1
libpng 1.6.37-1
libtasn1 4.18.0-1
libtool 2.4.6-1
libuv 1.43.0-1
libxml2 2.9.13-1
libxslt 1.1.35-1
linux 5.19.1-1
linux-headers 5.19.1-1
linux-pam 1.5.2-1
lzo 2.10-1
m4 1.4.19-1
make 4.3-1
make-ca 1.10-1
man-db 2.10.1-1
man-pages 5.13-1
mandoc 1.14.6-1
meson 0.61.1-1
mpc 1.2.1-1
mpfr 4.1.0-1
ncurses 6.3-1
nghttp2 1.46.0-1
ninja 1.10.2-1
openssl 1.1.1q-1
p11-kit 0.24.1-1
p5-xml-parser 2.46-1
patch 2.7.6-1
pcre 8.45-1
perl 5.34.0-1
pkg-config 0.29.2-1
pkgutils 5.40.7-1
popt 1.18-1
procps 3.3.17-1
psmisc 23.4-1
python3 3.10.6-1
readline 8.1.2-1
sed 4.8-1
sgml-common 0.6.3-1
shadow 4.11.1-1
sysklogd 1.5.1-1
sysvinit 3.01-1
tar 1.34-1
tcl 8.6.12-1
texinfo 6.8-1
tzdata 2021e-1
unzip 6.0-1
util-linux 2.37.4-1
vim 9.0.0192-1
which 2.21-1
xz 5.2.5-1
zlib 1.2.12-1
zstd 1.5.2-1

I've attached some of the logs, fstab and my grub config file (I used grub-mkconfig to generate it). I thought maybe there was something wrong with my kernel config so I included that as well.

Let me know if there is anything that I can add or clarify.

frankbell 08-19-2022 07:58 PM

Try booting to a Live CD/USB of something and taking a look at the log files, particularly /var/log/boot.log. That may give you some hint as to what is going wrong.

budrz89 08-19-2022 09:30 PM

@frankbell, the boot.log from the previous post is the /var/log/boot.log, sorry if I didn't make that clear. Or do you mean the boot.log from the distro on the Live CD/USB?

My boot.log it is always ending with

Code:

Starting kernel log daemon... OK
and there aren't any more messages after that. In my sys.log (from /var/log), I am seeing

Code:

Inspecting /boot/System.map-5.19.1
Cannot find map file

message a lot which strange because System.map-5.19.1 is in my /boot directory along with my vmlinuz-5.19.1. I don't think I need a soft link to my System.map file since the book doesn't do that.

Could there be something wrong with my System.map file?

budrz89 08-20-2022 12:15 PM

I found that someone else had System.map problem years ago:

https://unix.stackexchange.com/quest...-find-map-file

But they still had kernel boot problems.

budrz89 08-20-2022 11:34 PM

Kernel now boots!!!!
 
2 Attachment(s)
Finally got it to boot and now I'm at the login prompt!

I'm not exactly sure what steps actually solved it but I spent an hour or so going through the lsmod and lspci from my host system, looking for what modules were loaded. So I configured my kernel with those modules, rebuilt the kernel and reinstalled the modules. Then I installed some Linux firmware (like what Arch Linux does) and created an initramfs using a script like from the BLFS book for loading the modules at boot as well as early loading of the microcode.

I wish I knew exactly what solved it but hey, it works now!

hazel 08-21-2022 10:24 AM

Congratulations! Very neat work.


All times are GMT -5. The time now is 04:31 PM.