You miss the /mnt/d_sda2 so it is /mnt/d_sda2/boot/grub/grub.cfg to be editing the file that will be read on that partition when mounted as the new / with the sed command. You edit the running file with your sed command you use in the step 3 without editing the file on the mounted partition it will never find the new /. And the /@ in the EFI grub.cfg is not present in my file in your step 2.Thanks again for your responses. So far no luck. Many adventures in `grub >` and `(initramfs)`, but the changes I made in the 3 files failed to produce a bootable system.
I'll summarize what I've done. Maybe then my mistakes will be obvious.
My disk layout.UUIDs and filesystemsCode:
sudo fdisk -lDisk /dev/sda: 465.76 GiB, 500107862016 bytes, 976773168 sectorsDisk model: CT500MX500SSD1 Units: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisklabel type: gptDisk identifier: EA32A721-D649-4B37-8019-9490264AB8BDDevice Start End Sectors Size Type/dev/sda1 2048 585727 583680 285M EFI System/dev/sda2 585728 34375679 33789952 16.1G Linux filesystem/dev/sda3 34375680 976771071 942395392 449.4G Linux filesystemDisk /dev/zram0: 9.32 GiB, 10003066880 bytes, 2442155 sectorsUnits: sectors of 1 * 4096 = 4096 bytesSector size (logical/physical): 4096 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytes
Code:
/dev/sdb2: SEC_TYPE="msdos" UUID="DEB0-0001" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="34862533-02"/dev/sdb1: BLOCK_SIZE="2048" UUID="2024-02-10-11-31-15-00" LABEL="Debian 12.5.0 amd64 n" TYPE="iso9660" PTUUID="34862533" PTTYPE="dos" PARTUUID="34862533-01"/dev/sda2: UUID="e042a944-8efa-4772-b46e-a24b878b4f7e" UUID_SUB="5f638872-e16b-40bd-bf36-0f8906d7423f" BLOCK_SIZE="4096" TYPE="btrfs" PARTLABEL="new" PARTUUID="e239ad42-7f70-479e-908e-fa9cc24b03ed"/dev/sda3: UUID="b7bdceb4-660a-4951-94cd-df9412b74f93" UUID_SUB="ad30cff9-2aa8-4e76-9f3c-eff63ec8d80a" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="a6dfc447-b7a1-42da-9adf-b8570712fd0b"/dev/sda1: UUID="C0E2-7937" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="ed7e4fc4-e336-4e94-9cf5-deb796079066"/dev/zram0: UUID="00d0c2ac-5d3e-406d-b2bf-7f033402c6ad" TYPE="swap"
2. Update `/boot/efi/EFI/debian/grub.cfg` from,toCode:
search.fs_uuid b7bdceb4-660a-4951-94cd-df9412b74f93 root hd0,gpt3 set prefix=($root)'/@/boot/grub'configfile $prefix/grub.cfg
Code:
search.fs_uuid e042a944-8efa-4772-b46e-a24b878b4f7e root hd0,gpt2set prefix=($root)'/@/boot/grub'configfile $prefix/grub.cfg
3. update `/boot/grub/grub.cfg` using the sed replace command,Code:
sed -i "s/b7bdceb4-660a-4951-94cd-df9412b74f93/e042a944-8efa-4772-b46e-a24b878b4f7e/g" /boot/grub/grub.cfg
5. reboot... which lands me in the `grub>` prompt
No idea what I'm missing.
Thanks again,
Code:
root@9600k:~# cat /boot/efi/EFI/debian/grub.cfg search.fs_uuid 766dcfc3-a1e4-495f-86e2-570205723fef root set prefix=($root)'/boot/grub'configfile $prefix/grub.cfg
Statistics: Posted by RedGreen925 — 2024-06-30 04:08