Hi,
with the latest stable update a reinstall of grub is needed.
As I have a complex setup and cannot remember where I have installed grub I need help with finding the correct device to reinstall grub to. I have not yet updated so I still have a running system.
I have two disk. When I installed manjaro on one of the disks a dual boot Windows/Linux was already there (I moved the disk from a broken laptop). On the other disk from the new laptop a ubuntu was already installed. I don’t want to break my system and I am not sure whether I have more then one grub install on the disks. So help to find the correct way to upgrade my grub would be greatly appreciated.
With the help of the info page GRUB/Restore the GRUB Bootloader I tried to gather some information.
I’m pretty sure that I don’t have EFI and the output lets me believe I have gpt.
But how do I find out what the correct disk is?
lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME
PATH PTTYPE PARTTYPE FSTYPE PARTTYPENAME
/dev/sda gpt
/dev/sda1 gpt ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 vfat Microsoft basic data
/dev/sda2 gpt 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f swap Linux swap
/dev/sda3 gpt ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ext4 Microsoft basic data
/dev/sda4 gpt ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 ext4 Microsoft basic data
/dev/sda5 gpt 0fc63daf-8483-4772-8e79-3d69d8477de4 ext4 Linux filesystem
/dev/sda6 gpt 0fc63daf-8483-4772-8e79-3d69d8477de4 ext4 Linux filesystem
/dev/sda7 gpt 0fc63daf-8483-4772-8e79-3d69d8477de4 ext4 Linux filesystem
/dev/sdb dos
/dev/sdb1 dos 0x7 ntfs HPFS/NTFS/exFAT
/dev/sdb2 dos 0x7 ntfs HPFS/NTFS/exFAT
/dev/sdb3 dos 0xf W95 Ext'd (LBA)
/dev/sdb4 dos 0x12 ntfs Compaq diagnostics
/dev/sdb5 dos 0x7 ntfs HPFS/NTFS/exFAT
/dev/sdb6 dos 0x83 ext4 Linux
/dev/sdb7 dos 0x82 swap Linux swap / Solaris
/dev/sdb8 dos 0x83 ext4 Linux
sudo fdisk -l
[sudo] password for noname:
Disk /dev/sda: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LM014-1EJ1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: EEB612D4-AF1F-4810-B73A-9E69D56E9702
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M Microsoft basic data
/dev/sda2 1050624 17827839 16777216 8G Linux swap
/dev/sda3 17827840 122685439 104857600 50G Microsoft basic data
/dev/sda4 122685440 290457599 167772160 80G Microsoft basic data
/dev/sda5 290457600 709887999 419430400 200G Linux filesystem
/dev/sda6 709888000 1443891199 734003200 350G Linux filesystem
/dev/sda7 1443891200 1953523711 509632512 243G Linux filesystem
Disk /dev/sdb: 596,17 GiB, 640135028736 bytes, 1250263728 sectors
Disk model: SAMSUNG HM641JI
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2bd2c32a
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 206847 204800 100M 7 HPFS/NTFS/exFAT
/dev/sdb2 206848 623861759 623654912 297,4G 7 HPFS/NTFS/exFAT
/dev/sdb3 623863806 1248159743 624295938 297,7G f W95 Ext'd (LBA)
/dev/sdb4 1248159744 1250260991 2101248 1G 12 Compaq diagnostics
/dev/sdb5 623863808 686778367 62914560 30G 7 HPFS/NTFS/exFAT
/dev/sdb6 686780416 965451775 278671360 132,9G 83 Linux
/dev/sdb7 1228943360 1248159743 19216384 9,2G 82 Linux swap / Solaris
/dev/sdb8 * 965453824 1228941311 263487488 125,6G 83 Linux
Partition table entries are not in disk order.
With the correct disk I would update and do
grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy
and
grub-mkconfig -o /boot/grub/grub.cfg
Can you confirm this?
Update 2023-12-26: Thanks you all for your help. That was scary but it worked out in the end. On boot grub version 2.12 greets me and everything still works.