You are not logged in.

#1 2018-06-23 21:19:46

irondude
Member
Registered: 2018-06-23
Posts: 12

[SOLVED] Cant boot after install

I just tried to install arch but I cant seem to find my boot partition or whatever. Here is what I did:

Create Partitions

gdisk /dev/nvme0n1
n
<ENTER>
<ENTER>
+500M
<ENTER>
n
<ENTER>
<ENTER>
<ENTER>
w
Y

mkfs.fat /dev/nvme0n1p1


cryptsetup -y -v luksFormat --type luks2 /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cryptroot
mkfs.ext4 /dev/mapper/cryptroot

chroot

mount /dev/mapper/cryptroot /mnt

mkdir /mnt/boot
mount /dev/nvme0n1p2 /mnt/boot

pacstrap /mnt base base-devel

genfstab -U /mnt >> /mnt/etc/fstab

arch-chroot /mnt
pacman -S dhclient dialog efibootmgr grub sudo terminus-font ttf-dejavu vim wpa_supplicant

then I've created a user set hostname etc and edited /etc/mkinitcpio.conf

MODULES=(i915)
HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 filesystems fsck)

mkinitcpio -p linux

Then I installed GRUB:

mkdir /boot/efi
mount /dev/nvme0n1p1 /boot/efi

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkfont -s 30 -o /boot/grub/fonts/dejavu30.pf2 /usr/share/fonts/TTF/DejaVuSansMono.ttf
blkid /dev/nvme0n1p2

Then in /etc/default/grub

GRUB_CMDLINE_LINUX="rd.luks.name=6fcccbb4-8679-9040-aj3c-582ec12ffa7e=cryptroot acpi.ec_no_wakeup=1"
GRUB_FONT="/boot/grub/fonts/dejavu30.pf2"
grub-mkconfig -o /boot/grub/grub.cfg

Then I umounted all the stuff, exited chroot and rebooted. Nothing worked exept booting from other devices.

efibootmgr gives when I started from an external HDD that has the Arch ISO on it.

BootCurrent: 0005
Timeout: 0 seconds
BootOrder: 0001,0002,0003,0004,0005
Boot0000* GRU
Boot0001* Diskette Drive
Boot0002* M.2 PCIe SSD
Boot0003* USB Storage Device
Boot0004* CD/DVD/CD-RW Drive
Boot0005* UEFI: Seagate BUP Slim SL 0108, Partition 1

When I change the boot orders they seem to be different all the time after I rebooted out of the "live system". For example in this case the first boot device is 0001 which here is "Diskette Drive" but last time it was "GRU" whatever that is (GRUB?).
When I want to enter boot menu it doesn't show any boot devices at all if the external HDD is not connected.

Last edited by irondude (2018-07-03 14:18:49)

Offline

#2 2018-06-23 21:30:02

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Cant boot after install

cryptsetup -y -v luksFormat --type luks2 /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cryptroot
...
mount /dev/mapper/cryptroot /mnt

mkdir /mnt/boot
mount /dev/nvme0n1p2 /mnt/boot

That's the same partition you are mounting as / and /boot


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-06-23 21:34:26

irondude
Member
Registered: 2018-06-23
Posts: 12

Re: [SOLVED] Cant boot after install

jasonwryan wrote:
cryptsetup -y -v luksFormat --type luks2 /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cryptroot
...
mount /dev/mapper/cryptroot /mnt

mkdir /mnt/boot
mount /dev/nvme0n1p2 /mnt/boot

That's the same partition you are mounting as / and /boot

I did not do that. Its just a typo here. In the install I mounted /dev/nvme0n1p1 to boot.
Otherwise grub install would give an error?!


BTW:
Do I put the UUID or PARTUUID in the default grub?

Last edited by irondude (2018-06-23 21:51:54)

Offline

#4 2018-06-24 02:53:13

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,132

Re: [SOLVED] Cant boot after install

What does lsblk show?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2018-06-24 03:04:57

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: [SOLVED] Cant boot after install

Also, what guide are you following?

Offline

#6 2018-06-24 13:05:47

irondude
Member
Registered: 2018-06-23
Posts: 12

Re: [SOLVED] Cant boot after install

cfr wrote:

What does lsblk show?

When in Chroot

