Last active
April 25, 2021 03:15
-
-
Save Rockheung/092d28115806fb47f51295a46060f531 to your computer and use it in GitHub Desktop.
Modified Linuxium script to fix grub on efi32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Linuxium's installation script for booting from a 32-bit bootloader | |
chroot /target mount -t proc proc /proc | |
chroot /target mount -t sysfs sysfs /sys | |
mount --bind /dev /target/dev | |
mount --bind /run /target/run | |
chroot /target mount /dev/sda2 /boot/efi/ | |
chroot /target apt-get -y purge grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed | |
chroot /target rm -rf /boot/grub/ | |
chroot /target rm -rf /boot/efi/EFI/ubuntu/ | |
chroot /target apt-get update | |
chroot /target apt-get -y install grub-efi-ia32-bin grub-efi-ia32 grub-common grub2-common | |
chroot /target grub-install --target=i386-efi /dev/sda --efi-directory=/boot/efi/ --boot-directory=/boot/ | |
chroot /target grub-mkconfig -o /boot/grub/grub.cfg | |
chroot /target umount /sys | |
chroot /target umount /proc | |
umount /target/run | |
umount /target/dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment