Created
March 11, 2014 19:19
-
-
Save marineam/9493021 to your computer and use it in GitHub Desktop.
CoreOS postinst
This file contains 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
# replacement psudocode for src/platform/installer | |
EFIPART=/dev/sda1 | |
NEWROOT=/dev/sda4 | |
mount -o ro $NEWROOT /media/newroot | |
mount $EFIPART /media/efi | |
# Normal boot | |
cp /media/newroot/boot/vmlinuz /media/efi/syslinux/vmlinuz.B | |
cp /media/newroot/boot/syslinux/root.B.cfg /media/efi/syslinux/root.B.cfg | |
# Xen boot via pvbrub | |
cp /media/newroot/boot/grub/menu.lst.B /media/efi/boot/grub/menu.lst | |
# Xen boot via HVM | |
if [[ $(systemd-detect-virt) == xen ]]; then | |
cp /media/newroot/boot/syslinux/default.cfg.B /media/efi/syslinux/default.cfg | |
fi | |
# Update gptprio flags, success=1, tries=1 | |
cgpt add -i4 -S0 -T1 /dev/sda |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment