#[Solved] Grub Update

400 messages · Page 1 of 1 (latest)

vital crane
#

I saw the post on the archlinux website. Could someone clarify what I need to do after running pacman -Syu? I just need to run the two commands listed on the website to prevent my system from being bricked?

vital crane
pseudo dew
vital crane
#

Can I mount the EFI partition while the computer is running?

pseudo dew
#

many people have it always mounted

#

beats me why but you can technically do it

vital crane
#

I have a /boot/EFI directory, is that it?

#

It might be already mounted by default

vital crane
#

So I should run:

$ sudo pacman -Syu
$ grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB
$ grub-mkconfig -o /boot/grub/grub.cfg

right?

pseudo dew
#

mhm

vital crane
#

Got it

vital crane
#

grub-install: error: /boot/EFI doesn't look like an EFI partition.

hushed nova
#

run lsblk -f

#

what's the output?

vital crane
# hushed nova what's the output?
NAME FSTYPE FSVER LABEL UUID                                   FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                           
|-sda1
|    vfat   FAT32       4B95-E7F5                                             
`-sda2
     LVM2_m LVM2        KGrk8P-sxLR-r2bO-Rxhd-6GSV-Aaov-c8y6j6                
  |-volgroup0-lv_root
  |  ext4   1.0         6e51680b-0108-4b0e-93a8-9688047ace06        1G    91% /
  `-volgroup0-lv_home
     ext4   1.0         dd7f016d-f500-458b-a029-efeae6fdb983      875G    46% /home
hushed nova
#

your boot partition is likely on

#

/dev/sda1

#

how are you mounting it?

#

what's your fstab (cat /etc/fstab)

vital crane
#

I tried running mount /dev/sda1 /boot/EFI, but got an error

hushed nova
#

what error

vital crane
#
❯ sudo mount /dev/sda1 /boot/EFI
mount: /boot/EFI: unknown filesystem type 'vfat'.
       dmesg(1) may have more information after failed mount system call.
hushed nova
#

what's your fstab (cat /etc/fstab)

vital crane
# hushed nova what's your fstab (`cat /etc/fstab`)
# /dev/mapper/volgroup0-lv_root
UUID=6e51680b-0108-4b0e-93a8-9688047ace06    /             ext4          rw,relatime    0 1

# /dev/mapper/volgroup0-lv_home
UUID=dd7f016d-f500-458b-a029-efeae6fdb983    /home         ext4          rw,relatime    0 2

/swapfile none swap sw 0 0
hushed nova
#

your boot partition doesn't seem to be mounted anywhere

#

only your main root partition is

vital crane
#

Alright

hushed nova
#

is there a boot directory in

#

ls /

vital crane
#

Yes

hushed nova
#

what's in it

vital crane
#

EFI grub initramfs-linux-fallback.img initramfs-linux-lts-fallback.img initramfs-linux-lts.img initramfs-linux.img intel-ucode.img vmlinuz-linux vmlinuz-linux-lts

hushed nova
#

hmmm

vital crane
#

EFI and grub are folders

hushed nova
#

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

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

vital crane
#

EFI is empty, grub has stuff in it

hushed nova
#

try installing grub to /boot

#

instead of

#

/boot/EFI

#

oh wait hold on

#

is your pc

#

uefi or bios

#

probably uefi given the fact

vital crane
#

uefi I'm pretty sure

hushed nova
#

you have a vfat?

vital crane
#

sda1 is vfat

hushed nova
#

ok try the commands i've given to install and configure grub to /boot

vital crane
#

does it matter what's in /boot/grub?

hushed nova
#

no that's where the configuration files for grub are normally stored

vital crane
#

grub-install: error: /boot doesn't look like an EFI partition.

hushed nova
#

what's mounted currently?

hushed nova
#

cat /proc/mounts

pseudo dew
#

what does configuration have to do with where you install

hushed nova
#

most people have their grub config files

#

in /boot/grub don't they

