Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED: NVMe device is only viewable in legacy boot mode
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
nulltheliteralnothing
n00b
n00b


Joined: 23 Feb 2024
Posts: 68

PostPosted: Sat Apr 27, 2024 10:43 pm    Post subject: SOLVED: NVMe device is only viewable in legacy boot mode Reply with quote

Hi Everyone,

I was doing a Gentoo install on an Alienware 13. Everything was going well until I did a grub-install and realized I was doing a UEFI build on a legacy bios boot.

I rebooted the machine in UEFI as I intended; however, the NVMe device is no longer listed in fdisk or lsblk.

I returned to legacy mode, and the devices are visible again.

Please note: I used cryptsetup Luks1 to encrypt the drive.

I am guessing that to get out of this scenario, I will need to

* remove the encryption
* change boot to UEFI
* rebuild partitions.


Last edited by nulltheliteralnothing on Mon Apr 29, 2024 1:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21714

PostPosted: Sat Apr 27, 2024 11:05 pm    Post subject: Reply with quote

If you cannot see the device while in UEFI mode, why would removing the encryption on the partition that you cannot see fix anything? Please boot into UEFI mode and post the full output of lsblk -a. If that does not show your NVMe drive, then pastebin the output of dmesg.
Back to top
View user's profile Send private message
nulltheliteralnothing
n00b
n00b


Joined: 23 Feb 2024
Posts: 68

PostPosted: Sat Apr 27, 2024 11:19 pm    Post subject: Reply with quote

Hu wrote:
If you cannot see the device while in UEFI mode, why would removing the encryption on the partition that you cannot see fix anything? Please boot into UEFI mode and post the full output of lsblk -a. If that does not show your NVMe drive, then pastebin the output of dmesg.


Sounds like a good plan. I will get back to you with the information.
Back to top
View user's profile Send private message
nulltheliteralnothing
n00b
n00b


Joined: 23 Feb 2024
Posts: 68

PostPosted: Sun Apr 28, 2024 12:43 am    Post subject: Reply with quote

Hu wrote:
If you cannot see the device while in UEFI mode, why would removing the encryption on the partition that you cannot see fix anything? Please boot into UEFI mode and post the full output of lsblk -a. If that does not show your NVMe drive, then pastebin the output of dmesg.


Sounds like a good plan. I will get back to you with the information.
Back to top
View user's profile Send private message
nulltheliteralnothing
n00b
n00b


Joined: 23 Feb 2024
Posts: 68

PostPosted: Sun Apr 28, 2024 3:53 pm    Post subject: Reply with quote

Hu wrote:
If you cannot see the device while in UEFI mode, why would removing the encryption on the partition that you cannot see fix anything? Please boot into UEFI mode and post the full output of lsblk -a. If that does not show your NVMe drive, then pastebin the output of dmesg.


Hi Hu,

Here is the pastebin: https://pastebin.com/H9qimE8u

Context:

The machine is a Alienware 13 r3.

The install is not operational, and I needed access to the internet. Thus, the log file is from Ubuntu LIVE, which feels odd on a Gentoo forum; however, the build on my /dev/nvme* is Gentoo.

The box originally had Windows, which the NVMe device worked.

I installed the staging files in a legacy BIOS mode.

I ran into an issue installing grub when I realized the UEFI was turned off during debugging.

I restored the default UEFI configuration.

The NVMe device is not visible. Modes: UEFI + Secureboot ON & UEFI + Secureboot OFF

Code:
ubuntu@ubuntu:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0     3G  1 loop /rofs
loop1    7:1    0     4K  1 loop /snap/bare/5
loop2    7:2    0  63.4M  1 loop /snap/core20/1974
loop3    7:3    0  73.9M  1 loop /snap/core22/858
loop4    7:4    0 237.2M  1 loop /snap/firefox/2987
loop5    7:5    0 349.7M  1 loop /snap/gnome-3-38-2004/143
loop6    7:6    0  12.3M  1 loop /snap/snap-store/959
loop7    7:7    0  91.7M  1 loop /snap/gtk-common-themes/1535
loop8    7:8    0 485.5M  1 loop /snap/gnome-42-2204/120
loop9    7:9    0  53.3M  1 loop /snap/snapd/19457
loop10   7:10   0   452K  1 loop /snap/snapd-desktop-integration/83
sda      8:0    1    15G  0 disk
├─sda1   8:1    1   4.7G  0 part /cdrom
├─sda2   8:2    1   4.9M  0 part
├─sda3   8:3    1   300K  0 part
└─sda4   8:4    1  10.3G  0 part /var/crash
                                 /var/log


