You are not logged in.

#1 2016-07-18 22:37:20

waeh
Member
Registered: 2016-05-16
Posts: 18

UEFI - how to boot with a nvme drive

Hello all!

I think i'm slowly slippering into madness trying to install arch. From the beginning it was a way for me to show myself I could handle the more difficult distros, now i'm this close of installing MS 10 (fuck me, right).

A couple of whiskeys later, for the anger, here I am, begging for help.

I've been trying to boot my frekkin' os via efi but it won't work.

I've tried efibootmgr directly, grub and systemd-boot but none of the efibootmgr entries works like expected.

Theres a previous post about nvme drives not compatible with efibootmgr https://bbs.archlinux.org/viewtopic.php?id=214733

I don't know what information the masters of Arch wants from me, so i'll just wait for your questions and try to answers as accurate as possible.

over and out...

Offline

#2 2016-07-18 22:46:39

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: UEFI - how to boot with a nvme drive

I'm using grub with EFI booting an NVMe drive without issue.  The trick for grub is to use grub-git from the AUR which may or may not be mentioned on the wiki page (can't check right now).  After install that, just follow the grub wiki page to setup the system.  For reference:

% lsblk -f
nvme0n1                                                             
├─nvme0n1p1 vfat               A1C7-E363                            
├─nvme0n1p2 ext4        boot   6434779b-7e53-4caa-b17e-c52c98195eab /boot
├─nvme0n1p3 ext4        system 8a84e174-b825-4890-97e3-08fa1e0fdb11 /
...

/boot is p2 and /boot/efi is p1

Last edited by graysky (2016-07-18 22:47:57)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2016-07-18 22:51:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: UEFI - how to boot with a nvme drive

First, speaking from my own experience, I would not try it a couple whiskeys in.  [1]
Second, let's pick one method and focus on it.  I suggest systemd-boot.

What is the state of your system?  Have you installed the base system and are just stuck at the bootloader installation?
Can you chroot into your system from the install media? https://wiki.archlinux.org/index.php/Change_root
What are the output of lsblk  and fdisk -l
?


Edit:  Posted at the same time as graysky . Let's follow their lead.
Edit 2:  [1] Some of us are better at this than others: https://bbs.archlinux.org/viewtopic.php … 5#p1641725  wink

Last edited by ewaller (2016-07-18 22:56:00)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2016-07-19 20:37:24

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: UEFI - how to boot with a nvme drive

waeh wrote:

I've tried efibootmgr directly, grub and systemd-boot but none of the efibootmgr entries works like expected

Please post the actual commands and configuration files used rather than vague descriptions.

graysky wrote:

The trick for grub is to use grub-git from the AUR

I have no personal experience of NVMe drives but it is my understanding that the stock GRUB package in Arch has supported such devices since March 2016.

See https://bugs.archlinux.org/task/47447

Offline

#5 2016-07-24 17:10:29

unable757
Member
Registered: 2016-04-03
Posts: 39

Re: UEFI - how to boot with a nvme drive

I saw this video http://gloriouseggroll.tv/arch-linux-efi-install-guide/

Installation on nvme drive ( UEFI ) .
Maybe this can help.

Offline

#6 2016-07-24 21:56:48

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Offline

#7 2016-08-01 00:04:19

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

Been out sailing for a couple of days and are about to try it again. Saw the day after that I have'nt read the whole guide for installing grub completely, just the UEFI systems part so I guess i'll try that (grub-git and follow the whole guide). Will let you know how it all went.

I'm terribly sorry Head_on_a_stick, what commands do you want me to post? All of them?

Offline

#8 2016-08-01 00:47:21

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

Okey tried again and this time I have something more concrete for you.

After the installation of grub I tried the grub-install --target=i386-pc /dev/sdX
but gets the error: Unable to identify a filesystem in hostdisk//dev/sdX: Safety check can't be performed.

There's no file system. But in the guide for GPT systems it says:
"Create a mebibyte partition (+1M with fdisk or gdisk) on the disk with no file system and with partition type BIOS boot."

Why is it that the guide doesn't seem to be correct in this stage of the grub-installation?

Offline

#9 2016-08-01 01:11:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,662

Re: UEFI - how to boot with a nvme drive