vital crane
#
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sys /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
dev /dev devtmpfs rw,nosuid,relatime,size=16385868k,nr_inodes=4096467,mode=755,inode64 0 0
run /run tmpfs rw,nosuid,nodev,relatime,mode=755,inode64 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0
/dev/mapper/volgroup0-lv_root / ext4 rw,relatime 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev,inode64 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
bpf /sys/fs/bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19026 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0
tracefs /sys/kernel/tracing tracefs rw,nosuid,nodev,noexec,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0
configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev,nr_inodes=1048576,inode64 0 0
/dev/mapper/volgroup0-lv_home /home ext4 rw,relatime 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=3280248k,nr_inodes=820062,mode=700,uid=1000,gid=984,inode64 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=984 0 0
portal /run/user/1000/doc fuse.portal rw,nosuid,nodev,relatime,user_id=1000,group_id=984 0 0```
hushed nova
#

if they have the /boot as the EFI

#

partition

pseudo dew
hushed nova
#

#

anyways it doesn't look like the efi partition is mounted to /boot

#

but the /boot directory

#

is there

#

could you unmount /boot

#

and remount /dev/sda1 to /boot

vital crane
#

the efi partition is /dev/sda1 right? just to be clear

hushed nova
#

well yes since that's the vfat file system

vital crane
#

It doesn't look like that's mounted at all

pseudo dew
hushed nova
#

i mean

pseudo dew
#

why not /mnt or /boot/efi or /efi

#

mounting to non empty directories generally doesnt make sense

vital crane
pseudo dew
#

hm

hushed nova
#

but grub

pseudo dew
#

mount | grep '/boot|sda1'

#

what does it say

vital crane
vital crane
thin charm
#

doesnt matter :p

pseudo dew
pseudo dew
vital crane
#

empty

thin charm
hushed nova
#

most common esp partition mount point

vital crane
#

Can I just mount /dev/sda1 to /mnt or something temporarily? will that work?

thin charm
#

but yea since it's full nah

thin charm
#

what error did you get when you tried to mount the boot partition again?

vital crane
pseudo dew
vital crane
#

Just got it again

pseudo dew
pseudo dew
#

can you run it

#

and see if that helps

vital crane
pseudo dew
hushed nova
#

plus yes i know esp is efi system partition 😭

#

installation guide has /mnt/boot as the mount point and most beginners follow that anyways

pseudo dew
hushed nova
#

Well yes but no

pseudo dew
#

many people use it, especially when using installers

pseudo dew
vital crane
pseudo dew
#

huh

#

thats nothing helpful

vital crane
#

sudo dmesg | tail

hushed nova
#

we wouldn't know where he originally mounted the esp anyways

vital crane
#

gave me that

thin charm
#

do u have dosfstools installed?

pseudo dew
#

i highly, highly doubt its needed

vital crane
thin charm
hushed nova
#

what is the output of lsmod | grep vfat

vital crane
hushed nova
#

do you have mtools installed

#

pacman -Qs mtools

vital crane
#

Yes

pseudo dew
#

@vital crane modprobe vfat

#

as root

#

does it work

vital crane
#

modprobe: FATAL: Module vfat not found in directory /lib/modules/5.19.4-arch1-1

hushed nova
#

what is the output of

#

uname -r

vital crane
#

5.19.4-arch1-1

thin charm
#

it's probably a different version installed on their system since they updated

hushed nova
thin charm
#

pacman -Qi linux?

#

i forget if it's Qi dont yeet me

pseudo dew
#

qi has extra info you dont need

vital crane
pseudo dew
#

q has version

thin charm
vital crane
thin charm
#

uhhhh

#

F

hushed nova
#

reboot?

thin charm
#

no

vital crane
pseudo dew
#

yeah im fairly sure you need to use an iso at this point

hushed nova
#

ah

pseudo dew
#

idk

#

what do you think

thin charm
hushed nova
#

oh true

vital crane
pseudo dew
#

maybe you need older kernel headers

hushed nova
#

btw is this in a live usb

pseudo dew
#

no

hushed nova
#

or in your current arch install

pseudo dew
#

yeah

vital crane
#

usb drive, followed a video

vital crane
pseudo dew
#

thats irrelevant rn

thin charm
#

it doesnt rlly matter

vital crane
#

I only learned that later, and I know it was up to date

thin charm
#

this is like way past install and has to do with grub being broken on all the arch stuff

pseudo dew
#

oh ok

hushed nova
#

are you able to flash the iso

#

arch install iso

#

to a usb drive

vital crane
#

do I need to update it or will a year(ish) old iso still be fine?

#

No, Debian was

hushed nova
#

💀

thin charm
vital crane
#

Why would I do that?

pseudo dew
#

what
why??

vital crane
#

That's like 20 steps ahead of this

pseudo dew
#

tofu why do you keep insisting on never using anything you consider flawed ever

#

that would make no sense

#

i mean unofficial guides and manjaro

#

we get it arch is great

#

now can we tackle the real problem

thin charm
#

?

#

this shows?

pseudo dew
#

anyway @vital crane so it seems like you dont have the driver for mounting vfat drives

#

so im not quite sure how youd get that

thin charm
#

they updated kernel

#

update kernel = running kernel's modules get delete

pseudo dew
#

you could try getting an older version of the linux package

#

oh ok

vital crane
pseudo dew
#

right so

thin charm
#

just boot up the iso

pseudo dew
#

oh wait

vital crane
#

Like, I have mtools installed

pseudo dew
#

pacman -U /var/cache/pacman/pkg/linux-5.19.4*.tar.zst should work

#

right?

thin charm
# pseudo dew oh ok

usually it's fixed by rebooting but since the issue is a possible grub breaking that's not a great idea

pseudo dew
#

mhm

pseudo dew
pseudo dew
vital crane
#

I think I moved my pacman cache

#

But I forgot where lmao

thin charm
#

oh well no harm in booting up the iso really

vital crane
#

found it

thin charm
#

or that

vital crane
#

~/tempcache

pseudo dew
#

pacman -U /path/to/linux-whatever.4-whatever.tar.zst

#

as root

vital crane
#

Done

#

Now I can load a driver?

pseudo dew
#

probably

#

try sudo modprobe vfat again

#

@thin charm this sound right?

vital crane
hushed nova
#

i don't think modprobe gives output

#

doesn't it load the vfat

#

driver in

pseudo dew
vital crane
pseudo dew
#

try mounting esp to /mnt

vital crane
#

Okay no error this time

thin charm
#

yay

#

pogress

pseudo dew
thin charm
#

paru*

vital crane
#
❯ ls /mnt        
EFI

pog

pseudo dew
#

perfect

#

k now grub-install

vital crane
#

Installation finished. No error reported.

thin charm
#

do the gurb shit and dont forget to update ur kernel again before u reboot

pseudo dew
#

grub-mkconfig /b…

vital crane
pseudo dew
#

then try rebooting

hushed nova
#

make sure you didn't grub-install'ed in root (/mnt)

pseudo dew
hushed nova
#

Nvm

#

mounted esp to /mnt

vital crane
hushed nova
pseudo dew
#

welp im sure it works either way

vital crane
#

Hmm

thin charm
#

i hate wurgchamp

pseudo dew
#

what

thin charm
#

wug

vital crane
#

I now have a /mnt/EFI/EFI

#

I feel like this is wrong

thin charm
pseudo dew
#

right so that's what happens when you use /mnt/EFI

#

but im sure itll still work

vital crane
#

Alright will it overwrite itself?

pseudo dew
#

what

vital crane
#

If I run it with the right directory now?

pseudo dew
#

also you might wanna reinstall the new kernel

pseudo dew
#

youd have to delete it manually

vital crane
#

I will do that then

thin charm
#

ummm... enjoy? idk

pseudo dew
#

lmao

vital crane
#

Alright this looks good now

#

Thanks for the help y'all

pseudo dew
#

np

vital crane
#

Rebooted, it works

pseudo dew
#

cool

vital crane
#

Time to do this on my laptop as well

pseudo dew
#

now you can pacman -Syu if you want the latest kernel

vital crane
pseudo dew
pseudo dew
#

perfect

vital crane
vital crane
#

@pseudo dew Sorry for the necro ping, but I’m having issues again.

This time it’s on my laptop, which is running effectively the same system. I ran grub-install, restarted, and it failed. I booted a usb, chrooted in, ran grub-install in the chroot, rebooted, and it’s still not working

ripe swiftBOT
vital crane
#

Here is the exact message shown when I turn on the laptop:

Welcome to GRUB!

error: symbol `grub_debug_malloc’ not found.
Entering rescue mode
grub rescue>
potent mural
vital crane
potent mural
#

