Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using my own kernel, initramfs problems with LVM root disk
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
zBrain
Apprentice
Apprentice


Joined: 14 Apr 2006
Posts: 182

PostPosted: Wed May 18, 2016 5:29 pm    Post subject: Using my own kernel, initramfs problems with LVM root disk Reply with quote

Preface: using a genkernel built kernel/initramfs I can use the system, so everything on that level is ok.

I built my own kernel, however, and subsequently used genkernel to generate an initramfs:

Code:
genkernel --lvm --mdadm iniramfs


The mdadm is probably unnecessary, my /home is on mdadm but my root drive is on my SSD.

The symptom is pretty simple, I get to "loading initramfs" after selecting it from grub2, and it stops.

My question is: how do I find out why it stops? Is there a way to debug an initramfs? A log somewhere?
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3137

PostPosted: Wed May 18, 2016 7:23 pm    Post subject: Reply with quote

What is your boot commad line?
You can debug from within initramfs. Simply add "debug" param to boot options.
What do you mean by "your own kernel"? Is it the same version as initramfs? Have you changed modules in the meantime? (between building initramfs and kernel)
Back to top
View user's profile Send private message
zBrain
Apprentice
Apprentice


Joined: 14 Apr 2006
Posts: 182

PostPosted: Wed May 18, 2016 7:40 pm    Post subject: Reply with quote

I just tried booting with debug enabled - it seems to not even get far enough in to do that.


Here's the grub entry:

Quote:

menuentry 'Gentoo GNU/Linux, with Linux 4.3.3' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.3.3-advanced-4d3dfdc5-31ba-4185-abea-81dc1a093809' {
load_video
insmod gzio
insmod part_gpt
insmod fat
set root='hd2,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt2 --hint-efi=hd2,gpt2 --hint-baremetal=ahci2,gpt2 21C6-E89E
else
search --no-floppy --fs-uuid --set=root 21C6-E89E
fi
echo 'Loading Linux 4.3.3 ...'
linux /vmlinuz-4.3.3 root=/dev/mapper/vg--gentoo-lv--root ro dolvm rootfstype=ext4
echo 'Loading initial ramdisk ...'
initrd /initramfs-genkernel-x86_64-4.3.3
}



There is an insmod lvm in grub's header portion as well
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed May 18, 2016 7:47 pm    Post subject: Reply with quote

zBrain,

Code:
linux /vmlinuz-4.3.3 root=/dev/mapper/vg--gentoo-lv--root ro dolvm rootfstype=ext4


You need lvm support to get root mounted but its not even getting that far, unless you omitted console support from the kernel.
It might be booting correctly but you just can't see it.

make friends with wgetpaste and use it to share your kernel .config
_________________
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
zBrain
Apprentice
Apprentice


Joined: 14 Apr 2006
Posts: 182

PostPosted: Wed May 18, 2016 7:59 pm    Post subject: Reply with quote

Interesting tool...

https://bpaste.net/show/6f5e2ef11772

Appreciate you taking the time to help.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed May 18, 2016 10:01 pm    Post subject: Reply with quote

zBrain

You have
Code:
# CONFIG_BLK_DEV_DM is not set
thats the kernel support for device mapper, otherwise LVM, so your kernel will never see the root filesystem.
<*> will work, <M> will work if the module is in your initrd.
That's actually a menu control. What you need inside the menu depends on the LVM features you use. A lot of the options are for testing.

I didn't ask for your lspci but the high level SCSI and AHCI options are there. That's suits most people today.

As you have CONFIG_VGA_CONSOLE=y and CONFIG_DRM_RADEON=m your kernel shoulh start on the text kernel, then switch to the Radeon framebuffer console once the module loads. If the module is in the initrd, that's fairly early in the boot process. If the module is missing from the initrd, you don't get the Radeon framebuffer console until root is mounted, which we have already said, isn't going to happen.

grub loads the compressed kernel, the initrd and jumps to the kernel entry address.
The first thing the kernel does is put the message "Decompressing Linux..." on the console. The kernel is still compressed when this happens, so its still a long way from mounting the initrd as the temporary root.

Do you see "Decompressing Linux..." on the console?

You have
Code:
# CONFIG_EFI is not set
that's OK as long as your BIOS is not in EFI mode.