[root@archiso /]# lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0           7:0    0 460.7M  1 loop  
sda             8:0    0 931.5G  0 disk  
|-sda1          8:1    0   571M  0 part  
`-sda2          8:2    0    64M  0 part  
nvme0n1       259:0    0   477G  0 disk  
|-nvme0n1p1   259:1    0   500M  0 part  /boot/efi
`-nvme0n1p2   259:2    0 476.5G  0 part  
  `-cryptroot 254:0    0 476.5G  0 crypt /
circleface wrote:

Also, what guide are you following?

None really. i just did what I wrote above.

Last edited by irondude (2018-06-24 13:07:32)

Offline

#7 2018-06-24 13:18:23

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [SOLVED] Cant boot after install

Some boards requires secureboot to be enabled to boot off nvme because #justmsthings. What hardware do you have?

Also post efibootmgr -v


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#8 2018-07-01 23:04:49

irondude
Member
Registered: 2018-06-23
Posts: 12

Re: [SOLVED] Cant boot after install

Mr.Elendig wrote:

Some boards requires secureboot to be enabled to boot off nvme because #justmsthings. What hardware do you have?

Also post efibootmgr -v

I have an Dell XPS 9370. When I disable secure boot and add boot option in the BIOS and choosethe grub/efi folder then I can boot into GRUB. But thats it. It says " Timed out waiting for device dev-disk-by/x2uuid-blablabla.device.
Maybe I did something wrong in the grub default? I only changed

GRUB_CMDLINE_LINUX="rd.luks.name=077e6f27-177a-447f-86d2-366d9804a209=cryptroot acpi.ec_no_wakeup=1"
GRUB_FONT="/boot/grub/fonts/dejavu30.pf2"

The UUID i got via blkid and I used partuuid.


Maybe in my mkinitcpio.conf something is wrong?

MODULES=(i915)
HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 filesystems fsck)

Last edited by irondude (2018-07-01 23:05:58)

Offline

#9 2018-07-02 14:15:19

Swayland
Member
Registered: 2018-06-28
Posts: 23

Re: [SOLVED] Cant boot after install

This is most likely a problem with your /etc/fstab file. Can I take a look at it? It's pretty likely that either you have two matching entries or are missing one.

Offline

#10 2018-07-02 14:30:13

sincomil
Member
Registered: 2018-02-13
Posts: 106

Re: [SOLVED] Cant boot after install

efibootmgr shoud show your installed EFI boot option, can you try to reinstall grub to EFI with more recognizable ID, something like

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=JUST-INSTALLED-GRUB

Then check with  efibootmgr, is there any "JUST-INSTALLED-GRUB" label ID?

Also you can try to install Grub in default EFI path: "\EFI\BOOT\BOOTX64.EFI" with command:

grub-install --target=x86_64-efi --efi-directory=/boot/efi  --removable

Last edited by sincomil (2018-07-02 14:37:04)

Offline

#11 2018-07-02 16:40:51

NESO
Member
Registered: 2018-07-02
Posts: 5

Re: [SOLVED] Cant boot after install

irondude wrote:
cryptsetup -y -v luksFormat --type luks2 /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cryptroot
mkfs.ext4 /dev/mapper/cryptroot

chroot

mount /dev/mapper/cryptroot /mnt

mkdir /mnt/boot
mount /dev/nvme0n1p2 /mnt/boot

Then I installed GRUB:

mkdir /boot/efi
mount /dev/nvme0n1p1 /boot/efi

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkfont -s 30 -o /boot/grub/fonts/dejavu30.pf2 /usr/share/fonts/TTF/DejaVuSansMono.ttf

Then in /etc/default/grub

GRUB_CMDLINE_LINUX="rd.luks.name=6fcccbb4-8679-9040-aj3c-582ec12ffa7e=cryptroot acpi.ec_no_wakeup=1"
GRUB_FONT="/boot/grub/fonts/dejavu30.pf2"

It seems that the boot partition is on the encrypted block. GRUB can't open it without proper configuration.
Take a look at here for more info.
PS: pay attention to the warning, it seems that you also encrypted the block with a LUKS2 header (unsupported by GRUB)

irondude wrote:
cryptsetup -y -v luksFormat --type luks2 /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cryptroot
mkfs.ext4 /dev/mapper/cryptroot

Offline

#12 2018-07-02 17:09:16

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] Cant boot after install

Swayland wrote:

This is most likely a problem with your /etc/fstab file. Can I take a look at it? It's pretty likely that either you have two matching entries or are missing one.

How could it be an fstab issue when the root partition containing the fstab is not even mounted?

NESO wrote:

It seems that the boot partition is on the encrypted block. GRUB can't open it without proper configuration.
Take a look at here for more info.
PS: pay attention to the warning, it seems that you also encrypted the block with a LUKS2 header (unsupported by GRUB)

irondude wrote:
cryptsetup -y -v luksFormat --type luks2 /dev/nvme0n1p2
cryptsetup open /dev/nvme0n1p2 cryptroot
mkfs.ext4 /dev/mapper/cryptroot

No the encrypted volume is for root so the warning about luks2 format is not relevant.

irondude wrote:

The UUID i got via blkid and I used partuuid.

UUID and PARTUUID are two distinct entities systemd-cryptsetup-generator rd.luks.name requires UUID
Edit:
If in doubt post the output of blkid or when you are dropped to the rescue shell check /dev/disk/by-uuid/ is there an entry for the luks volume?

Last edited by loqs (2018-07-02 17:11:51)

Offline

#13 2018-07-02 23:52:39

gaofei
Member
Registered: 2017-08-11
Posts: 26

Re: [SOLVED] Cant boot after install

GRUB can boot the system from the encrypted boot partition, please read ArchWiki

Offline

#14 2018-07-03 14:18:07

irondude
Member
Registered: 2018-06-23
Posts: 12

Re: [SOLVED] Cant boot after install

Solved it. I had a typo in my UUID.

Offline

Board footer

Powered by FluxBB