What is the grub install command you used?

vital crane
#

Here’s what it looks like

potent mural
#

When it’s a menu

vital crane
#

I don't think there was an arch logo

#

Reboot to check?

potent mural
#

Up to you, but it implies if not that you have a uefi and not bios boot

vital crane
#

I have UEFI, yes

potent mural
#

What’s the grub install command you used?

vital crane
#

I'm checking

#

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

#

Run from inside the chroot

potent mural
#

Interesting, that looks right

vital crane
#

Yeah

potent mural
#

You sure you installed the OS as uefi?

vital crane
#

99%, but how can I check?

potent mural
#

I honestly don’t know

vital crane
#

I have uefi on the computer, I know when I go into the bios screen it talks about uefi

potent mural
vital crane
#

("bios screen" being what I get to by holding f2 during startup, maybe not the right name)

#

There is an efi there

potent mural
#

Have you tried deleting grub, reinstalling it, reinstalling the kernel and then re mkconfig?

vital crane
#

I assumed installing grub deleted grub

#

I haven't touched the kernel

potent mural
#

I don’t think it necessarily does

#

Try doing that in chroot with efi mounted is my suggestion

vital crane
#

Would that just be rm -rf /boot/EFI?

potent mural
#

If that’s where you installed it yes but be careful you don’t delete another bootloader E.G. if you have windows installed and that’s also in the EFI partition

vital crane
#

Nope, no dual boot

vital crane
potent mural
#

Why is there a boot inside your boot?

#

Just do ls /boot

vital crane
#

EFI grub initramfs-linux-fallback.img initramfs-linux.img vmlinux-linux

potent mural
#

I’d just nuke all of /boot and then:
Install grub
Install linux
Install intel-ucode or amd-ucode assuming relevance
And then run grub-mkconfig -o /boot/grub/grub.cfg

vital crane
#

lsblk says /dev/sda1 is on /boot/EFI, which is where I mounted it.

potent mural
#

Can install to boot or boot/efi

vital crane
#

Can you provide more detail?

potent mural
#

What do you need more detail on?

vital crane
#

So I umount /dev/sda1, rm -rf /boot, then remount it where?

potent mural
#

Don’t need to unmount it

#

Well, you will be not first

#

You want to wipe that partition

vital crane
potent mural
#

I’d rm -rf the boot directory

vital crane
#

Alright

#

And what about "install linux"?

potent mural
#

But with the efi mounted

vital crane
#

So I do need to unmount it?

potent mural
#

I’ll go to my computer

#

do lsblk -f

#

let me see what you've mounted and unmounted basically

#

and if I sort out your grub issue maybe you can sort out my grub issue XD

vital crane
potent mural
#

try: rm -rf /boot/*

vital crane
#

cannot remove /boot/EFI: device or resource busy again

potent mural
#

rm -rf /boot/EFI/*

vital crane
#

Worked

potent mural
#

now unmount it

#

wipe /boot/* like above

#

and if you want to install it to EFI just do mkdir /boot/EFI or /boot/efi etc. and remount it there

#

and then that's your ESP for the grub install

vital crane
#

Finished, no error reported.

potent mural
#

are you amd or intel?

vital crane
#

Intel

potent mural
#

pacman -S linux linux-headers intel-ucode

#

replace that with the kernel you want

#

if you use zen for instance linux-zen linux-zen-headers

#

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

#

even if you installed it at /boot/efi don't modify the mkconfig line

#

the cfg needs to go into /boot/grub/grub.cfg

#

that's where grub will look for it

vital crane
#

I don't think my wifi is on, one sec

#

Uh

#

I ran iwctl, now it just says Waiting for IWD to start...

potent mural
#

do you need to start a service perhaps? or can you just plug Ethernet in?

vital crane
#

systemctl status iwd says it won't run in chroot

potent mural
#

nmtui

#

try that?

vital crane
potent mural
#

if it won't work exit chroot and try it and if it works rechroot

#

up to you which you try

#

it's only a temporary thing

vital crane
potent mural
#

exit chroot

vital crane
#

If I connect via iwctl outside chroot, will that carry over inside?

potent mural
#

should do

#

just rechroot

#

everything should stay mounted I think

vital crane
#

Yep

#

Alright pacman is running

potent mural
#

mkconfig

vital crane
#

Alright finished grub-mkconfig

potent mural
#

upload a picture?

vital crane
potent mural
#

exixt, umount -a, shutdown, take the media out, boot up, and make sure that grub is selected in your bootloader if you need to

vital crane
potent mural
#

remember if you can boot you have to solve my grub issue

vital crane
#

Hope so

#

And that looks like a yes

#

ty so much for the help

#

🎉

potent mural
#

do pacman -Syu when you're fully in and then reboot, just to test things

vital crane
#

Most things were up to date already, but I'll reboot anyways

#

Yep, it's booting again

potent mural
#

lesson here, when you grub-install, destroy it with fire first

vital crane
#

Yeah, checks out

potent mural
vital crane
#

Before I do that...

#

Steps to solve (a summary):

  1. Boot up usb, chroot into system
  2. Wipe everything in /boot using rm -rf, as well as in your esp
  3. grub-install
  4. reinstall linux via pacman
  5. grub-mkconfig