#chroot to fix grub

142 messages · Page 1 of 1 (latest)

scenic verge
#

chroot to fix grub

cloud maple
#

Uh, what's the issue?

scenic verge
#

let me a ttach my lsblk

#

Just sudo mount /dev/nvme0n1p2 /mnt?

full fiber
#

Yup that's how you do it

#

You mount your partitions to the appropriate places and then arch-chroot /mnt

scenic verge
full fiber
#

Did you install arch on that partition?

scenic verge
#

Yes

full fiber
#

It says you have no proc directory

#

Do ls /mnt

scenic verge
full fiber
#

Oh you use btrfs

scenic verge
#

hmm

full fiber
#

I think you have to do arch-chroot /mnt/@ instead

#

Idk I am not good at btrfs I always use ext4

#

You can look up how to mount btrfs subvolumes online

scenic verge
#

Thanks

cloud maple
# scenic verge

You'll want to unmount the partition as mount the subvolume with mount /dev/nvme0n1p2 -o subvol=@ /mnt

scenic verge
#

I'm in chroot already

#

Now I need help reinstalling grub

#

Lol

cloud maple
late cargo
scenic verge
cloud maple
#

What?

scenic verge
cloud maple
#

👍

scenic verge
#

Ohh they're not mounted anymore I believe

#

No nvm

#

Or

#

Is it

#

I'm not sure..

cloud maple
#

I think it's an issue with chrooting into subvolume like that

full fiber
#

Did you mount nvme0n1p1 before chroot?

#

You usually mount it to either /boot or /boot/efi

#

If /boot is empty mount it there. If /boot/efi (efi in lowercase) exists then mount it there instead

scenic verge
scenic verge
full fiber
#

Exit chroot and type lsblk

#

It'll say if it's mounted or not

#

And you need to make sure you mount it inside the /mnt/boot folder not /boot

#

/boot outside of chroot is the iso's boot directory

scenic verge
#

@full fiber

full fiber
#

You have it mounted twice

#

Run umount /mnt/boot once

scenic verge
#

It's mounted once outside chroot

full fiber
#

Doesn't matter make sure it's mounted only once outside of it

scenic verge
#

Oki

scenic verge
#

Still doesn't work

full fiber
#

p1 is your EFI partition right? Do you know if it could be swap?

#

Type "lsblk -f"

scenic verge
scenic verge
full fiber
#

If it is then you haven't made an EFI partition

#

If you just installed arch you should probably reinstall and make it properly

#

Unless you are not using a UEFI system?

scenic verge
#

Idk I used arch install

full fiber
#

Yeah that makes sense. It's really buggy

scenic verge
#

I mean arch worked then grub broke

full fiber
#

Type cat /sys/firmware/efi/fw_platform_size

scenic verge
full fiber
#

You do have UEFI then

#

Do lsblk -f

#

Outside chroot

scenic verge
full fiber
#

Yeah it's not swap

scenic verge
#

Ok gud

full fiber
#

Oh wait I may have found the issue

scenic verge
#

Huh

full fiber
#

When typing the grub install command

#

You used =boot/

#

I think you need to use =/boot/

scenic verge
#

I tried both

full fiber
#

Idk then

#

Could be due to the way you have mounted your btrfs partition

scenic verge
#

Is there supposed to be another boot directory in /boot/?

full fiber
#

No. You can either mount on /boot or /boot/efi. You have it mounted on /boot and that should work

scenic verge
#

Should I remove the other /boot?

full fiber
#

What other boot

#

Oh

scenic verge
#

The boot in boot

full fiber
#

Why did you make that

#

Ok hear me out

#

Exit chroot

scenic verge
#

Ok

full fiber
#

Unmount the boot partition completely (Make sure it doesn't show it as mounted anywhere in lsblk)

#

Then type mkfs.fat -F 32 /dev/nvme0n1p1

#

This will completely format your boot partition so you can do a clean grub install

scenic verge
#

Will this erase my disk?

#

Ohh only boot good

full fiber
#

Which if I remember correctly is p1 which is just 1gb long

scenic verge
#

Ok Formated

#

Now remount?

full fiber
#

Yep

#

Also

#

It's usually better to mount it to /boot/efi

scenic verge
#

I thought that was outdated

full fiber
#

Nah

#

If it doesn't let you, you just need to run mkdir /mnt/boot/efi

#

The boot folder will still exist, if will just be empty

#

You will also need to edit /etc/fstab

#

All you need to do is just change /boot to /boot/efi though

#

You'll also need to reinstall the Linux package which contains the kernel

scenic verge
full fiber
#

Add slash in front

#

You are currently in /root which is the root users home folder

scenic verge
#

Ok

scenic verge
#

Also is grub installed now or do I still have to do that?

#

Both mounted

#

Now what

full fiber
#

Edit fstab if you haven't already

#

And install grub to /boot/efi

#

Make sure to add the slash at the beginning

#

Also do this inside chroot

#

Wait

#

You mounted your boot partition in the iso's boot directory

#

Unmount it and mount it to /mnt/boot/efi

#

Then chroot

scenic verge
#

I hate canonical

#

At this point fuck it I should've just reinstalled

full fiber
cloud maple
scenic verge
#

I can close this now

#

I just reinstalled arch

#

Lul