I have two disks in one system:
1.) Old SSD and I'm trying to make the bootable partition with EFI
(note this system has not been upgraded in over 5-years, so upgrading it is not
possible)
It just runs two old programs from this disk. The disk comes from an old Atom
- computer so I installed in a new computer Intel i5
The new computer had this old SSD disk installed in addition it has a new
nvme-disk. This nvme runs the current Gentoo.
The old SSD had a bootable partition /dev/sda1 ext2 which I mounted on
nmve-disk and made an old kernel backup to /boot_backup on the same SSD drive.
- I deleted the /dev/sda1 partition and created new partition EFI System and
format it as vfat:
mkfs.fat -F 32 /dev/sda1
- mounted the new sda1 partition under /atom/efi (root partition /dev/sda3 is
mounted in dir: /atom)
- run:
grub-install --target=x86_64-efi --efi-directory=/atom/efi
- copied to SSD /boot dir. all the old kernel files (I backup previously):
System.map-current
config-current
kernel-current
run:
grub-mkconfig -o /atom/boot/grub/grub.cfg
The old /boot/grub had old file: grub.conf with entries:
root (hd0,0)
kernel /boot/kernel-current root=/dev/sda3 vga=normal
but so the above command generated new file: grub.cfg with new entries and took
my kernel files from nvme-disk: vmlinuz-6.1.57-gentoo
'Gentoo GNU/Linux, with Linux 6.1.57-gentoo' not my old kerenel files from
"/atom/boot"
In /efi/EFI/genoo directory there is binary file:
-rwxr-xr-x 1 root root 135168 Dec 6 13:38 grubx64.efi
Does this file grubx64.efi point to the boot directory and configuration file:
grub.cfg ?
I have noticed grub-install has some options like: --boot-directory=DIR
would it help somehow to point to /atom/boot directory so it can use:
"kernel-current" instead of "vmlinuz-6.1.57-gentoo"
example:
grub-install --target=x86_64-efi --efi-directory=/atom/efi
--boot-directory=/atom/boot
Or is it possible to edit manually grub.cfg even though it says # DO NOT EDIT
THIS FILE
2.) Another solution is I could bootstrap the old SSD /dev/sda and try to try
to install with grub
but that grub is and old version 0.97-something and is not compiled with
"GRUB_PLATFORMS="efi-64"
--
Thelma