Those are the instructions for BIOS systems,  there are more apt instructions for UEFI systems one big article section further down. But as mentioned and this might be a bit of a road block for someone new, you have to use the grub-git package from AUR and can't just install grub as it comes from the repos (maybe the current beta in testing is advanced far enough to include nvme support so that might be worth a try). If you aren't dead set on using GRUB it might be worth a try to start with e.g. systemd-boot instead, which is readily available and does include NVME support in the version that's in the repos

Online

#10 2016-08-01 10:59:23

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

V1del wrote:

If you aren't dead set on using GRUB it might be worth a try to start with e.g. systemd-boot instead, which is readily available and does include NVME support in the version that's in the repos

The step that I got stuck on when I tried to install systemd-boot (https://wiki.archlinux.org/index.php/Sy … t#EFI_boot) was:

4. Copy your kernel and initramfs onto that ESP.

Can someone explain to me how this is done?

And then configuration (https://wiki.archlinux.org/index.php/Sy … figuration) seems a bit complex, anyone care to explain the broad terms so that i understand what i'm doing here?

Thanks for all your help!

Offline

#11 2016-08-01 20:29:31

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: UEFI - how to boot with a nvme drive

waeh wrote:

The step that I got stuck on when I tried to install systemd-boot (https://wiki.archlinux.org/index.php/Sy … t#EFI_boot) was:

4. Copy your kernel and initramfs onto that ESP.

Can someone explain to me how this is done?

If /boot is mounted to the ESP then the kernel image & initramfs should already be there.

Please provide detailed information about your mount points during the installation process.

what commands do you want me to post? All of them?

Yes please.

If you didn't mount /boot to the EFI system partition then do that now and re-install the linux package to place the files on the ESP.

EDIT: If you aren't using a GPT disk then you will have to add an fstab entry for /boot as well.

EDIT2: And for the second time:

I wrote:

the stock GRUB package in Arch has supported [NVMe] devices since March 2016.

https://bugs.archlinux.org/task/47447

EDIT3: Or is it?
https://bbs.archlinux.org/viewtopic.php … 5#p1644855

Last edited by Head_on_a_Stick (2016-08-01 20:33:50)

Offline

#12 2016-08-01 21:27:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,662

Re: UEFI - how to boot with a nvme drive

I'd assume it should support it now with the new release that has now landed in core, the package hasn't been touched since something in 2015 before

Online

#13 2016-08-01 22:15:52

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: UEFI - how to boot with a nvme drive

Head_on_a_Stick wrote:

I have no personal experience of NVMe drives but it is my understanding that the stock GRUB package in Arch has supported such devices since March 2016.

See https://bugs.archlinux.org/task/47447

I can verify that core/grub 1:2.02.beta3-1 boots my NVMe drive just fine.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#14 2016-08-02 11:02:50

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

Head_on_a_Stick wrote:

If /boot is mounted to the ESP then the kernel image & initramfs should already be there.

I re-did the installation and the /boot folder is empty; after I created the partitions with gdisk I run the commands:
mount /dev/nvme0n1p1 /boot

Head_on_a_Stick wrote:

Please provide detailed information about your mount points during the installation process.

I did a cat /proc/mounts and found the partitions nvme0n1p1 to be mounted on the /boot folder.

Head_on_a_Stick wrote:

EDIT: If you aren't using a GPT disk then you will have to add an fstab entry for /boot as well.

When I started gdisk when I partitioned the device i used the -o option and constructed a GPT table, is it necessary to add a fstab entry for the /boot aswell?

Offline

#15 2016-08-02 11:33:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,662

Re: UEFI - how to boot with a nvme drive

Not necessarily necessary - it can be discovered using heuristics, but this relies on your boot loader communicating the correct thing, which will likely be true for systemd-boot but I'm not entirely sure for GRUB.

An entry in fstab doesn't care about the boot loader and you should have it mounted in some form, because if /boot is mounted, kernel updates will properly install themselves on the /boot partition and you wont sit there and wonder why you can't boot anymore after a reboot into the new kernel (which doesn't exist because it was never written to the boot partition)

Last edited by V1del (2016-08-02 11:36:24)

Online

#16 2016-08-02 11:50:32

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

My bad, wasn't chrooted, after that i can see the initramfiles.

But when I type the command bootctl --path=/boot install
I get an error "File system is not a FAT EFI system partition (ESP) file system"

Offline

#17 2016-08-02 11:59:27

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

I could'nt view any details with lsblk -f for the disk when I was chrooted, but it goes well without.

Tried the bootctl --path=/boot install directly in the arch live cd enviroment and that was successfull. I now have a efibootmgr entry "linux boot manager" but it doesn't work. When a click it, it goes dark for a second or two then back to uefi.

Offline

#18 2016-08-02 20:44:25

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: UEFI - how to boot with a nvme drive

waeh wrote:

But when I type the command bootctl --path=/boot install
I get an error "File system is not a FAT EFI system partition (ESP) file system"

Is the partition mounted to /boot FAT-formatted?

# wipefs /dev/nvme0n1p1

Is /boot mounted to the ESP?

grep boot /proc/self/mounts
waeh wrote:

I now have a efibootmgr entry "linux boot manager" but it doesn't work. When a click it, it goes dark for a second or two then back to uefi.

Please post the output of:

efibootmgr -v

https://wiki.archlinux.org/index.php?ti … in_clients

Offline

#19 2016-08-02 21:44:34

yousuc
Member
From: Missouri
Registered: 2016-07-27
Posts: 19
Website

Re: UEFI - how to boot with a nvme drive

@weah

First:

gdisk /dev/nvme0n1

Hit 'x' then 'z' (this will wipe out the MBR/GPT)
then 'y' and 'y'

Next:

 gfdisk /dev/nvme0n1

Remember when making partitions to make sure free space is highlighted.

Create the first partition, hit enter on first prompt, then on 2nd prompt use '256MiB' without the ' enter, then for file type code use 'ef00' without ', then for a name you can use 'boot' without '

Create your second partition which we will use as swap. First input hit enter, then enter '16GiB' without ' (this will be for a 16GB swap) and hit enter, for the file code use '8200' without ', then hit enter, you can then name it 'swap' without ' and hit enter

Create your root partition, First prompt hit enter, then enter, Hit enter again to use the remaining space or define it. Hit enter, for the file code '8300' without ' hit enter, for a name use 'root' without '

Now you should be able to hit 'w' to write the table, enter yes and yes, now quit and proceed.

mkfs.fat -F32 /dev/nvme0n1p1
mkswap /dev/nvme0n1p2
mkfs.ext4 /dev/nvme0n1p3

You should now be able to continue with mounting the drives

mount /dev/nvme0n1p3 /mnt
swapon /dev/nvme0n1p2
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot
arch-chroot /mnt

Hope that helps you.

Offline

#20 2016-08-02 22:30:16

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

after I chrooted to the installed system on /mnt the mountpoints for /boot didn't exist in the installed enviroment. So after I mounted /boot on the ESP partition i could run the command:

bootcl --path=/boot install

And now when i click the linux boot mgr a black screen appears with two choices:
- efi default loader
- reboot into firmware interface

Only the second one works.

Head_on_a_Stick wrote:

Please post the output of:

efibootmgr -v

BootCurrent: 000C
Timeout: 1 seconds
BootOrder: 0000,000E,000C,000D
Boot0000* Linux Boot Manager    HD(1,GPT,09e4a7c3-06c8-4486-9e14-d9bd0653ec13,0x800,0x100000)/File(\EFI\SYSTEMD-BOOTX64.EFI)

Since its hand-copied i'm skipping the rest.

Offline

#21 2016-08-03 09:04:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,662

Re: UEFI - how to boot with a nvme drive

You have to create an entry for the arch kernel: https://wiki.archlinux.org/index.php/Sy … tallations (you only have to follow this paragraph, esp is equivalent with /boot in your case, use

blkid

to find out the PARTUUID of your root partition)

Last edited by V1del (2016-08-03 09:08:54)

Online

#22 2016-08-03 10:35:50

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

Ok, great! Onwards to the next errormessage:

Error loading \vmlinuz-linux: Not found

Offline

#23 2016-08-03 10:39:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,662

Re: UEFI - how to boot with a nvme drive

Install the linux package from the chrooted environment while /boot is properly mounted, the kernel should be extracted there automatically.

Last edited by V1del (2016-08-03 10:41:34)

Online

#24 2016-08-03 14:20:35

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

What Linux package do you mean?

Offline

#25 2016-08-15 07:27:23

waeh
Member
Registered: 2016-05-16
Posts: 18

Re: UEFI - how to boot with a nvme drive

I've tried to run pacstrap in chroot enviroment without success.

I install arch-install-scripts, but when running the pacstrap command it can't be found.

I've tried to follow the guide at https://wiki.archlinux.org/index.php/In … ting_Linux

Offline

Board footer

Powered by FluxBB