Could use a little help re-installing grub

My situation is 2 drives, one for operating system and one for storage.
Original OS drive died.

I had another backup drive with a complete install so I just installed it and updated it.
I need the other drive because it has all my latest files.

When I boot, the first on the list is for the old failed drive and obviously will not boot.
I can navigate grub and get correct drive to boot.

sudo grub-install
sudo grub-mkconfig

Both complete with no errors … when I reboot nothing has changed … it is installing grub on the wrong drive … or grub is booting from the wrong drive.

**\[fred-shop fred\]#** cat /etc/fstab 
# /etc/fstab: static file system information. 
# 
# Use 'blkid' to print the universally unique identifier for a device; this may 
# be used with UUID= as a more robust way to name devices that works even if 
# disks are added and removed. See fstab(5). 
# 
# <file system>             <mount point>  <type>  <options>  <dump>  <pass> 
UUID=0720-6328                            /boot/efi      vfat    defaults,umask=0077 0 2 
UUID=3633c94d-f188-4d8b-8116-f2b4f952d8ec /              btrfs   subvol=/@,defaults,compress=zstd:1 0 0 
UUID=3633c94d-f188-4d8b-8116-f2b4f952d8ec /home          btrfs   subvol=/@home,defaults,compress=zstd:1 0 0 
UUID=3633c94d-f188-4d8b-8116-f2b4f952d8ec /var/cache     btrfs   subvol=/@cache,defaults,compress=zstd:1 0 0 
UUID=3633c94d-f188-4d8b-8116-f2b4f952d8ec /var/log       btrfs   subvol=/@log,defaults,compress=zstd:1 0 0 
**\[fred-shop fred\]#**

I think that if I could just swap drive positions to change sdb1 and sdb2 since both drives have grub installed.
One is a 2.5" ssd and other is standard 3.5" … drives will not swap and cable wont reach.

Could use any help offered how to correct this.


Moderator edit: corrected your formatting.

From a chroot, try installing the install-grub script and run it. :backhand_index_pointing_down:

pacman -S install-grub && install-grub

You may also want to enable the os-prober in /etc/default/grub and run update-grub first before running install-grub, so that it’ll correctly pick the drive(s) with one or multiple operating systems installed.

The second command just outputs to standard out. (Or are you redirecting that to /boot/grub/grub.cfg?)

Or use this instead, for the latter command.

sudo update-grub

It calls grub-mkconfig for you, and saves it.

$ cat `which update-grub`
#! /bin/sh
set -e
grub-mkconfig -o /boot/grub/grub.cfg "$@"

# workaround for https://git.savannah.gnu.org/cgit/grub.git/commit/id=3cf2e848bc03c44d30bb87e583d12efe7e7ccf75
# if grub is not updated in MBR/EFI dashes still won't work, hence we remove them
sed -i -e '/cryptomount -u/ {s/-//g;s/ u/ -u/g}' /boot/grub/grub.cfg

thank you very much … I believe update-grub is what I needed

I’m going to be honest I’m confused … I keep starting off of snapshots … I love manjaro for having those.
Seems like every time I start from one … I lose all my personal information.
So I start over … this time the system actually crashed and had to reboot …

I’m in a area where current temp is 105F and have a fan on me and computer … I do not have AC for the computer … I love manjaro and it is not the OS fault it crashed.

All I’m saying … I was forced into a reboot and it just automatically started on it’s own from the first selection in grub …
Then I ran update-grub and I saw where it picked up the different drives and also 3 snapshots … I saw and read and thought we got er this time … I will reboot it tomorrow.

I agree, snapshots are great. You can do far more than just rollback with them.

Just make sure not to do your day to day usage when booting into these snapshots.

Get or do what you need, then get out.

If you need it further, restore it.

When you are in these snapshots, type:

findmnt /

Things will appear to work fine. But that is your new root, which can cause issues.

Also, it is creating useless bloat every time you boot into these snapshots, and use them.

Timeshift has the option to include the @home subvolume.

Sounds like you would like it included.

Just load the Timeshift GUI and:

  • SettingsUsers

  • And check: :check_box_with_check: Include @home subvolume in backups

If you use snapshots, you may want to increase the limit from a max of 3.

It’s important not to let a btrfs filesystem fill up.

So if you are comfortable deleting old snapshots yourself, and watching space you can increase it here:

/etc/timeshift-autosnap.conf


maxSnapshots=3