# https://www.slant.co/topics/4820/~linux-bootloaders
1. GNU GRUB
2. Syslinux
3. rEFInd
4. Clover Bootloader
5. BURG
6. systemd-boot (Gummiboot)
7. LILO
1. gparted
设置分区表GPT,新建主分区FAT32,格式化分区FAT32,设置分区flag为boot
2. gdisk
剩余1M空间创建分区, GUID设置为ef02(BIOS boot partition),不需要格式化
3. 分区信息
sudo parted /dev/sdd print
Number Start End Size File system Name Flags
1 1049kB 61.5GB 61.5GB fat32 boot, esp
2 61.5GB 61.5GB 1032kB BIOS boot partition bios_grub
# 挂载分区
sudo mount /dev/sdd1 /mnt -o uid=$USER,gid=$USER
# x86_64: grub-efi-amd64-bin
sudo grub-install --target=i386-pc --boot-directory=/mnt/boot /dev/sdd --recheck
sudo grub-install --target=x86_64-efi --efi-directory=/mnt --boot-directory=/mnt/boot /dev/sdd --removable
# arm64: grub-efi-arm64-bin
sudo grub-install --target=i386-pc --boot-directory=/mnt/boot /dev/sdd --recheck
sudo grub-install --target=arm64-efi --efi-directory=/mnt --boot-directory=/mnt/boot /dev/sdd --removable
# Kylin-4.0.2-desktop-sp2-181112.J1-arm64
set default=liveinstall
set timeout=3
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
menuentry "Try Kylin without installing" --id liveinstall {
set gfxpayload=keep
linux /casper/Image boot=casper rootwait ro KEYBOARDTYPE=pc KEYTABLE=us ignore_uuid quiet
initrd /casper/initrd.img
}
# Kylin-4.0.2-desktop-sp2-181112.J1-arm64
set default=install
set timeout=3
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
menuentry "Start to Install Kylin OS" --id install {
set gfxpayload=keep
linux /casper/Image rootwait ro KEYBOARDTYPE=pc KEYTABLE=us console=tty1 ignore_uuid quiet
initrd /casper/initrd.img
}
原文:https://www.cnblogs.com/liujitao79/p/12617544.html