ARM64 和 AMD64 机器上的 Debian 类系统的 grub 配置区别不大,给你一个案例参考:
文件目录:
/boot/grub/grub.cfg
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-25a7c9e2-3e8e-43d4-ac73-83d119506622' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod xfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 25a7c9e2-3e8e-43d4-ac73-83d119506622
else
search --no-floppy --fs-uuid --set=root 25a7c9e2-3e8e-43d4-ac73-83d119506622
fi
echo 'Loading Linux 6.1.0-7-amd64 ...'
linux /boot/vmlinuz-6.1.0-7-amd64 root=UUID=25a7c9e2-3e8e-43d4-ac73-83d119506622 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-7-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-25a7c9e2-3e8e-43d4-ac73-83d119506622' {
menuentry 'Debian GNU/Linux, with Linux 6.1.0-7-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-7-amd64-advanced-25a7c9e2-3e8e-43d4-ac73-83d119506622' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod xfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 25a7c9e2-3e8e-43d4-ac73-83d119506622
else
search --no-floppy --fs-uuid --set=root 25a7c9e2-3e8e-43d4-ac73-83d119506622
fi
echo 'Loading Linux 6.1.0-7-amd64 ...'
linux /boot/vmlinuz-6.1.0-7-amd64 root=UUID=25a7c9e2-3e8e-43d4-ac73-83d119506622 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-7-amd64
}
menuentry 'Debian GNU/Linux, with Linux 6.1.0-7-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-7-amd64-recovery-25a7c9e2-3e8e-43d4-ac73-83d119506622' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod xfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 25a7c9e2-3e8e-43d4-ac73-83d119506622
else
search --no-floppy --fs-uuid --set=root 25a7c9e2-3e8e-43d4-ac73-83d119506622
fi
echo 'Loading Linux 6.1.0-7-amd64 ...'
linux /boot/vmlinuz-6.1.0-7-amd64 root=UUID=25a7c9e2-3e8e-43d4-ac73-83d119506622 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-7-amd64
}
} |