#[Solved] GRUB/systemd-boot loads, but does not go into Arch.

55 messages · Page 1 of 1 (latest)

paper salmon
#

SOLVED

TL;DR - cloned old system from /dev/sda to /dev/nvme0n1 using dd. I can chroot into nvme, but it doesn't boot after going into GRUB.

I have cloned my system from /dev/sda2 (ext4) to /dev/nvme0n1p2 with dd, created empty FAT32 on partition 1 with boot+esp flags. After disconnecting /dev/sda, files were intact and I can chroot into it over live USB.

I did clone GRUB on partition 1, but it would say ERROR: device '/dev/disk/by-partuuid/75***af8' not found. PARTUUID is exactly the same, on live USB it mounts to arch.

I tried reinstalling GRUB, but it would go into GRUB prompt, tried systemd-boot, it show "boot into firmware" (if I recall correctly, only one button and it would go into UEFI setup).

Any suggestions? /boot/efi/EFI exists and files are there.

grizzled island
#

For GRUB did you generate the config, and for systemd-boot did you make the entry for Arch?

paper salmon
reef fox
#

You need to regenerate the grub config

paper salmon
#

I'll try reinstalling GRUB again then

reef fox
#

You shouldn't need to

#

Just generate a new config

paper salmon
#

I deleted the partition with GRUB to install systemd-boot since GRUB wasn't working

reef fox
#

Oh okay

#

Your esp is mounted on /boot/efi right?

paper salmon
#

Previously when I used GRUB, partition was mounted at /boot.

reef fox
#

Okay but you said /boot/efi/EFI exists

#

Which leads me to think it was mounted on /boot/efi

paper salmon
#

Currently with systemd-boot it was, sorry for confusion

reef fox
#

Probably best if you post your fstab

#

Well I think you also need a new fstab if you migrated from a drive to another

paper salmon
#
# /dev/nvme0n1p2
PARTUUID=75b4eb16-2339-2e4b-95b9-fff8683c7af8   /               ext4            rw,relatime     0 0

# /dev/nvme0n1p1
UUID=D68D-7EE3          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro   0 0
# when it was systemd-boot, it was /boot/efi, currently I'm installing GRUB at /boot so I changed it
/swap none swap defaults 0 0
#

UUIDs were changed accordingly

reef fox
#

Alright

grizzled island
#

What's inside of the EFI partition right now?

paper salmon
#

Oh, I may had to change /boot/efi UUID yet again after wiping it to install systemd-boot

#

but arch partition UUID is exact the same unchanged from /dev/sda2

paper salmon
grizzled island
#

Before you mount the EFI partition, can you check if there is anything inside of /mnt/boot? (or /boot from chroot)

paper salmon
#

Ah, /boot/efi (empty), /boot/grub (fonts grub.cfg grubenv locale themes x86_64-efi)

grizzled island
#

Before you mount it delete everything in there first

paper salmon
#

Done

#

Deleted everything inside /mnt/boot and mounted partition 1 to /mnt/boot

grizzled island
#

You should be able to chroot now

paper salmon
#

Is this the right way to install GRUB?

sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys

sudo arch-chroot /mnt

grub-install --target=x86_64-efi /dev/nvme0n1
grub-install --recheck /dev/nvme0n1
paper salmon
grizzled island
#

You don't need to bind the stuff, arch-chroot does that automatically

paper salmon
#

Ah, great

grizzled island
#

Also, that's not how you install GRUB on UEFI

paper salmon
#

Oh.

#

;-; What guide should I follow?

grizzled island
#

grub-install --efi-directory=/boot --recheck should be fine for installing

#

then grub-mkconfig -o /boot/grub/grub.cfg

paper salmon
#
# grub-install --efi-directory=/boot --recheck
Installing for x86_64-efi platform.
Installation finished. No error reported.

# grub-mkconfig -o /boot/grub/grub.cfg 
Generating grub configuration file ...
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

Seems good to me

paper salmon
grizzled island
#

Oh wait, the kernel

#

Run pacman -S linux then run the mkconfig command again

paper salmon
#
# pacman -S linux
resolving dependencies...
looking for conflicting packages...

Packages (1) linux-6.0.12.arch1-1

Total Download Size:   163.15 MiB
Total Installed Size:  163.44 MiB
Net Upgrade Size:      -12.84 MiB
#

give me a minute, slow internet

#

I might've had some other kernel

#

OKAY!

#

Looking good

#
# ls /boot/                            
EFI  grub  initramfs-linux-fallback.img  initramfs-linux.img  vmlinuz-linux
paper salmon
grizzled island
#

Now you should be able to exit out of chroot and reboot

paper salmon
#

It flashed the screen quite a few of times before finally booting 😄

#

Booted up

#

I now need to remove that grub popup asking me to select where to boot

paper salmon
#

Thank you very much, Me Derp!!!

#

[solved] GRUB/systemd-boot loads, but does not go into Arch.