mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 14:36:58 +02:00
Merge pull request #437 from marineam/grub
grub_install: stash an exact copy of the MBR boot code.
This commit is contained in:
commit
d77449e9d6
@ -160,6 +160,10 @@ case "${FLAGS_target}" in
|
|||||||
sudo cp "/usr/lib/grub/i386-pc/boot.img" "${ESP_DIR}/${GRUB_DIR}"
|
sudo cp "/usr/lib/grub/i386-pc/boot.img" "${ESP_DIR}/${GRUB_DIR}"
|
||||||
sudo grub-bios-setup --device-map=/dev/null \
|
sudo grub-bios-setup --device-map=/dev/null \
|
||||||
--directory="${ESP_DIR}/${GRUB_DIR}" "${LOOP_DEV}"
|
--directory="${ESP_DIR}/${GRUB_DIR}" "${LOOP_DEV}"
|
||||||
|
# boot.img gets manipulated by grub-bios-setup so it alone isn't
|
||||||
|
# sufficient to restore the MBR boot code if it gets corrupted.
|
||||||
|
sudo dd bs=448 count=1 if="${LOOP_DEV}" \
|
||||||
|
of="${ESP_DIR}/${GRUB_DIR}/mbr.bin"
|
||||||
;;
|
;;
|
||||||
x86_64-efi)
|
x86_64-efi)
|
||||||
info "Installing default x86_64 UEFI bootloader."
|
info "Installing default x86_64 UEFI bootloader."
|
||||||
|
Loading…
Reference in New Issue
Block a user