fickit: install grub on disks instead of syslinux which cannot be used as both UEFI and BIOS bootloader
This commit is contained in:
parent
f983da9815
commit
8c754fe265
1 changed files with 40 additions and 2 deletions
|
@ -34,11 +34,11 @@ onboot:
|
||||||
- /dev:/dev
|
- /dev:/dev
|
||||||
|
|
||||||
- name: install-syslinux
|
- name: install-syslinux
|
||||||
image: nemunaire/syslinux:876bf253b5e2db33fe64f5ffa796e5e8609a6792
|
image: nemunaire/syslinux:4e080937962e68f9f6a962ff6890cb4c62720841
|
||||||
command: ["/bin/sh", "/root/install_syslinux", "/dev/sda" , "/dev/sdb" ]
|
command: ["/bin/sh", "/root/install_syslinux", "/dev/sda" , "/dev/sdb" ]
|
||||||
binds:
|
binds:
|
||||||
- /dev:/dev
|
- /dev:/dev
|
||||||
- /root/install_syslinux:/root/install_syslinux:ro
|
- /root/install_grub:/root/install_syslinux:ro
|
||||||
- /root/update_imgs:/root/update_imgs:ro
|
- /root/update_imgs:/root/update_imgs:ro
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,6 +98,44 @@ files:
|
||||||
# Write images
|
# Write images
|
||||||
/root/update_imgs
|
/root/update_imgs
|
||||||
|
|
||||||
|
done
|
||||||
|
mode: "0550"
|
||||||
|
- path: root/install_grub
|
||||||
|
contents: |
|
||||||
|
#!/bin/sh
|
||||||
|
for p; do
|
||||||
|
mkfs.vfat ${p}1
|
||||||
|
mkdir -p /boot
|
||||||
|
mount ${p}1 /boot/
|
||||||
|
mkdir -p /boot/EFI/boot /boot/imgs
|
||||||
|
grub-mkimage -o "/boot/EFI/boot/bootx64.efi" -p /efi/boot -O x86_64-efi fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop efi_uga ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2
|
||||||
|
grub-install --boot-directory="/boot/" --target=i386-pc "${p}"
|
||||||
|
cat <<EOF > /boot/grub/grub.cfg
|
||||||
|
set timeout=3
|
||||||
|
|
||||||
|
menuentry 'FIC Backend' {
|
||||||
|
set root=(hd0,1)
|
||||||
|
linux /imgs/fickit-kernel console=ttyS0 console=tty0 root=fickit-backend-squashfs.img
|
||||||
|
initrd /imgs/fickit-boot-initrd.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'FIC Frontend' {
|
||||||
|
set root=(hd0,1)
|
||||||
|
linux /imgs/fickit-kernel console=ttyS0 console=tty0 root=fickit-frontend-squashfs.img
|
||||||
|
initrd /imgs/fickit-boot-initrd.img
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry 'Update images' {
|
||||||
|
set root=(hd0,1)
|
||||||
|
linux /imgs/fickit-kernel console=ttyS0 console=tty0
|
||||||
|
initrd /imgs/fickit-update-initrd.img
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
cp "/boot/grub/grub.cfg" "/boot/EFI/boot/grub.cfg"
|
||||||
|
|
||||||
|
# Write images
|
||||||
|
/root/update_imgs
|
||||||
|
|
||||||
done
|
done
|
||||||
mode: "0550"
|
mode: "0550"
|
||||||
- path: etc/sfdisk_schema
|
- path: etc/sfdisk_schema
|
||||||
|
|
Reference in a new issue