Can you post your lspci please?
There are some more subtle ways to be missing console text, like you have multiple displays/video cards and the BIOS and kernel use different display surfaces.
_________________
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
zBrain
Apprentice
Apprentice


Joined: 14 Apr 2006
Posts: 182

PostPosted: Thu May 19, 2016 6:39 pm    Post subject: Reply with quote

I really thought you had nailed it. I updated my kernel config, ran make all && make install, then rebuilt my initramfs and ran grub2-mkconfig....

Same result. I get the echo from grub, then "Loading initramfs" then nothing. I do not get "Decompressing Linux"

This machine actually has nvidia cards in it. 2x 580 running SLI and 3 displays.

I am booting EFI, and added that as well.

My new .config:
https://bpaste.net/show/0d72a4a80fa2

lspci
Quote:

# lspci
00:00.0 Host bridge: Intel Corporation Xeon E5/Core i7 DMI2 (rev 07)
00:01.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 1a (rev 07)
00:02.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 2a (rev 07)
00:03.0 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 3a in PCI Express Mode (rev 07)
00:05.0 System peripheral: Intel Corporation Xeon E5/Core i7 Address Map, VTd_Misc, System Management (rev 07)
00:05.2 System peripheral: Intel Corporation Xeon E5/Core i7 Control Status and Global Errors (rev 07)
00:05.4 PIC: Intel Corporation Xeon E5/Core i7 I/O APIC (rev 07)
00:11.0 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Virtual Root Port (rev 05)
00:16.0 Communication controller: Intel Corporation C600/X79 series chipset MEI Controller #1 (rev 05)
00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 05)
00:1a.0 USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #2 (rev 05)
00:1b.0 Audio device: Intel Corporation C600/X79 series chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Root Port 1 (rev b5)
00:1c.1 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Root Port 2 (rev b5)
00:1c.2 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Root Port 3 (rev b5)
00:1c.3 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Root Port 4 (rev b5)
00:1c.7 PCI bridge: Intel Corporation C600/X79 series chipset PCI Express Root Port 8 (rev b5)
00:1d.0 USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #1 (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation C600/X79 series chipset LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation C600/X79 series chipset 6-Port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation C600/X79 series chipset SMBus Host Controller (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GF110 [GeForce GTX 580] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF110 High Definition Audio Controller (rev a1)
02:00.0 VGA compatible controller: NVIDIA Corporation GF110 [GeForce GTX 580] (rev a1)
02:00.1 Audio device: NVIDIA Corporation GF110 High Definition Audio Controller (rev a1)
06:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)
07:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller
08:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller
09:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9128 PCIe SATA 6 Gb/s RAID controller with HyperDuo (rev 11)
ff:08.0 System peripheral: Intel Corporation Xeon E5/Core i7 QPI Link 0 (rev 07)
ff:08.3 System peripheral: Intel Corporation Xeon E5/Core i7 QPI Link Reut 0 (rev 07)
ff:08.4 System peripheral: Intel Corporation Xeon E5/Core i7 QPI Link Reut 0 (rev 07)
ff:09.0 System peripheral: Intel Corporation Xeon E5/Core i7 QPI Link 1 (rev 07)
ff:09.3 System peripheral: Intel Corporation Xeon E5/Core i7 QPI Link Reut 1 (rev 07)
ff:09.4 System peripheral: Intel Corporation Xeon E5/Core i7 QPI Link Reut 1 (rev 07)
ff:0a.0 System peripheral: Intel Corporation Xeon E5/Core i7 Power Control Unit 0 (rev 07)
ff:0a.1 System peripheral: Intel Corporation Xeon E5/Core i7 Power Control Unit 1 (rev 07)
ff:0a.2 System peripheral: Intel Corporation Xeon E5/Core i7 Power Control Unit 2 (rev 07)
ff:0a.3 System peripheral: Intel Corporation Xeon E5/Core i7 Power Control Unit 3 (rev 07)
ff:0b.0 System peripheral: Intel Corporation Xeon E5/Core i7 Interrupt Control Registers (rev 07)
ff:0b.3 System peripheral: Intel Corporation Xeon E5/Core i7 Semaphore and Scratchpad Configuration Registers (rev 07)
ff:0c.0 System peripheral: Intel Corporation Xeon E5/Core i7 Unicast Register 0 (rev 07)
ff:0c.1 System peripheral: Intel Corporation Xeon E5/Core i7 Unicast Register 0 (rev 07)
ff:0c.2 System peripheral: Intel Corporation Xeon E5/Core i7 Unicast Register 0 (rev 07)
ff:0c.6 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 0 (rev 07)
ff:0c.7 System peripheral: Intel Corporation Xeon E5/Core i7 System Address Decoder (rev 07)
ff:0d.0 System peripheral: Intel Corporation Xeon E5/Core i7 Unicast Register 0 (rev 07)
ff:0d.1 System peripheral: Intel Corporation Xeon E5/Core i7 Unicast Register 0 (rev 07)
ff:0d.2 System peripheral: Intel Corporation Xeon E5/Core i7 Unicast Register 0 (rev 07)
ff:0d.6 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller System Address Decoder 1 (rev 07)
ff:0e.0 System peripheral: Intel Corporation Xeon E5/Core i7 Processor Home Agent (rev 07)
ff:0e.1 Performance counters: Intel Corporation Xeon E5/Core i7 Processor Home Agent Performance Monitoring (rev 07)
ff:0f.0 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Registers (rev 07)
ff:0f.1 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller RAS Registers (rev 07)
ff:0f.2 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 0 (rev 07)
ff:0f.3 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 1 (rev 07)
ff:0f.4 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 2 (rev 07)
ff:0f.5 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 3 (rev 07)
ff:0f.6 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Target Address Decoder 4 (rev 07)
ff:10.0 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 0 (rev 07)
ff:10.1 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 1 (rev 07)
ff:10.2 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 0 (rev 07)
ff:10.3 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 1 (rev 07)
ff:10.4 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 2 (rev 07)
ff:10.5 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller Channel 0-3 Thermal Control 3 (rev 07)
ff:10.6 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 2 (rev 07)
ff:10.7 System peripheral: Intel Corporation Xeon E5/Core i7 Integrated Memory Controller ERROR Registers 3 (rev 07)
ff:11.0 System peripheral: Intel Corporation Xeon E5/Core i7 DDRIO (rev 07)
ff:13.0 System peripheral: Intel Corporation Xeon E5/Core i7 R2PCIe (rev 07)
ff:13.1 Performance counters: Intel Corporation Xeon E5/Core i7 Ring to PCI Express Performance Monitor (rev 07)
ff:13.4 Performance counters: Intel Corporation Xeon E5/Core i7 QuickPath Interconnect Agent Ring Registers (rev 07)
ff:13.5 Performance counters: Intel Corporation Xeon E5/Core i7 Ring to QuickPath Interconnect Link 0 Performance Monitor (rev 07)
ff:13.6 System peripheral: Intel Corporation Xeon E5/Core i7 Ring to QuickPath Interconnect Link 1 Performance Monitor (rev 07)
Back to top
View user's profile Send private message
zBrain
Apprentice
Apprentice