The SATA block device is the USB with the Ubuntu Live image.

The NVMe device IS visible. Modes: Legacy BIOS + Secureboot OFF

Code:

ubuntu@ubuntu:~$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0     3G  1 loop /rofs
loop1         7:1    0     4K  1 loop /snap/bare/5
loop2         7:2    0  63.4M  1 loop /snap/core20/1974
loop3         7:3    0 485.5M  1 loop /snap/gnome-42-2204/120
loop4         7:4    0  73.9M  1 loop /snap/core22/858
loop5         7:5    0 237.2M  1 loop /snap/firefox/2987
loop6         7:6    0 349.7M  1 loop /snap/gnome-3-38-2004/143
loop7         7:7    0  91.7M  1 loop /snap/gtk-common-themes/1535
loop8         7:8    0  12.3M  1 loop /snap/snap-store/959
loop9         7:9    0  53.3M  1 loop /snap/snapd/19457
loop10        7:10   0   452K  1 loop /snap/snapd-desktop-integration/83
sda           8:0    1    15G  0 disk
├─sda1        8:1    1   4.7G  0 part /cdrom
├─sda2        8:2    1   4.9M  0 part
├─sda3        8:3    1   300K  0 part
└─sda4        8:4    1  10.3G  0 part /var/crash
                                      /var/log
nvme0n1     259:0    0 238.5G  0 disk
├─nvme0n1p1 259:1    0     1G  0 part
├─nvme0n1p2 259:2    0    32G  0 part
└─nvme0n1p3 259:3    0 205.5G  0 part


Code:
ubuntu@ubuntu:~$ lspci
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 05)
00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 05)
00:01.2 PCI bridge: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x4) (rev 05)
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 05)
00:14.0 USB controller: Intel Corporation 100 Series/C230 Series Chipset Family USB 3.0 xHCI Controller (rev 31)
00:14.2 Signal processing controller: Intel Corporation 100 Series/C230 Series Chipset Family Thermal Subsystem (rev 31)
00:16.0 Communication controller: Intel Corporation 100 Series/C230 Series Chipset Family MEI Controller #1 (rev 31)
00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 31)
00:1c.0 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #1 (rev f1)
00:1c.4 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #5 (rev f1)
00:1c.5 PCI bridge: Intel Corporation 100 Series/C230 Series Chipset Family PCI Express Root Port #6 (rev f1)
00:1f.0 ISA bridge: Intel Corporation HM175 Chipset LPC/eSPI Controller (rev 31)
00:1f.2 Memory controller: Intel Corporation 100 Series/C230 Series Chipset Family Power Management Controller (rev 31)
00:1f.3 Audio device: Intel Corporation CM238 HD Audio Controller (rev 31)
00:1f.4 SMBus: Intel Corporation 100 Series/C230 Series Chipset Family SMBus (rev 31)
01:00.0 VGA compatible controller: NVIDIA Corporation GP106M [GeForce GTX 1060 Mobile] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
3c:00.0 Ethernet controller: Qualcomm Atheros Killer E2500 Gigabit Ethernet Controller (rev 10)
3d:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 32)
Back to top
View user's profile Send private message
nulltheliteralnothing
n00b
n00b


Joined: 23 Feb 2024
Posts: 68

PostPosted: Sun Apr 28, 2024 8:28 pm    Post subject: Reply with quote

I was able to go into the UEFI boot menu, and select the /efi/gentoo etc.

The system will attempt to boot.

I will be asked to decrypt the drive, which works, and then I am given the “grub >” prompt, obviously as I didn’t finish the configuration.

I don’t know how this moves me forward outside of knowing that the drivers are accessible in UEFI mode, but thought this should be shared.

I am going to try booting the gentoo live environment and see if that allows me to finish the grub setup.
Back to top
View user's profile Send private message
nulltheliteralnothing
n00b
n00b


Joined: 23 Feb 2024
Posts: 68

PostPosted: Sun Apr 28, 2024 10:13 pm    Post subject: Reply with quote

Gentoo LiveCD didn’t work.

Code:

>> Mounting squashes filesystem
mount: mounting /dev/loop0 on /new root/mint/livecd failed: Invalid argument
!! Squashfs filesystem could not be mounted, dropping into shell.


I am confused about what the issue might be. I realize I could switch of a Legacy BIOS and it would work. I am, however, confused to why this is happening. Would love to know the reason. At minimum, I am hoping to learn a little more about NVMe block devices.

Works in Windows in UEFI, work in the UEFI boot, fails in Linux unless in Legacy. Gentoo Live won’t boot at all.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21714

PostPosted: Sun Apr 28, 2024 11:11 pm    Post subject: Reply with quote

The lspci shown above appears to be missing your NVMe device. However, I notice a RAID controller. Perhaps when you put the firmware in UEFI mode, it "helpfully" wraps your NVMe in an apparent RAID controller, and your Linux kernel configuration cannot handle that controller. Am I correct that even the Ubuntu LiveCD cannot access your NVMe when booted in UEFI mode?

Some UEFI firmware, particularly from early days, had weird bugs, because vendors were bad about testing only enough to get Windows to boot.
Back to top
View user's profile Send private message
nulltheliteralnothing
n00b
n00b


Joined: 23 Feb 2024
Posts: 68

PostPosted: Sun Apr 28, 2024 11:28 pm    Post subject: Reply with quote

Hu wrote:
The lspci shown above appears to be missing your NVMe device. However, I notice a RAID controller. Perhaps when you put the firmware in UEFI mode, it "helpfully" wraps your NVMe in an apparent RAID controller, and your Linux kernel configuration cannot handle that controller. Am I correct that even the Ubuntu LiveCD cannot access your NVMe when booted in UEFI mode?

Some UEFI firmware, particularly from early days, had weird bugs, because vendors were bad about testing only enough to get Windows to boot.


The RAID is “intel”; the NVMe device is Samsung. What I will do is boot the Ubuntu image in legacy and see the output of lspci to compare.

Yes, correct, the Ubuntu LiveCD only can see the NVMe device when booted in Legacy BIOS mode.

Here is the weird thing, it will boot off the drive. I just can’t access the device in any live environment to finish the install lol
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4244
Location: Bavaria

PostPosted: Sun Apr 28, 2024 11:49 pm    Post subject: Reply with quote

nulltheliteralnothing wrote:
The RAID is “intel”; [...]

Is the name in your UEFI BIOS: "Intel Volume Management Device" ? If yes, try to disable it.

(Normally it does not interfere as long as you have not additionally activated a RAID in the BIOS; I have the same option in my Gigabyte Z790; it needs later the kernel module "vmd"; but you can swtich off without any performance problem).
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
nulltheliteralnothing
n00b
n00b


Joined: 23 Feb 2024
Posts: 68

PostPosted: Mon Apr 29, 2024 12:36 am    Post subject: Reply with quote

pietinger wrote:
nulltheliteralnothing wrote:
The RAID is “intel”; [...]

Is the name in your UEFI BIOS: "Intel Volume Management Device" ? If yes, try to disable it.

(Normally it does not interfere as long as you have not additionally activated a RAID in the BIOS; I have the same option in my Gigabyte Z790; it needs later the kernel module "vmd"; but you can swtich off without any performance problem).


I couldn’t find any reference to RAID in my UEFI or BIOS manager.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21714

PostPosted: Mon Apr 29, 2024 12:57 am    Post subject: Reply with quote

Booting from the drive proves that the firmware knows how to read the drive while in UEFI mode. That does not help the Linux kernel, which needs to be able to read the drive in order to access partitions, unlock LUKS, etc.
Back to top
View user's profile Send private message
nulltheliteralnothing
n00b
n00b


Joined: 23 Feb 2024
Posts: 68

PostPosted: Mon Apr 29, 2024 1:19 am    Post subject: Reply with quote

You both where right.

It was the RAID.

I did, eventually, find the RAID setting and disabling the RAID in the UEFI did indeed allow the NVMe device to show up in UEFI mode. I was able to successfully install grub into my /efi.

Really appreciate all the help.
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