My partition table looks like this.
/dev/mmcblk1p1 2048 6143 4096 2M BIOS boot
/dev/mmcblk1p2 6144 4200447 4194304 2G Linux filesystem
/dev/mmcblk1p3 4200448 16783359 12582912 6G Linux filesystem
I'm booting from BIOS mode. UEFI is not supported on the devices.
I have two identical devices. On device A grub is taking the configuration from "/dev/mmcblk1p2
"/boot/grub/grub.cfg
.
On device B I copied over the content in the partitions /dev/mmcblk1p2
and /dev/mmcblk1p3
.
I then installed grub on device B with:
grub-install /dev/mmcblk1
On device A grub was already installed correctly.
In the grub menu I can correctly select the partitions I want to boot into. However grub is taking the grub.cfg from /dev/mmcblk1p3
instead of /dev/mmcblk1p2
.
I want grub to be installed on /dev/mmcblk1p2
because this is my "recovery" partition.
I've booted into different partitions and ran grub-install /dev/mmcblk1
but it didn't have any effect on which partition grub was going to take the grub.cfg
file from.
I've also booted from an USB stick and ran the command from there.
Question: How can I make grub take the /boot/grub/grub.cfg
from /dev/mmcblk1p2
instead of /dev/mmcblk1p3
?
I have seen this Stackoverflow question but it didn't help me further.