uefi support
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								d34843347a
							
						
					
				
			
			
				commit
				
					
						a495a20d95
					
				
			
		
					 1 changed files with 30 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -35,22 +35,41 @@ printf '#!/bin/sh -l\n'
 | 
			
		|||
 | 
			
		||||
case "$target_os" in
 | 
			
		||||
   ubuntu|debian)
 | 
			
		||||
      if [ -s "$__global/explorer/efi" ]; then
 | 
			
		||||
         # FIXME: untested. maybe also just run update-grub for EFI system?
 | 
			
		||||
         printf 'grub-mkconfig --output=/boot/efi/EFI/%s/grub.cfg\n' "$target_os"
 | 
			
		||||
         printf 'mkdir -p /boot/efi/EFI/BOOT\n'
 | 
			
		||||
         printf 'cp /boot/efi/EFI/%s/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi' "$target_os"
 | 
			
		||||
      else
 | 
			
		||||
         printf 'grub-install "%s"\n' "$device"
 | 
			
		||||
         printf 'update-grub\n'
 | 
			
		||||
      fi
 | 
			
		||||
   ;;
 | 
			
		||||
   archlinux)
 | 
			
		||||
      if [ -s "$__global/explorer/efi" ]; then
 | 
			
		||||
         echo "EFI boot loader installation is on your operating system ($target_os) is currently not supported by this type (${__type##*/})." >&2
 | 
			
		||||
         echo "Please contribute an implementation for it if you can." >&2
 | 
			
		||||
         exit 1
 | 
			
		||||
      else
 | 
			
		||||
         printf 'grub-install "%s"\n' "$device"
 | 
			
		||||
         # bugfix/workarround: rebuild initramfs
 | 
			
		||||
         # FIXME: doesn't belong here
 | 
			
		||||
      printf 'grub-install "%s"\n' "$device"
 | 
			
		||||
         printf 'mkinitcpio -p linux\n'
 | 
			
		||||
         printf 'grub-mkconfig -o /boot/grub/grub.cfg\n'
 | 
			
		||||
      fi
 | 
			
		||||
   ;;
 | 
			
		||||
   centos)
 | 
			
		||||
      if [ -s "$__global/explorer/efi" ]; then
 | 
			
		||||
         printf 'grub2-mkconfig --output=/boot/efi/EFI/%s/grub.cfg\n' "$target_os"
 | 
			
		||||
         printf 'mkdir -p /boot/efi/EFI/BOOT\n'
 | 
			
		||||
         printf 'cp /boot/efi/EFI/%s/grubx64.efi /boot/efi/EFI/BOOT/bootx64.efi' "$target_os"
 | 
			
		||||
      else
 | 
			
		||||
         printf 'grub2-install "%s"\n' "$device"
 | 
			
		||||
         printf 'grub2-mkconfig --output=/boot/grub2/grub.cfg\n'
 | 
			
		||||
      fi
 | 
			
		||||
   ;;
 | 
			
		||||
   *)
 | 
			
		||||
      echo "Your operating system ($os) is currently not supported by this type (${__type##*/})." >&2
 | 
			
		||||
      echo "Your operating system ($target_os) is currently not supported by this type (${__type##*/})." >&2
 | 
			
		||||
      echo "If you can, please contribute an implementation for it." >&2
 | 
			
		||||
      exit 1
 | 
			
		||||
   ;;
 | 
			
		||||
| 
						 | 
				
			
			@ -74,4 +93,5 @@ chmod +x "\$script"
 | 
			
		|||
# Run script in chroot
 | 
			
		||||
relative_script="\${script#$chroot}"
 | 
			
		||||
chroot "$chroot" "\$relative_script"
 | 
			
		||||
rm -rf \$script
 | 
			
		||||
DONE
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue