You are not logged in.

#1 2022-09-09 06:02:34

Rabid3east
Member
Registered: 2021-10-31
Posts: 37

Updated Arch / Grub Rescue

I've kept my arch updated about every 2 weeks. I had recently switched to using btrfs with snapper a few months ago on my arch linux on a fresh install. Things were fine until a recent update. Now I go straight to grub rescue and none of the filesystems can be found with ls. After having booted into arch linux on a live cd, i still run into issues trying to create a new grub-install after mounting and arch-chroot. To make matters worse, I get even more issues trying to run snapper while in arch-chroot. I've spent hours at each one of these fixes going through the forums and google. Something that was supposed to help resolved system crashes may have been the culprit. As I said though snapper and btrfs were fine for quite some time.

Offline

#2 2022-09-09 07:47:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,441

Re: Updated Arch / Grub Rescue

There's nothing that can be used to help in your post. What issues do you have when trying grub-install? How exactly are you mounting your partitions? Go through the steps you think are correct, post the commands you are executing and the outputs they are generating, as long as you have internet on the ISO you can post your outputs: https://wiki.archlinux.org/title/List_o … n_services

At the very least after the chroot, in addition to the steps you are trying to execute, post

mount
journalctl -b

Offline

#3 2022-09-09 11:59:11

Rabid3east
Member
Registered: 2021-10-31
Posts: 37

Re: Updated Arch / Grub Rescue

That's fair. I think I've just been so frustrated that Arch broke again for just a simple update a couple months after I did a fresh install with btrfs and migrated everything over. Bootup the machine and I'm greeted with grub rescue. Error: unknown filesystem. If i type ls i get (hd0) (hd1) (hd1,gpt1) and if I'm to set boot I have to have a filesystem. I go through each one with > ls (hd1,gpt1) get get back ":Filesystem is unknown" on each one of the filesystems.

That's where I boot with a live USB into arch, connect to the internet. then > mount /dev/nvme0n1p5 /mnt as that is my arch location according to fdisk -l
Now if i > arch-chroot /mnt  it gives me "mount point does not exists. dmesg(1) may have more information after failed mount system.
I search and find that it's actually at /mnt/@ likely due to this system being on btrfs and how its setup.
>arch-chroot /mnt/@ "Warning: /mnt/@ is not a mountpoint. This may have undesirable side effects."



Inside arch-chroot I try >snapper list (or any other snapper command besides --help) and get "Failure (org.freedesktop.Dbus.Error.ServiceUnknown)"
> mount /dev/nvme0n1p1 /boot/efi
> lsblk -l (efi boot is where i want it)
> grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
"grub-install: error: cannot find a device for /boot/grub (is /dev mounted?). Well, I check inside /mnt/@ and sure enough boot/grub is there and it looks like the original files?

edit:
journalctl -b
Outputs: http://ix.io/4a5X

Last edited by Rabid3east (2022-09-10 06:02:10)

Offline

#4 2022-09-09 12:19:20

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Updated Arch / Grub Rescue

Please don't post images of text, post the actual text.
You can do this chrooted from the live USB using a pastebin service.

CoC - Pasting pictures and code


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2022-09-10 06:03:17

Rabid3east
Member
Registered: 2021-10-31
Posts: 37

Re: Updated Arch / Grub Rescue

V1del wrote:

There's nothing that can be used to help in your post. What issues do you have when trying grub-install? How exactly are you mounting your partitions? Go through the steps you think are correct, post the commands you are executing and the outputs they are generating, as long as you have internet on the ISO you can post your outputs: https://wiki.archlinux.org/title/List_o … n_services

At the very least after the chroot, in addition to the steps you are trying to execute, post

mount
journalctl -b

I replied to your comment above.

journalctl -b
Outputs: http://ix.io/4a5X

Offline

#6 2022-09-10 06:04:55

Rabid3east
Member
Registered: 2021-10-31
Posts: 37

Re: Updated Arch / Grub Rescue

Slithery wrote:

Please don't post images of text, post the actual text.
You can do this chrooted from the live USB using a pastebin service.

CoC - Pasting pictures and code

I understand, I went back and got log cleaned up. journalctl -b Outputs: http://ix.io/4a5X

Offline

#7 2022-09-10 22:17:34

Rabid3east
Member
Registered: 2021-10-31
Posts: 37

Re: Updated Arch / Grub Rescue

Anyone have any thoughts?

Offline

#8 2022-09-10 22:28:13

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,646

Re: Updated Arch / Grub Rescue

Rabid3east wrote:

Anyone have any thoughts?

Don't do that. https://wiki.archlinux.org/title/Genera … es#Bumping

Online

#9 2022-09-11 08:15:14

VoDo
Member
From: Europe
Registered: 2020-06-04
Posts: 122

Re: Updated Arch / Grub Rescue

Try this
1. Load Arch ISO
2. mount /dev/sda2 /mnt (sda2 is where I have root)
3. mount /dev/sda1 /mnt/boot (I do not use /mnt/boot/efi)
4. arch-chroot /mnt
5. pacman -S grub efibootmgr os-prober (you do not need os-prober if you do not have dualboot)
6. grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
7. grub-mkconfig -o /boot/grub/grub.cfg
8. reboot


Archi3

Offline

#10 2022-09-11 23:22:22

Rabid3east
Member
Registered: 2021-10-31
Posts: 37

Re: Updated Arch / Grub Rescue

VoDo wrote:

Try this
1. Load Arch ISO
2. mount /dev/sda2 /mnt (sda2 is where I have root)
3. mount /dev/sda1 /mnt/boot (I do not use /mnt/boot/efi)
4. arch-chroot /mnt
5. pacman -S grub efibootmgr os-prober (you do not need os-prober if you do not have dualboot)
6. grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
7. grub-mkconfig -o /boot/grub/grub.cfg
8. reboot

Thanks for trying to help. This would be the correct way if I wasn't using btrfs and snapper to take snapshots of my OS. You were the only one who tried to help me and didn't get on to me for one reason or another. So I really do appreciate it.

I was able to reverse engineer the install for btrfs despite not being good with Arch linux.

Solution for other btrfs arch usrs:

mount -o noatime,compress=lzo,space_cache=v2,subvol=@ /dev/nvme0n1p5 /mnt
mount -o noatime,compress=lzo,space_cache=v2,subvol=@home /dev/nvme0n1p5 /mnt/home
mount -o noatime,compress=lzo,space_cache=v2,subvol=@snapshots /dev/nvme0n1p5 /mnt/.snapshots
mount -o noatime,compress=lzo,space_cache=v2,subvol=@var_log /dev/nvme0n1p5 /mnt/var_log
mount /dev/nvme0n1p1 /mnt/boot
arch-chroot /mnt
pacman -S grub efibootmgr os-prober
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg

Notes:
Apparently there was an updated file recently that messed up a lot of people's grub. It was quickly edited, but some people like me, fell through the cracks. Read about it on reddit while trying to resolve my issue. The options for btrfs especially the subvol=@ was the main issue for me not being able to properly get into arch-chroot. The other options are pretty standard for btrfs filesystem to run smoothly.

Offline

Board footer

Powered by FluxBB