Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Boot hangs at 2-3 seconds, Suspected to be INIT-related
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
beige sweatshirt
n00b
n00b


Joined: 22 Jan 2016
Posts: 6

PostPosted: Fri Jan 22, 2016 12:28 pm    Post subject: Boot hangs at 2-3 seconds, Suspected to be INIT-related Reply with quote

Hi all.
Unfortunately, it was too early in the boot process for /var/logs/log.rc to begin logging otherwise I'd post the full output of that.
For what it's worth, I noticed what I thought to be two anomalies. First, whenever I booted, I notice 'INIT: version 2.88 booting', shortly followed by 'INIT: No inittabs file found'.
Upon resetting and chrooting back in, I did some investigating on the inittabs file with the help of some friendly IRC users

A bit further up I also noticed that the kernel
'EXT4-fs (sdb2): couldn't mount as ext3 due to feature incompatibilities'
'EXT4-fs (sdb2): couldn't mount as ext2 due to feature incompatibilities'
'EXT4-fs (sdb2): mounted filesystem without journal. Opts: (null)'
VFS: Mounted root (ext4 filesystem) readonly on device 8:18
I can understand the feature incompatibilities (I didn't enable ext2 or 3 in my kernel), as well as the lack of journal (which was intentional), but I have no idea why it was trying to mount them as different filesystems nor why 'readonly'

If its of any help; I used 'efibootmgr --create --disk /dev/sdb --part 1 -L "Gentoo" -l "\efi\boot\bootx64.efi"' to allow my system to be booted as an EFISTUB (indeed, without initramfs).
and my potentially-relevant kernel parameters are:
[*] CONFIG_EFI
[*] CONFIG_EFI_STUB
[M] CONFIG_EFIVAR_FS
[M] CONFIG_EFI_VARS
[*] CONFIG_CMDLINE_BOOL
(root=/dev/sdb2) CONFIG_CMDLINE


Last edited by beige sweatshirt on Sat Jan 23, 2016 12:56 am; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Fri Jan 22, 2016 12:55 pm    Post subject: Reply with quote

If you have the inittab file, and when booting it doesn't see it, it might be because it is not seeing it really. Your disk is sdb so it mean you have more than one disk.
If you have another partition in sda2 that is also using ext4 (for /home or whatever), and the disks boot order is not the one you think it should.
You'll endup with your /home partition mount as your /, and of course, no initab in it.

Are you sure efi is not swapping sda and sdb when you ask it to boot from sdb? Are sda and sdb using the same controller?
(the trys to boot as ext2 and 3 are because you use ext4 driver to handle any ext fs versions, and the ro is normal).
Back to top
View user's profile Send private message
beige sweatshirt
n00b
n00b


Joined: 22 Jan 2016
Posts: 6

PostPosted: Fri Jan 22, 2016 7:20 pm    Post subject: Reply with quote

/ is currently the only partition mounted to /dev/sdb2, I do have my /boot mounted at /dev/sdb1 however.
One user suggested replacing my CONFIG_CMDLINE with the output of 'echo root=UUID=$(blkid -s UUID -o value /dev/sdb2)' (root=UUID=361f9da2-bfb4-4a4e-ac00-860891470f316) but this seemed to cause a kernel panic. Can you confirm if this is a valid way to specify root? If not, how else might I go about using persistent device naming as to avoid this ambiguity (preferably with partuuid's as I am not using lvm, and may consider re-sizing my partitions in the future)?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Sat Jan 23, 2016 10:05 am    Post subject: Reply with quote

here's a post i've made to understand naming of drives : https://forums.gentoo.org/viewtopic-t-1007788.html
the post doesn't cover itself partuuid naming, but steveL's last comment have link to NeddySeagoon (if you don't know him here, just call him God and you'll get the picture of who he is) tip on howto use partuuid to boot (that unlike uuid need nothing as the kernel handle it natively).

and you didn't get why i ask about disks number (and not partition numbering), if disks are swap you can try mounting the wrong disk, while you will never try to mount a wrong partition number as it is fix: if you try mounting sda3, you will never mistake to mount partition 3, but you may mistake and mount sdb3 instead of sda3 because it depend how disks are seen when booting. partuuid should solve that.
Back to top
View user's profile Send private message
beige sweatshirt
n00b
n00b


Joined: 22 Jan 2016
Posts: 6

PostPosted: Sat Jan 23, 2016 3:49 pm    Post subject: Reply with quote

Thanks for the detailed response krinn!
I changed my CONFIG_CMDLINE to (root=PARTUUID=foo), but no luck, still stuck in the same spot. :(
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Sat Jan 23, 2016 4:03 pm    Post subject: Reply with quote

beige sweatshirt,

The mount errors are not a cause for concern.
Code:
'EXT4-fs (sdb2): couldn't mount as ext3 due to feature incompatibilities'
'EXT4-fs (sdb2): couldn't mount as ext2 due to feature incompatibilities'
'EXT4-fs (sdb2): mounted filesystem without journal. Opts: (null)'


The kernel has to guess the root filesystem type. It tries ext3, ext2 and ext4 last. Until root is mounted it can't read /etc/fstab.
Add rootfs=ext4 to the kernel command line to remove the guesswork.

Read only allows rootfsck to be run without trashing the filesystem :)
Once this completes, root is remouted read/write.
You can see this in dmesg.

Make friends with wgetpaste. Post
grub.cfg,
/etc/fstab,
ls -l /boot
/sbin/blkid

Are you sure you are booting from the right drive?
I mean the BIOS loading the boot loader step, not the kernel and so on.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
beige sweatshirt
n00b
n00b


Joined: 22 Jan 2016
Posts: 6

PostPosted: Sat Jan 23, 2016 7:52 pm    Post subject: Reply with quote

I solved the problem
After 2.5 days of almost nonstop troubleshooting, I've learned /etc should be on the same partition as /.
...well this is embarrassing.

Thank you for your help anyways Neddy and krinn.
And thanks to iamben, konsolebox, and torgo from the IRC if you guys come across this.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Sat Jan 23, 2016 8:27 pm    Post subject: Reply with quote

beige sweatshirt,

Heh. That's one you won't forget ... init looks around for /etc/fstab ... tilt.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum