Add support for legacy BIOS boot
This commit is contained in:
		
							parent
							
								
									955ec704e8
								
							
						
					
					
						commit
						ba1e4bff49
					
				| @ -1,5 +1,10 @@ | |||||||
| #!/bin/sh | #!/bin/sh | ||||||
| 
 | 
 | ||||||
|  | if [ "$bootloader" == "EFI" ]; then | ||||||
|  | 	echo "~> Not an EFI host, not checking for EFI." | ||||||
|  | 	exit 0 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| ls /sys/firmware/efi/efivars 2>/tmp/arch-maride-flavour_checks_uefi_error.log 1>/tmp/arch-maride-flavour_checks_uefi_out.log | ls /sys/firmware/efi/efivars 2>/tmp/arch-maride-flavour_checks_uefi_error.log 1>/tmp/arch-maride-flavour_checks_uefi_out.log | ||||||
| return=$? | return=$? | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -16,6 +16,15 @@ if [ "$answer" != "y" ] && [ "$answer" != "Y" ]; then | |||||||
| 	exit 1 | 	exit 1 | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | echo -n "=> Do you want to install on EFI or BIOS? BIOS is required for VirtalBox hosts (E/b) " | ||||||
|  | read answer | ||||||
|  | 
 | ||||||
|  | if [ "$answer" != "e" ] && [ "$answer" != "E" ]; then | ||||||
|  | 	export bootloader="BIOS"; | ||||||
|  | else | ||||||
|  | 	export bootloader="EFI"; | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| echo "=> Please enter the full path to the block device the installation should take place on: (e.g. /dev/sda)" | echo "=> Please enter the full path to the block device the installation should take place on: (e.g. /dev/sda)" | ||||||
| echo "   Make sure to choose a drive, not a partition." | echo "   Make sure to choose a drive, not a partition." | ||||||
| echo "   Hint: here's a list of devices that may be the right:" | echo "   Hint: here's a list of devices that may be the right:" | ||||||
|  | |||||||
| @ -17,8 +17,13 @@ echo -e "~> Choose a hostname: " | |||||||
| read hostname | read hostname | ||||||
| echo $hostname > /mnt/etc/hostname | echo $hostname > /mnt/etc/hostname | ||||||
| 
 | 
 | ||||||
| echo "~> Configuring 'grub'" | echo "~> Configuring 'grub' for $bootloader" | ||||||
|  | if [ "$bootloader" == "EFI" ]; then | ||||||
| 	arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch_GRUB | 	arch-chroot /mnt grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Arch_GRUB | ||||||
|  | else | ||||||
|  | 	arch-chroot /mnt grub-install --target=i386-pc /dev/*da | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub | echo "GRUB_CMDLINE_LINUX='cryptdevice=UUID=`blkid -o value ${blockdevice}2 | head -n 1`:cryptroot'" > /mnt/etc/default/grub | ||||||
| arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg | arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user