Is changing grub the best way to change to a different boot device?

@jbkt23 did mean with “command line” what options to call the dracut with, not what what options the GRUB should pass to the kernel.

The man dracut gives a simple example:

dracut foobar.img 5.14.0-503.33.1.el9_5

Which should create a file foobar.img
Then you would replace the /boot/initramfs-5.14.0-503.33.1.el9_5.x86_64.img with the foobar.img

If boot with the “Rocky Linux (5.14.0-503.33.1.el9_5.x86_64) 9.5 (Blue Onyx)” still fails with the new /boot/initramfs-5.14.0-503.33.1.el9_5.x86_64.img, then you need more of those “add module/driver/config” options for the dracut.

I think I’ve got it (but I have to use the whole name):

[root@localhost ~] echo "/boot/initramfs-$(uname -r)"
/boot/initramfs-5.14.0-503.33.1.el9_5.x86_64
[root@localhost ~] dracut foobar.img 5.14.0-503.33.1.el9_5.x86_64
[root@localhost ~] ls -la foobar.img
-rw-------. 1 root root 35684456 Mar 28 17:45 foobar.img
[root@localhost boot] mv initramfs-5.14.0-503.33.1.el9_5.x86_64.img ~
[root@localhost boot] mv ~/foobar.img initramfs-5.14.0-503.33.1.el9_5.x86_64.img

The assumption is that the NVMe SSD will be embedded in the new foobar.img file.

Mission Accomplished.
Thanks

I ran the steps posted above, and now the Mac Mini boots normally into Rocky 9.5 from the NVMe SSD (/dev/nvme0n1) with the SATA SSD (/dev/sda1) mounted.

[root@localhost ~]# df -h
Filesystem                Size  Used Avail Use% Mounted on
devtmpfs                  4.0M     0  4.0M   0% /dev
tmpfs                     7.7G     0  7.7G   0% /dev/shm
tmpfs                     3.1G  8.9M  3.1G   1% /run
/dev/mapper/rl_vbox-root   70G  3.1G   67G   5% /
/dev/nvme0n1p2            960M  228M  733M  24% /boot
/dev/mapper/rl_vbox-home  852G  6.0G  846G   1% /home
/dev/nvme0n1p1            599M  7.1M  592M   2% /boot/efi
tmpfs                     1.6G  4.0K  1.6G   1% /run/user/0
/dev/sda1                 1.8T   32K  1.7T   1% /mnt/disk
[root@localhost ~]# runlevel
N 3
[root@localhost ~]# lsblk
NAME             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                8:0    0   1.8T  0 disk
└─sda1             8:1    0   1.8T  0 part /mnt/disk
nvme0n1          259:0    0 931.5G  0 disk
├─nvme0n1p1      259:1    0   600M  0 part /boot/efi
├─nvme0n1p2      259:2    0     1G  0 part /boot
└─nvme0n1p3      259:3    0 929.9G  0 part
  ├─rl_vbox-root 253:0    0    70G  0 lvm  /
  ├─rl_vbox-swap 253:1    0   7.8G  0 lvm  [SWAP]
  └─rl_vbox-home 253:2    0 852.2G  0 lvm  /home
[root@localhost ~]#
1 Like

I saw your post last night but was too tired to respond, but yes as you’ve found the steps were correct. I had to look at the man page first before I responded.

1 Like