LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   STUCK at first boot: LFS v9.0 First Boot Dell Inspiron 1545 Laptop (https://www.linuxquestions.org/questions/linux-from-scratch-13/stuck-at-first-boot-lfs-v9-0-first-boot-dell-inspiron-1545-laptop-4175662230/)

bgii2000 10-08-2019 03:04 PM

STUCK at first boot: LFS v9.0 First Boot Dell Inspiron 1545 Laptop
 
First time poster, first time builder! LQ.org has been a great help along way. I've put distros on my machines before, wanted to try to build from scratch on a spare machine I had laying around.

Specs on the machine:
Code:

Pentium T4400 @2.20Ghz 1067Ah "Penryn"
2 x 2G 800Mhz Dimms (4G DDR2 RAM)
82801M ICH9-M Southbridge Dell BIOS A13
GM45 Intel Integrated Video BIOS 1706, 32MB RAM
15.6" Display, 1366x768 Native display
IDT 92HD71 Audio
Broadcom BCM 4312 802.11b/g
500GB Disk, ICH9M E/M SATA AHCI controller
Alps Electric PS2 Mouse Glidepoint PNP0F13
Keyboard (Up Arrow and colon YUNO WORK?) [USB keyboard works fine]
ICH9 Family USB Controller

Target triplet: x86_64-pc-linux-gnu
Linker: lib64/ld-linux-x86-64.so.2
UEFI: No

I'm building LFS 9.0 for this machine, everything very basic, sticking with defaults where possible. I also went ahead and built the "useful" BLFS tools at the end of the book (like linx, openssh, wget, etc) and their dependencies, and recompiled the kernel with necessary support.

I installed grub to the MBR successfully, and when I rebooted the machine, I was greated with a grub menu, showing my LFS install on /dev/sda2/. Either highlighting it and pressing enter, or just waiting for the time out results in what appears to be the kernel loading. It goes by incredibly fast, I can't read any of it. Then the resolution changes to a larger one from whatever the boot default is. This is successful. No frequency out of range errors. It keeps on doing its thing for a couple more seconds then stops here (forgive any typos, I wrote this by hand, not sure how to get a log at this point):
Code:

[ 2.484186]input: AlpsPS/2 ALPS Glidepoint as /devices/platform/i8042/serio2/input/input10
[ 2.735091]ata6: SATA link down (SStatus 0 SControl 300)
[ 2.736567]md: Waiting for all devices to be available before autodetect
[ 2.738025]md: If you don't use raid, use raid=noautodetect
[ 2.739674]md: Autodetecting RAID arrays.
[ 2.741125]md: autorun ...
[ 2.742541]md: ... autorun DONE.
[ 2.816421]EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[ 2.817899]VFS: Mounted root (ext4 filesystem) with readonly on device 8:2.
[ 2.860037]devtmpfs: mounted
[ 2.862087]Freeing unused kernel image memory: 1320K
[ 2.863660]Write protecting the kernel read-only data: 20480K
[ 2.866408]Freeing unused kernel image memory: 2008K
[ 2.868505]Freeing unused kernel image memory: 956K
[ 2.870026]Run /sbin/init process as init process
INIT: version 2.95 booting
[ 3.487459]random: crng init done
[ 3.489065]stty (129) used greatest stack depth: 13368 bytes left
 * Mounting virtual file systems: /run /proc /sys
[]grep (168) used greastest stack depth: 13096 bytes left
  Bringing up loopback interface... [ 4.319558] ip (181) used greatest stack depth: 11944 bytes left
 *
 * Setting hostname to Blacktop...
Populating /dev with device nodes... [ 4.463904] udevd[206]: starting version 3.2.8
[ 4.785677] udevd[207]: starting eudev-3.2.8
[ 5.030691] sky2 0000:09:00.0 enp9s0: renamed from eth0
[ 5.129055] mousedev:PS/2 mouse device common for all mice
 /dev/sdb: open failed: No medium found
 *
  Activating all swap files/partitions...[ 6.603241] Adding 2047996k swap on /dev/sda3.
 *
  Mounting root filesystem in read-only mode... [ 6.651602] EXT4-fs (sda2): re-mounted.
 *
 * Checking file systems...
  Remounting root file system in read-write mode...[ 6.814588] EXT4-fs (sda2): re-mounted.
 *
 * Mounting remaining filesystems...
 * Cleaning file systems: /tmp
/etc/rc.d/rcS.d/S45cleanfs: line 108: /dev/null: permission denied
  Retrying failed uevents, if any...[ 6.945742] udevd[343]: open /dev/null failed: No such file or directory
/etc/rc.d/init.d/rc: line 222: /dev/null: Permission denied

The machine is not hung, just stopped with no interactive prompt. Pluging in USB devices results in messages printed to the console about the devices. Sticking a USB stick in with a live copy of mint, rebooting, and mounting my root partition, /dev/null exists and fstab shows /dev/sda2 mounted with "defaults" which should not contain "nodev"

I followed the steps really, really carefully.

Any ideas, or is it back around for another run?

EDIT: Here's a gem: https://www.thegeekstuff.com/2011/02/linux-boot-process

So, I shouldn't be googling "S45cleanfs permission denied" I should google, "init startup cleanfs permission denied". The game's afoot!

EDIT 2: Can I just put a chmod command on line 107 in the inittab file?

Keith Hedger 10-09-2019 05:15 AM

Looks like you haven;t done this bit:
Code:

mkdir -v {dev,proc,sys,run}
mknod -m 600 dev/console c 5 1
mknod -m 666 dev/null c 1 3

Here:
http://www.linuxfromscratch.org/lfs/...06/kernfs.html

bgii2000 10-09-2019 05:06 PM

Like the OP said, /dev/null node definitely exists. It also appears to have the correct permissions and is owned by root. All of the VFS directories exist. I really didn't skip that step, I promise.

Keith Hedger 10-09-2019 05:21 PM

U seem to have a lot /dev related failures maybe udev is broken?

Keith Hedger 10-09-2019 05:28 PM

If you look at the files that r causing the problem both errors come from redirecting to /dev/null it almost certainly isn't being created properly

bgii2000 10-09-2019 05:53 PM

A lot of udev failures? I only see one. How can I find out what's going on with /dev/null at boot? It looks fine from a rescue stick.

Keith Hedger 10-09-2019 06:02 PM

try booting to a different medium usb/cd etc check that delete every thing in dev and remake the null and console nodes, stat the nodes before and after and post them so WE know what their status is

bgii2000 10-09-2019 06:30 PM

stat the nodes?

bgii2000 10-09-2019 07:49 PM

Before replacing the nodes:

Code:

~$ stat null
 File: null
 Size: 0              Blocks: 0          IO Block: 4096  character special file
Device: 802h/205d      Inode: 652803      Links: 1    Device type: 1,3
Access: (0666/crw-rw-rw-)  Uid: (    0/    root)  Gid: (    0/    root)
Access: 2019-09-26 06:59:03.729108917 +0000
Modify: 2019-09-26 06:59:03.729108917 +0000
Change: 2019-10-08 09:00:05.486456007 +0000
 Birth: -

~$ stat console
 File: console
 Size: 0              Blocks: 0          IO Block: 4096  character special file
Device: 802h/205d      Inode: 652802      Links: 1    Device type: 5,1
Access: (0600/crw-------)  Uid: (    0/    root)  Gid: (    0/    root)
Access: 2019-09-26 06:58:52.064815954 +0000
Modify: 2019-09-26 06:58:52.064815954 +0000
Change: 2019-10-08 09:00:43.550644757 +0000
 Birth: -

After replacing the nodes:

Code:

~$ stat null
 File: null
 Size: 0              Blocks: 0          IO Block: 4096  character special file
Device: 802h/205d      Inode: 652803      Links: 1    Device type: 1,3
Access: (0666/crw-rw-rw-)  Uid: (    0/    root)  Gid: (    0/    root)
Access: 2019-10-10 00:44:41.669467192 +0000
Modify: 2019-10-10 00:44:41.669467192 +0000
Change: 2019-10-10 00:44:41.669467192 +0000
 Birth: -

~$ stat console
 File: console
 Size: 0              Blocks: 0          IO Block: 4096  character special file
Device: 802h/205d      Inode: 652802      Links: 1    Device type: 5,1
Access: (0600/crw-------)  Uid: (    0/    root)  Gid: (    0/    root)
Access: 2019-10-10 00:44:16.905344393 +0000
Modify: 2019-10-10 00:44:16.905344393 +0000
Change: 2019-10-10 00:44:16.905344393 +0000
 Birth: -


Keith Hedger 10-10-2019 05:59 AM

All looks fine the only thing I can think of is have you set these in your kernel config
Code:

CONFIG_UEVENT_HELPER=y
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y

And this in /etc/fstab
Code:

devtmpfs /dev devtmpfs mode=0755,nosuid 0 0

bgii2000 10-10-2019 03:21 PM

I used defconfig to start, then menuconfig for making changes while building the kernel. Where should I look for those options? Aaaaand, lemme go check on the that fstab line...

Keith Hedger 10-10-2019 04:43 PM

Try
Code:

gunzip < /proc/config.gz > /path/to/config
to get the configuration of the host machine, you should do this from the host you are building lfs on, you could also grab the slackware huge-config which covers just about everything, not at my machine now so can't help with where the config options are, you can of course edit the kernel config file with a text editor and then load it into the kernel menu config dialog.

bgii2000 10-12-2019 05:43 PM

AHA! devpts was mounted at /dev instead of /dev/pts

Boots to login now!


All times are GMT -5. The time now is 05:28 PM.