Two Questions about the Update of 2025/02/25: Grub and Pacman

Hello everybody, s’been a while since I last posted.

i) The update noticed me about the GRUB update (from /var/log/pacman.log):

[ALPM] upgraded grub (2:2.12-3 -> 2:2.12.r212.g4dc616657-2)

To use the new features provided in this GRUB update, it is recommended to install it to the MBR or UEFI. Due to potential configuration incompatibilities, it is advised to run both, installation and generation of configuration:
   # grub-install ...
   # grub-mkconfig -o /boot/grub/grub.cfg

I do intend to update GRUB to the newest version, if Pacman could not do it above, with the update.
Apparently I don’t have to?

grub-install --version
grub-install (GRUB) 2:2.12.r212.g4dc616657-2

If I have to … Do I need to do that via live usb? I have MBR+Luks if that matters.
If so, I’d be about to follow the steps of the Manjaro tutorial https://wiki.manjaro.org/index.php/GRUB/Restore_the_GRUB_Bootloader , using the chroot method.

ii) The Pacman update leaves me puzzled. A multilib question was answered here already. Pacman 7.0.0.r6.gc685ae6-2 update

However I also wonder about the dracut part in my diff. As I understand Dracut has to do with building kernels/ their updates. So I wonder how to deal with my pacdiff. Manually.

diff /etc/pacman.conf /etc/pacman.conf.pacnew
18c18
< HoldPkg     = pacman glibc dracut kernel-install-for-dracut eos-dracut
---
> HoldPkg     = pacman glibc
33,34c33
< Color
< ILoveCandy
---
> #Color
36,37c35,36
< #CheckSpace
< VerbosePkgLists
---
> CheckSpace
> #VerbosePkgLists
75,78d73
< [endeavouros]
< SigLevel = PackageRequired
< Include = /etc/pacman.d/endeavouros-mirrorlist
< 
97,98c92,93
< [multilib]
< Include = /etc/pacman.d/mirrorlist
---
> #[multilib]
> #Include = /etc/pacman.d/mirrorlist

Ignore it. Those are all the differences between Arch defaults and EOS defaults. The actual change that was made was already a default on EOS.

pacman doesn’t do it. It only updates the package. If you want to install the new grub files, you need to do it your self.

3 Likes

OK, since I didn’t find a tutorial for my partition scheme on my 13 year old laptop, I’m posting my steps here and will move it to the appropriate how-to section later. There is also an automatic script for Manjaro (by philm) that does this, I would appreciate it if it’d be added to the Arch repos or Endeavour repos, for simplification > See the 2 links to the code in Phil Müller’s first post https://forum.manjaro.org/t/install-grub-a-new-way-to-keep-your-efi-mbr-in-sync-with-grub-package/154000 .

How-To reinstall GRUB [to add the new version’s features] on BIOS/MBR encrypted EOS

Boot into the EOS live usb system, select normal boot.
Look into gparted or KDE partition manager.
There is no seperate boot partition. If there is, do not continue.

lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME 
sudo fdisk -l /dev/sdX #(in my case X is a - see below!)

In my case my system is on /dev/sda
/dev/sda1 is root
/dev/sda2 is swap
Both partitions are LUKS1-encrypted.
(This is a standard EOS Calamares installation!)

You will need to replace “X” with “a” below if yours is on /dev/sda as well.
If it’s different, change accordingly.

sudo cryptsetup luksOpen /dev/sdX1 cryptroot
# not needed: sudo cryptsetup luksOpen /dev/sdX2 cryptswap

sudo su
mount /dev/mapper/cryptroot /mnt

arch-chroot /mnt /bin/bash 

# not needed: pacman -Syu grub 
# this would reinstall the package

grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdX
grub-mkconfig -o /boot/grub/grub.cfg 

exit 
exit
# close your browser and partition manager
reboot

You don’t have to do all of that. Those are not the correct instructions for this situation.

You only need to run these two steps:

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

They can be run directly from your install. You don’t need to chroot or boot off the ISO or any of that.

2 Likes
sudo grub-install

Installing for i386-pc platform.
grub-install: error: install device isn't specified.

Also

grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sda
Installing for i386-pc platform.
grub-install: error: disk `hostdisk//dev/dm-1' not found.

Try running this with sudo

2 Likes

Ouch, Mint taught me that sudo once is enough :woman_facepalming:


sudo grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sda

Installing for i386-pc platform.
Installation finished. No error reported.

sudo grub-mkconfig -o /boot/grub/grub.cfg 
Generating grub configuration file ...
Found background: /usr/share/endeavouros/splash.png
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/initramfs-linux-lts.img
Found fallback initrd image(s) in /boot:  initramfs-linux-lts-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-fallback.img
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

Thanks again Mr Dalto, I should have asked, instead of creating a how-to-fix grub-on-MBR/BIOS-or-so tutorial :innocent:

2 Likes

Hey!

just for reference, on my side,

layout
$ cat /etc/fstab

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=f3496a94-266c-4596-a437-da3530ad8f7e /boot          ext4    defaults,noatime 0 2
UUID=D476-FF9D                            /boot/efi      vfat    umask=0077 0 2
/dev/mapper/luks-f6540be3-39bf-401d-8c00-5603b407b4cd /              btrfs   subvol=/@,defaults,noatime,space_cache=v2,compress-force=zstd 0 0
/dev/mapper/luks-f6540be3-39bf-401d-8c00-5603b407b4cd /home          btrfs   subvol=/@home,defaults,noatime,space_cache=v2,compress-force=zstd 0 0
/dev/mapper/luks-f6540be3-39bf-401d-8c00-5603b407b4cd /var/cache     btrfs   subvol=/@cache,defaults,noatime,space_cache=v2,compress-force=zstd 0 0
/dev/mapper/luks-f6540be3-39bf-401d-8c00-5603b407b4cd /var/cache/pacman/pkg          btrfs   subvol=/@var-cache-pacman-pkg,defaults,noatime,space_cache=v2,compress-force=zstd 0 0
/dev/mapper/luks-f6540be3-39bf-401d-8c00-5603b407b4cd /var/log       btrfs   subvol=/@log,defaults,noatime,space_cache=v2,compress-force=zstd 0 0
/dev/mapper/luks-f6540be3-39bf-401d-8c00-5603b407b4cd /swap btrfs subvol=@swap,defaults,noatime,compress=no,nodatacow,nodatasum 0 0
/swap/swapfile none swap defaults 0 0

$ lsblk

NAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
nvme0n1                                       259:0    0 465,8G  0 disk  
├─nvme0n1p1                                   259:1    0   100M  0 part  /boot/efi
├─nvme0n1p2                                   259:2    0    16M  0 part  
├─nvme0n1p3                                   259:3    0 106,4G  0 part  
├─nvme0n1p4                                   259:4    0   824M  0 part  
├─nvme0n1p5                                   259:5    0   512M  0 part  /boot
└─nvme0n1p6                                   259:6    0 357,9G  0 part  
  └─luks-f6540be3-39bf-401d-8c00-5603b407b4cd 254:0    0 357,9G  0 crypt /home/ooo/.stremio-server/.stremio-cache-backup_asd
                                                                         /home/ooo/.cache/.chromium-backup_asd
                                                                         /var/cache/pacman/pkg
                                                                         /var/log
                                                                         /home
                                                                         /var/cache
                                                                         /swap
                                                                         /

on my system using Grub (btrfs on luks, separate /boot and /boot/efi partitions, dual boot w/ windows) (so only / is encrypted, /boot is unencrypted and /boot/efi too, indeed, cause sharing with windows…)
this is how I run it:

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS-grub
sudo grub-mkconfig -o /boot/grub/grub.cfg

I wonder just now seeing your post if I should add --boot-directory=/boot to the options when running grub-install..., I dunno what @dalto says, but I assume not, since it did what it should so far without it.

Cheers !

edit:
and btw, what’s up with --force and --recheck ?

1 Like
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=EndeavourOS-grub

Does this keep the boot entry in UEFi named endeavouros. Just asking because i used it testing the new grub file and i used this and it renamed the original entry grub.

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

After the new grub file actually showed up in the updates i did it with just sudo grub-install as i had reverted with a snapshot after testing it.

well.. actually:

sudo ls /boot/efi/EFI
Boot  EndeavourOS  EndeavourOS-grub  HP  Microsoft  VeraCrypt

sudo ls /boot/efi/EFI/EndeavourOS
grubx64.efi

sudo ls /boot/efi/EFI/EndeavourOS-grub
grubx64.efi

Originally mine was always endeavouros. So when it changed to grub i didn’t like that even though booting is fine as i just had to change the boot priority. I ended up changing it back to endeavouros but it’s a pain when some of your snapshots have either endeavouros or grub hence why i don’t like it.

[ricklinux@rick-ms7c37 ~]$ sudo ls /boot/efi/EFI
boot  endeavouros  GRUB
[ricklinux@rick-ms7c37 ~]$ sudo ls /boot/efi/EFI/EndeavourOS
grubx64.efi
[ricklinux@rick-ms7c37 ~]$ 

I think i want to remove that GRUB entry! :thinking: Or not?

well, I do wonder when and/or why I did change those and end up with both EndeavourOS and EndeavourOS-grub :grimacing:

and yeah you’re right, I should look into that !

and me too I think :unamused:

Probably isn’t worth the aggravation. I don’t want to mess things up … if you know what i mean. :rofl:

Edit: Could you not just remove it with sudo rm -r /boot/efi/EFI/GRUB :thinking:

Edit: Mine is named GRUB

lol totally, i will put it right away on my list of “to do if there is a problem with it one day, but till then, mmmmèèèèh…” :upside_down_face:

but…why…?

yep got that

You don’t need it, no.

2 Likes

And just found out about a new feature, you get a second chance for your root password if you fail the first time. (W/o manually cryptomount ... ; insmod normal; normal)

I am unsure. I took the command from here. The Archwiki entry was too long for me.

man grub-install

 --force
          install even if problems are detected


   --recheck
          delete device map if it already exists
1 Like

Just because I want to break something. :laughing:

1 Like

Oh but yes, i’m in that mood too, always :sweat_smile:
I meant why wouldn’t it let you delete it ¯_(ツ)_/¯

I did but this way if i remember correctly. :thinking:

su
cd /boot/efi/EFI
rm -r /boot/efi/EFI/GRUB

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.