How to install grub after upgrading to a new grub version

Post Reply
djemos
Site Admin
Posts: 697
Joined: 15 Apr 2016 06:03

How to install grub after upgrading to a new grub version

Post by djemos »

Please note that after upgrading to a new grub version, you should
first use "grub-install" to reinstall the bootloader.
Grub updated from 2.06 to 2.12 version.
After updating the system

Code: Select all

sudo slapt-get -u
sudo slapt-get --upgrade
and install glibc glibc-i18n glibc-zoneinfo kernel-firmware if they have been updated to new versions.

Code: Select all

sudo slapt-get -i glibc glibc-i18n glibc-zoneinfo kernel-firmware
Use the new /etc/default/grub

Code: Select all

sudo cp /etc/default/grub.new /etc/default/grub
We have to use "grub-install" to reinstall the bootloader.
Important: mount efivarfs if we use slackel 64 edition.

Code: Select all

sudo mount -t efivarfs efivarfs /sys/firmware/efi/efivars
For slackel 64 running from internal disk (slackel is installed to internal ssd disk)

Code: Select all

sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi  --boot-directory /boot  --recheck
create the initrd image.

Code: Select all

sudo /usr/sbin/install-upgrade-kernel install generic
Then reboot

For slackel 64 running from external ssd disk or a USB stick (Slackel is installed to external ssd disk or USB stick)

Code: Select all

sudo grub-install --target=x86_64-efi --no-nvram --removable
create the initrd image.

Code: Select all

sudo /usr/sbin/install-upgrade-kernel-ext-usb install generic
Check efibootmgr

Code: Select all

efibootmgr
You have to see
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0002,2001,2002,2003
Boot0000* EFI USB Device (SanDisk) UsbWwid(781,557d,0,0002262906242222345)/HD(1,GPT,ef4a3dab-37f3-44b9-99da-4edc1795d724,0x800,0x96000)RC

Then reboot
Post Reply