Joined: 14 Apr 2006
Posts: 182

PostPosted: Sun May 22, 2016 10:35 pm    Post subject: Reply with quote

NeddySeagoon wrote:
zBrain

There are some more subtle ways to be missing console text, like you have multiple displays/video cards and the BIOS and kernel use different display surfaces.


Can anybody expound on this? I suspect this may be my issue.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon May 23, 2016 12:24 pm    Post subject: Reply with quote

zBrain,

The console output may be present but not on the display surface you are expecting it on.
With two graphics cards, I have seen the boot messages and grub on one card and the kernel console on another.
You have to connect two displays or move the display to the other card to see both with a single display.

SLI won't be in use until the nvida drivers get loaded and thats well into the boot process.
Even then, nvidia-drivers does not provide a console. You need plain old VGA Console.

Removing one graphics card meanwhile may be an easy debug option.
_________________
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
zBrain
Apprentice
Apprentice


Joined: 14 Apr 2006
Posts: 182

PostPosted: Thu Oct 27, 2016 11:09 pm    Post subject: Reply with quote

I am now having the same issue with newer genkernel builds. I plugged a monitor in to every output on the video cards and it is not booting on any of them. I've googled everything I can think of and tried countless variations of kernel configs. I've even tried poking through diffs on the working config vs mine to no avail.

Is there a way to get a log to see what's failing?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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