ChangeLog:

* Detect UEFI and Kernel Arch mismatch and add noefi to kernel
parameters in such a case, while uefi booting archboot (not in setup
script)
* Split x86_64 and i686 kernel parameter variables in uefi
grub_archboot.cfg due to above reason
* use /sys/class/dmi/id instead of dmidecode, dmidecode removed from
initramfs (bbut arch_dmidecode still exists)
* Added support for separate /usr in grub2 config, added grub2 search
hints support in config
* Re arranged bootloader menu, submenus per firmware, suffixed _bios
or _uefi_ to bootloader functions
* Minor (misc.) modifications in setup script

TODO: Implement Apple mactel-boot efi bless code
TODO: Implement elilo for x86_64 UEFI
This commit is contained in:
Tobias Powalowski 2012-02-20 08:20:18 +01:00
parent 6b059b74bf
commit 5d40b47f88
19 changed files with 386 additions and 227 deletions

View file

@ -8,7 +8,7 @@ FILES=""
# SETUP # SETUP
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS="arch_core_install arch_installer arch_bootmessage_allinone arch_tz arch_keymap arch_acpi arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_intel_wireless arch_linux_firmware arch_ide_blacklist arch_hwdetect arch_udevtrigger ide pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman_lts arch_kexec arch_ppp arch_pppoe arch_grub2 arch_dmidecode arch_efibootmgr arch_lilo arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless_lts arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_weechat arch_nmap arch_tcpdump arch_speedtouch arch_openconnect arch_dnsmasq arch_platform arch_mmc arch_hypervisor net" HOOKS="arch_core_install arch_installer arch_bootmessage_allinone arch_tz arch_keymap arch_acpi arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_intel_wireless arch_linux_firmware arch_ide_blacklist arch_hwdetect arch_udevtrigger ide pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman_lts arch_kexec arch_ppp arch_pppoe arch_grub2 arch_efibootmgr arch_lilo arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless_lts arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_weechat arch_nmap arch_tcpdump arch_speedtouch arch_openconnect arch_dnsmasq arch_platform arch_mmc arch_hypervisor net"
### NETWORK SETUP ### NETWORK SETUP
# the default install media creating process, uses latest files from svn! # the default install media creating process, uses latest files from svn!

View file

@ -8,7 +8,7 @@ FILES=""
# SETUP # SETUP
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS="arch_ftp_install arch_installer arch_bootmessage_allinone arch_tz arch_keymap arch_acpi arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_dmidecode arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_weechat arch_nmap arch_tcpdump arch_speedtouch arch_openconnect arch_dnsmasq arch_platform arch_mmc arch_hypervisor net" HOOKS="arch_ftp_install arch_installer arch_bootmessage_allinone arch_tz arch_keymap arch_acpi arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_weechat arch_nmap arch_tcpdump arch_speedtouch arch_openconnect arch_dnsmasq arch_platform arch_mmc arch_hypervisor net"
### NETWORK SETUP ### NETWORK SETUP
# the default install media creating process, uses latest files from svn! # the default install media creating process, uses latest files from svn!

View file

@ -8,7 +8,7 @@ FILES=""
# SETUP # SETUP
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS="arch_ftp_install arch_installer arch_tz arch_keymap arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_dmidecode arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_platform arch_chntpw arch_mmc arch_pxelinux net" HOOKS="arch_ftp_install arch_installer arch_tz arch_keymap arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_platform arch_chntpw arch_mmc arch_pxelinux net"
### NETWORK SETUP ### NETWORK SETUP
# the default install media creating process, uses latest files from svn! # the default install media creating process, uses latest files from svn!

View file

@ -8,7 +8,7 @@ FILES=""
# SETUP # SETUP
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS="arch_ftp_install arch_installer arch_tz arch_keymap arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_dmidecode arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_mmc arch_platform net" HOOKS="arch_ftp_install arch_installer arch_tz arch_keymap arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_mmc arch_platform net"
### NETWORK SETUP ### NETWORK SETUP
# the default install media creating process, uses latest files from svn! # the default install media creating process, uses latest files from svn!

View file

@ -8,7 +8,7 @@ FILES=""
# SETUP # SETUP
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS="arch_core_install arch_installer arch_tz arch_keymap arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_dmidecode arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_pxelinux arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_platform arch_mmc net" HOOKS="arch_core_install arch_installer arch_tz arch_keymap arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_addons arch_vim arch_pxelinux arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_platform arch_mmc net"
### NETWORK SETUP ### NETWORK SETUP
# the default install media creating process, uses latest files from svn! # the default install media creating process, uses latest files from svn!

View file

@ -8,7 +8,7 @@ FILES=""
# SETUP # SETUP
# #
# Please change the hooks only if you know what you are doing. # Please change the hooks only if you know what you are doing.
HOOKS="arch_core_install arch_installer arch_tz arch_keymap arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_dmidecode arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_vim arch_addons arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_platform arch_mmc net" HOOKS="arch_core_install arch_installer arch_tz arch_keymap arch_acpi arch_bootmessage arch_motd arch_memtest arch_pam arch_shadow arch_base arch_udev arch_fb arch_linux_firmware arch_intel_wireless arch_hwdetect arch_udevtrigger pata scsi sata arch_cdrom arch_pcspkr arch_net arch_isdn pcmcia arch_rtc arch_sound usb usbinput arch_fw arch_floppy arch_virtio dmraid arch_advanced_root arch_devicemapper arch_mdadm arch_lvm2 arch_encrypt btrfs arch_filesystems arch_remote arch_cpufreq arch_links arch_pacman arch_kexec arch_ppp arch_pppoe arch_lilo arch_grub2 arch_efibootmgr arch_syslinux arch_iptables arch_capi4k arch_pciutils arch_usbutils arch_openvpn arch_vpnc arch_pptpclient arch_smartmontools arch_licenses arch_wireless arch_linux_atm arch_netcfg arch_fsarchiver arch_vim arch_addons arch_wipe arch_testdisk arch_ddrescue arch_chntpw arch_platform arch_mmc net"
### NETWORK SETUP ### NETWORK SETUP
# the default install media creating process, uses latest files from svn! # the default install media creating process, uses latest files from svn!

View file

@ -46,7 +46,7 @@ build ()
DEVEL="$DEVEL $(echo $i)" DEVEL="$DEVEL $(echo $i)"
done done
SUPPORT="" SUPPORT=""
SUPPORT="$(echo -n $(pacman -Ss | grep -e ^core | grep -v '(' | sed -e 's/\ .*/ /g' -e 's#core/##g')) dmidecode gnu-netcat dosfstools ntfs-3g_ntfsprogs fuse dhclient v86d" SUPPORT="$(echo -n $(pacman -Ss | grep -e ^core | grep -v '(' | sed -e 's/\ .*/ /g' -e 's#core/##g')) gnu-netcat dosfstools ntfs-3g_ntfsprogs fuse dhclient v86d"
for i in base devel lib support; do for i in base devel lib support; do
mkdir $i mkdir $i
svn co -N ${SVNSETUP} $i svn co -N ${SVNSETUP} $i

View file

@ -2,7 +2,7 @@
build () build ()
{ {
MODULES="" MODULES="$(checked_modules "/firmware/dmi-sysfs")"
BINARIES="/usr/sbin/dmidecode /usr/sbin/biosdecode" BINARIES="/usr/sbin/dmidecode /usr/sbin/biosdecode"
FILES="" FILES=""
} }

View file

@ -23,7 +23,7 @@ linux-atm netcfg parted tzdata ntp v86d iw crda wireless-regdb libnl iproute2 dh
syslinux mtools perl gmp krb5 sqlite3 db dbus-core libcap fsarchiver xz librpcsecgss \ syslinux mtools perl gmp krb5 sqlite3 db dbus-core libcap fsarchiver xz librpcsecgss \
libtirpc wipe ddrescue testdisk ifplugd libdaemon wpa_actiond rfkill libgssglue icu gptfdisk \ libtirpc wipe ddrescue testdisk ifplugd libdaemon wpa_actiond rfkill libgssglue icu gptfdisk \
btrfs-progs nilfs-utils linux-firmware ipw2100-fw ipw2200-fw iana-etc chntpw libusb \ btrfs-progs nilfs-utils linux-firmware ipw2100-fw ipw2200-fw iana-etc chntpw libusb \
grub2-common grub2-bios grub2-efi-x86_64 dmidecode efibootmgr file eject keyutils yp-tools \ grub2-common grub2-bios grub2-efi-x86_64 efibootmgr file eject keyutils yp-tools \
curl smartmontools dnsmasq lftp openconnect libxml2 libproxy speedtouch tcpdump nmap lua weechat \ curl smartmontools dnsmasq lftp openconnect libxml2 libproxy speedtouch tcpdump nmap lua weechat \
gnutls nettle libtasn1 bind rpcbind expat progsreiserfs glib2 freetype2 libssh2 libfetch libedit \ gnutls nettle libtasn1 bind rpcbind expat progsreiserfs glib2 freetype2 libssh2 libfetch libedit \
talloc eventlog idnkit libjpeg-turbo pth gnupg libksba libassuan pinentry dirmngr gnupg2 gpgme" talloc eventlog idnkit libjpeg-turbo pth gnupg libksba libassuan pinentry dirmngr gnupg2 gpgme"

View file

@ -23,7 +23,7 @@ v86d iw crda wireless-regdb libnl iproute2 dhclient syslinux mtools perl gmp krb
dbus-core libcap fsarchiver xz librpcsecgss libtirpc wipe ddrescue testdisk ifplugd \ dbus-core libcap fsarchiver xz librpcsecgss libtirpc wipe ddrescue testdisk ifplugd \
libdaemon wpa_actiond rfkill libgssglue icu gptfdisk btrfs-progs \ libdaemon wpa_actiond rfkill libgssglue icu gptfdisk btrfs-progs \
nilfs-utils linux-firmware ipw2100-fw ipw2200-fw iana-etc chntpw libusb grub2-common grub2-bios \ nilfs-utils linux-firmware ipw2100-fw ipw2200-fw iana-etc chntpw libusb grub2-common grub2-bios \
grub2-efi-x86_64 dmidecode efibootmgr file eject keyutils yp-tools smartmontools curl dnsmasq \ grub2-efi-x86_64 efibootmgr file eject keyutils yp-tools smartmontools curl dnsmasq \
lftp openconnect libproxy libxml2 speedtouch tcpdump nmap lua weechat gnutls nettle libtasn1 bind rpcbind \ lftp openconnect libproxy libxml2 speedtouch tcpdump nmap lua weechat gnutls nettle libtasn1 bind rpcbind \
expat progsreiserfs glib2 freetype2 libssh2 libfetch libedit talloc eventlog idnkit libjpeg-turbo \ expat progsreiserfs glib2 freetype2 libssh2 libfetch libedit talloc eventlog idnkit libjpeg-turbo \
pth gnupg libksba libassuan pinentry dirmngr gnupg2 gpgme" pth gnupg libksba libassuan pinentry dirmngr gnupg2 gpgme"

View file

@ -207,6 +207,7 @@ _prepare_grub2_uefi_arch_specific_iso_files() {
## Create grub.cfg for grub-mkstandalone memdisk for boot${_SPEC_UEFI_ARCH}.efi ## Create grub.cfg for grub-mkstandalone memdisk for boot${_SPEC_UEFI_ARCH}.efi
cat << EOF > "${ALLINONE}/efi/grub2/grub_standalone_archboot.cfg" cat << EOF > "${ALLINONE}/efi/grub2/grub_standalone_archboot.cfg"
insmod usbms insmod usbms
insmod usb_keyboard insmod usb_keyboard
@ -225,8 +226,8 @@ insmod hfsplus
insmod linux insmod linux
insmod chain insmod chain
search --file --no-floppy --set=archboot /efi/grub2/grub_archboot.cfg search --file --no-floppy --set=archboot "/efi/grub2/grub_archboot.cfg"
source (\${archboot})/efi/grub2/grub_archboot.cfg source "(\${archboot})/efi/grub2/grub_archboot.cfg"
EOF EOF
@ -296,23 +297,39 @@ _prepare_grub2_uefi_iso_files() {
## Create the actual grub2 uefi config file ## Create the actual grub2 uefi config file
cat << EOF > "${ALLINONE}/efi/grub2/grub_archboot.cfg" cat << EOF > "${ALLINONE}/efi/grub2/grub_archboot.cfg"
set _kernel_params="gpt loglevel=7"
if [ "\${grub_platform}" == "efi" ]; then if [ "\${grub_platform}" == "efi" ]; then
set _UEFI_ARCH="\${grub_cpu}" set _UEFI_ARCH="\${grub_cpu}"
set _kernel_params="\${_kernel_params} add_efi_memmap none=UEFI_ARCH_\${_UEFI_ARCH}"
if [ "\${grub_cpu}" == "x86_64" ]; then if [ "\${grub_cpu}" == "x86_64" ]; then
set _SPEC_UEFI_ARCH="x64" set _SPEC_UEFI_ARCH="x64"
elif [ "\${grub_cpu}" == "i386" ]; then
set _SPEC_UEFI_ARCH="ia32" set _kernel_x86_64_params="\${_kernel_params}"
fi set _kernel_i686_params="\${_kernel_params} noefi"
fi fi
# search --file --no-floppy --set=archboot /efi/grub2/grub_archboot.cfg if [ "\${grub_cpu}" == "i386" ]; then
# search --file --no-floppy --set=archboot /efi/grub2/grub_standalone_archboot.cfg set _SPEC_UEFI_ARCH="ia32"
set _kernel_x86_64_params="\${_kernel_params} noefi"
set _kernel_i686_params="\${_kernel_params}"
fi
else
set _kernel_x86_64_params="\${_kernel_params}"
set _kernel_i686_params="\${_kernel_params}"
fi
# search --file --no-floppy --set=archboot "/efi/grub2/grub_archboot.cfg"
# search --file --no-floppy --set=archboot "/efi/grub2/grub_standalone_archboot.cfg"
set pager="1" set pager="1"
# set debug="all" # set debug="all"
set locale_dir=(\${archboot})/efi/grub2/locale set locale_dir="(\${archboot})/efi/grub2/locale"
if [ "\${grub_platform}" == "efi" ]; then if [ "\${grub_platform}" == "efi" ]; then
insmod efi_gop insmod efi_gop
@ -323,19 +340,18 @@ fi
insmod font insmod font
if loadfont (\${archboot})/efi/grub2/unicode.pf2 if loadfont "(\${archboot})/efi/grub2/unicode.pf2" ; then
then
insmod gfxterm insmod gfxterm
set gfxmode="auto" set gfxmode="auto"
terminal_input console terminal_input console
terminal_output gfxterm terminal_output gfxterm
# set color_normal=light-blue/black # set color_normal="light-blue/black"
# set color_highlight=light-cyan/blue # set color_highlight="light-cyan/blue"
# insmod png # insmod png
# background_image (\${archboot})/boot/syslinux/splash.png # background_image "(\${archboot})/boot/syslinux/splash.png"
fi fi
insmod fat insmod fat
@ -345,46 +361,48 @@ insmod search_fs_file
insmod linux insmod linux
insmod chain insmod chain
set _kernel_params="gpt add_efi_memmap loglevel=7 none=UEFI_ARCH_\${_UEFI_ARCH}"
menuentry "Arch Linux (x86_64) archboot" { menuentry "Arch Linux (x86_64) archboot" {
set gfxpayload="keep" set gfxpayload="keep"
set root=(\${archboot}) set root="\${archboot}"
linux /boot/vmlinuz_x86_64 \${_kernel_params} linux /boot/vmlinuz_x86_64 \${_kernel_x86_64_params}
initrd /boot/initramfs_x86_64.img initrd /boot/initramfs_x86_64.img
} }
menuentry "Arch Linux LTS (x86_64) archboot" { menuentry "Arch Linux LTS (x86_64) archboot" {
set gfxpayload="keep" set gfxpayload="keep"
set root=(\${archboot}) set root="\${archboot}"
linux /boot/vmlinuz_x86_64_lts \${_kernel_params} linux /boot/vmlinuz_x86_64_lts \${_kernel_x86_64_params}
initrd /boot/initramfs_x86_64.img initrd /boot/initramfs_x86_64.img
} }
menuentry "Arch Linux (i686) archboot" { menuentry "Arch Linux (i686) archboot" {
set gfxpayload="keep" set gfxpayload="keep"
set root=(\${archboot}) set root="\${archboot}"
linux /boot/vmlinuz_i686 \${_kernel_params} linux /boot/vmlinuz_i686 \${_kernel_i686_params}
initrd /boot/initramfs_i686.img initrd /boot/initramfs_i686.img
} }
menuentry "Arch Linux LTS (i686) archboot" { menuentry "Arch Linux LTS (i686) archboot" {
set gfxpayload="keep" set gfxpayload="keep"
set root=(\${archboot}) set root="\${archboot}"
linux /boot/vmlinuz_i686_lts \${_kernel_params} linux /boot/vmlinuz_i686_lts \${_kernel_i686_params}
initrd /boot/initramfs_i686.img initrd /boot/initramfs_i686.img
} }
if [ "\${grub_platform}" == "efi" ]; then
menuentry "UEFI \${_UEFI_ARCH} Shell 2.0 - For Spec. Ver. >=2.3 systems" { menuentry "UEFI \${_UEFI_ARCH} Shell 2.0 - For Spec. Ver. >=2.3 systems" {
set root=(\${archboot}) set root="\${archboot}"
chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}.efi chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}.efi
} }
menuentry "UEFI \${_UEFI_ARCH} Shell 1.0 - For Spec. Ver. <2.3 systems" { menuentry "UEFI \${_UEFI_ARCH} Shell 1.0 - For Spec. Ver. <2.3 systems" {
set root=(\${archboot}) set root="\${archboot}"
chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}_old.efi chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}_old.efi
} }
fi
EOF EOF
} }

View file

@ -4,7 +4,7 @@ SVNSETUP="svn://svn.archlinux.org/packages/"
BASE="" BASE=""
DEVEL="" DEVEL=""
SUPPORT="" SUPPORT=""
SUPPORT_ADDITION="dmidecode gnu-netcat dosfstools ntfs-3g_ntfsprogs fuse dhclient v86d" SUPPORT_ADDITION="gnu-netcat dosfstools ntfs-3g_ntfsprogs fuse dhclient v86d"
# generate base # generate base
for i in $(pacman -Sg base | sed -e "s/base//g"); do for i in $(pacman -Sg base | sed -e "s/base//g"); do
BASE="$BASE $(echo $i)" BASE="$BASE $(echo $i)"

View file

@ -264,6 +264,7 @@ _update_grub2_uefi_arch_specific_iso_files() {
## Create grub.cfg for grub-mkstandalone memdisk for boot${_SPEC_UEFI_ARCH}.efi ## Create grub.cfg for grub-mkstandalone memdisk for boot${_SPEC_UEFI_ARCH}.efi
cat << EOF > "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2/grub_standalone_archboot.cfg" cat << EOF > "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2/grub_standalone_archboot.cfg"
insmod usbms insmod usbms
insmod usb_keyboard insmod usb_keyboard
@ -282,8 +283,8 @@ insmod hfsplus
insmod linux insmod linux
insmod chain insmod chain
search --file --no-floppy --set=archboot /efi/grub2/grub_archboot.cfg search --file --no-floppy --set=archboot "/efi/grub2/grub_archboot.cfg"
source (\${archboot})/efi/grub2/grub_archboot.cfg source "(\${archboot})/efi/grub2/grub_archboot.cfg"
EOF EOF
@ -383,23 +384,39 @@ _update_grub2_uefi_iso_files() {
# done # done
cat << EOF > "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2/grub_archboot.cfg" cat << EOF > "${_ARCHBOOT_ISO_EXT_DIR}/efi/grub2/grub_archboot.cfg"
set _kernel_params="gpt loglevel=7"
if [ "\${grub_platform}" == "efi" ]; then if [ "\${grub_platform}" == "efi" ]; then
set _UEFI_ARCH="\${grub_cpu}" set _UEFI_ARCH="\${grub_cpu}"
set _kernel_params="\${_kernel_params} add_efi_memmap none=UEFI_ARCH_\${_UEFI_ARCH}"
if [ "\${grub_cpu}" == "x86_64" ]; then if [ "\${grub_cpu}" == "x86_64" ]; then
set _SPEC_UEFI_ARCH="x64" set _SPEC_UEFI_ARCH="x64"
elif [ "\${grub_cpu}" == "i386" ]; then
set _SPEC_UEFI_ARCH="ia32" set _kernel_x86_64_params="\${_kernel_params}"
fi set _kernel_i686_params="\${_kernel_params} noefi"
fi fi
# search --file --no-floppy --set=archboot /efi/grub2/grub_archboot.cfg if [ "\${grub_cpu}" == "i386" ]; then
# search --file --no-floppy --set=archboot /efi/grub2/grub_standalone_archboot.cfg set _SPEC_UEFI_ARCH="ia32"
set _kernel_x86_64_params="\${_kernel_params} noefi"
set _kernel_i686_params="\${_kernel_params}"
fi
else
set _kernel_x86_64_params="\${_kernel_params}"
set _kernel_i686_params="\${_kernel_params}"
fi
# search --file --no-floppy --set=archboot "/efi/grub2/grub_archboot.cfg"
# search --file --no-floppy --set=archboot "/efi/grub2/grub_standalone_archboot.cfg"
set pager="1" set pager="1"
# set debug="all" # set debug="all"
set locale_dir=(\${archboot})/efi/grub2/locale set locale_dir="(\${archboot})/efi/grub2/locale"
if [ "\${grub_platform}" == "efi" ]; then if [ "\${grub_platform}" == "efi" ]; then
insmod efi_gop insmod efi_gop
@ -410,19 +427,18 @@ fi
insmod font insmod font
if loadfont (\${archboot})/efi/grub2/unicode.pf2 if loadfont "(\${archboot})/efi/grub2/unicode.pf2" ; then
then
insmod gfxterm insmod gfxterm
set gfxmode="auto" set gfxmode="auto"
terminal_input console terminal_input console
terminal_output gfxterm terminal_output gfxterm
# set color_normal=light-blue/black # set color_normal="light-blue/black"
# set color_highlight=light-cyan/blue # set color_highlight="light-cyan/blue"
# insmod png # insmod png
# background_image (\${archboot})/boot/syslinux/splash.png # background_image "(\${archboot})/boot/syslinux/splash.png"
fi fi
insmod fat insmod fat
@ -432,46 +448,48 @@ insmod search_fs_file
insmod linux insmod linux
insmod chain insmod chain
set _kernel_params="gpt add_efi_memmap loglevel=7 none=UEFI_ARCH_\${_UEFI_ARCH}"
menuentry "Arch Linux (x86_64) archboot" { menuentry "Arch Linux (x86_64) archboot" {
set gfxpayload="keep" set gfxpayload="keep"
set root=(\${archboot}) set root="\${archboot}"
linux /boot/vmlinuz_x86_64 \${_kernel_params} linux /boot/vmlinuz_x86_64 \${_kernel_x86_64_params}
initrd /boot/initramfs_x86_64.img initrd /boot/initramfs_x86_64.img
} }
menuentry "Arch Linux LTS (x86_64) archboot" { menuentry "Arch Linux LTS (x86_64) archboot" {
set gfxpayload="keep" set gfxpayload="keep"
set root=(\${archboot}) set root="\${archboot}"
linux /boot/vmlinuz_x86_64_lts \${_kernel_params} linux /boot/vmlinuz_x86_64_lts \${_kernel_x86_64_params}
initrd /boot/initramfs_x86_64.img initrd /boot/initramfs_x86_64.img
} }
menuentry "Arch Linux (i686) archboot" { menuentry "Arch Linux (i686) archboot" {
set gfxpayload="keep" set gfxpayload="keep"
set root=(\${archboot}) set root="\${archboot}"
linux /boot/vmlinuz_i686 \${_kernel_params} linux /boot/vmlinuz_i686 \${_kernel_i686_params}
initrd /boot/initramfs_i686.img initrd /boot/initramfs_i686.img
} }
menuentry "Arch Linux LTS (i686) archboot" { menuentry "Arch Linux LTS (i686) archboot" {
set gfxpayload="keep" set gfxpayload="keep"
set root=(\${archboot}) set root="\${archboot}"
linux /boot/vmlinuz_i686_lts \${_kernel_params} linux /boot/vmlinuz_i686_lts \${_kernel_i686_params}
initrd /boot/initramfs_i686.img initrd /boot/initramfs_i686.img
} }
if [ "\${grub_platform}" == "efi" ]; then
menuentry "UEFI \${_UEFI_ARCH} Shell 2.0 - For Spec. Ver. >=2.3 systems" { menuentry "UEFI \${_UEFI_ARCH} Shell 2.0 - For Spec. Ver. >=2.3 systems" {
set root=(\${archboot}) set root="\${archboot}"
chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}.efi chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}.efi
} }
menuentry "UEFI \${_UEFI_ARCH} Shell 1.0 - For Spec. Ver. <2.3 systems" { menuentry "UEFI \${_UEFI_ARCH} Shell 1.0 - For Spec. Ver. <2.3 systems" {
set root=(\${archboot}) set root="\${archboot}"
chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}_old.efi chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}_old.efi
} }
fi
EOF EOF
echo echo

View file

@ -19,13 +19,13 @@ set -e
transform="s&^&&" transform="s&^&&"
prefix=/usr prefix="/usr"
exec_prefix=${prefix} exec_prefix="${prefix}"
libdir=${exec_prefix}/lib datarootdir="/usr/share"
locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}` locale_dir=`echo ${GRUB_PREFIX}/locale | sed ${transform}`
grub_lang=`echo $LANG | cut -d . -f 1` grub_lang=`echo $LANG | cut -d . -f 1`
. ${libdir}/grub/grub-mkconfig_lib . "${datarootdir}/grub/grub-mkconfig_lib"
# Do this as early as possible, since other commands might depend on it. # Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules) # (e.g. the `loadfont' command might need lvm or raid modules)
@ -85,10 +85,21 @@ EOF
else else
# Insert all available backends; GRUB will use the most appropriate. # Insert all available backends; GRUB will use the most appropriate.
have_video=0; have_video=0;
for backend in $(cat "${GRUB_PREFIX}/video.lst"); do for modinfo in $(ls "${GRUB_PREFIX}"/*/modinfo.sh) ; do
. "${modinfo}"
cat <<EOF
if [ "\${grub_platform}" == "${grub_modinfo_platform}" ]; then
EOF
video_lst="$(echo ${modinfo} | sed 's|modinfo.sh||g')/video.lst"
for backend in $(cat "${video_lst}"); do
have_video=1; have_video=1;
cat <<EOF cat <<EOF
insmod ${backend} insmod ${backend}
EOF
done
cat <<EOF
fi
EOF EOF
done done
if [ x$have_video = x0 ]; then if [ x$have_video = x0 ]; then
@ -120,12 +131,12 @@ for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
done done
if [ "x$serial" = x1 ]; then if [ "x$serial" = x1 ]; then
if ! test -e ${GRUB_PREFIX}/serial.mod ; then if ! test -e "${GRUB_PREFIX}/serial.mod" ; then
echo "Serial terminal not available on this platform." >&2 ; exit 1 gettext "Serial terminal not available on this platform." >&2 ; echo >&2; exit 1
fi fi
if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used." grub_warn "$(gettext "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used.")"
GRUB_SERIAL_COMMAND=serial GRUB_SERIAL_COMMAND=serial
fi fi
echo "${GRUB_SERIAL_COMMAND}" echo "${GRUB_SERIAL_COMMAND}"
@ -182,7 +193,8 @@ esac
if [ "x$gfxterm" = x1 ]; then if [ "x$gfxterm" = x1 ]; then
if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \ if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
&& is_path_readable_by_grub "$GRUB_THEME"; then && is_path_readable_by_grub "$GRUB_THEME"; then
echo "Found theme: $GRUB_THEME" >&2 gettext_printf "Found theme: %s\n" "$GRUB_THEME" >&2
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"` prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
cat << EOF cat << EOF
insmod gfxmenu insmod gfxmenu
@ -216,12 +228,12 @@ set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
EOF EOF
elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \ elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
&& is_path_readable_by_grub "$GRUB_BACKGROUND"; then && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
echo "Found background: $GRUB_BACKGROUND" >&2 gettext_printf "Found background: %s\n" "$GRUB_BACKGROUND" >&2
case "$GRUB_BACKGROUND" in case "$GRUB_BACKGROUND" in
*.png) reader=png ;; *.png) reader=png ;;
*.tga) reader=tga ;; *.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;; *.jpg|*.jpeg) reader=jpeg ;;
*) echo "Unsupported image format" >&2; exit 1 ;; *) gettext "Unsupported image format" >&2; echo >&2; exit 1 ;;
esac esac
prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
cat << EOF cat << EOF

View file

@ -17,15 +17,14 @@ set -e
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>. # along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix=/usr prefix="/usr"
exec_prefix=${prefix} exec_prefix="${prefix}"
bindir=/usr/bin datarootdir="/usr/share"
libdir=${exec_prefix}/lib
datarootdir=/usr/share . "${datarootdir}/grub/grub-mkconfig_lib"
. ${libdir}/grub/grub-mkconfig_lib
export TEXTDOMAIN=grub export TEXTDOMAIN=grub
export TEXTDOMAINDIR=${datarootdir}/locale export TEXTDOMAINDIR="${datarootdir}/locale"
CLASS="--class gnu-linux --class gnu --class os" CLASS="--class gnu-linux --class gnu --class os"
@ -151,7 +150,7 @@ prepare_root_cache=
while [ "x$list" != "x" ] ; do while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list` linux=`version_find_latest $list`
echo "Found linux image: $linux" >&2 gettext_printf "Found linux image: %s\n" "$linux" >&2
basename=`basename $linux` basename=`basename $linux`
dirname=`dirname $linux` dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname` rel_dirname=`make_system_path_relative_to_its_root $dirname`
@ -189,7 +188,7 @@ while [ "x$list" != "x" ] ; do
fi fi
if test -n "${initrd}" ; then if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2 gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
elif test -z "${initramfs}" ; then elif test -z "${initramfs}" ; then
# "UUID=" magic is parsed by initrd or initramfs. Since there's # "UUID=" magic is parsed by initrd or initramfs. Since there's
# no initrd or builtin initramfs, it can't work here. # no initrd or builtin initramfs, it can't work here.

View file

@ -17,15 +17,14 @@ set -e
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>. # along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix=/usr prefix="/usr"
exec_prefix=${prefix} exec_prefix="${prefix}"
bindir=/usr/bin datarootdir="/usr/share"
libdir=${exec_prefix}/lib
datarootdir=/usr/share . "${datarootdir}/grub/grub-mkconfig_lib"
. ${libdir}/grub/grub-mkconfig_lib
export TEXTDOMAIN=grub export TEXTDOMAIN=grub
export TEXTDOMAINDIR=${datarootdir}/locale export TEXTDOMAINDIR="${datarootdir}/locale"
CLASS="--class gnu-linux --class gnu --class os --class xen" CLASS="--class gnu-linux --class gnu --class os --class xen"
@ -143,7 +142,7 @@ while [ "x${xen_list}" != "x" ] ; do
echo "submenu \"Xen ${xen_version}\" {" echo "submenu \"Xen ${xen_version}\" {"
while [ "x$list" != "x" ] ; do while [ "x$list" != "x" ] ; do
linux=`version_find_latest $list` linux=`version_find_latest $list`
echo "Found linux image: $linux" >&2 gettext_printf "Found linux image: %s\n" "$linux" >&2
basename=`basename $linux` basename=`basename $linux`
dirname=`dirname $linux` dirname=`dirname $linux`
rel_dirname=`make_system_path_relative_to_its_root $dirname` rel_dirname=`make_system_path_relative_to_its_root $dirname`
@ -163,7 +162,7 @@ while [ "x${xen_list}" != "x" ] ; do
fi fi
done done
if test -n "${initrd}" ; then if test -n "${initrd}" ; then
echo "Found initrd image: ${dirname}/${initrd}" >&2 gettext_printf "Found initrd image: %s\n" "${dirname}/${initrd}" >&2
else else
# "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here. # "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here.
linux_root_device_thisversion=${GRUB_DEVICE} linux_root_device_thisversion=${GRUB_DEVICE}

View file

@ -4,11 +4,13 @@
# if memtest is installed on the system. # # if memtest is installed on the system. #
######################################################## ########################################################
prefix=/usr prefix="/usr"
exec_prefix=${prefix} exec_prefix="${prefix}"
libdir=${exec_prefix}/lib
. ${libdir}/grub/grub-mkconfig_lib datarootdir="/usr/share"
datadir="${datarootdir}"
. "${datadir}/grub/grub-mkconfig_lib"
MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin" MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin"
CLASS="--class memtest86 --class gnu --class tool" CLASS="--class memtest86 --class gnu --class tool"

View file

@ -17,11 +17,11 @@ set -e
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with GRUB. If not, see <http://www.gnu.org/licenses/>. # along with GRUB. If not, see <http://www.gnu.org/licenses/>.
prefix=/usr prefix="/usr"
exec_prefix=${prefix} exec_prefix="${prefix}"
libdir=${exec_prefix}/lib datarootdir="/usr/share"
. ${libdir}/grub/grub-mkconfig_lib . "${datarootdir}/grub/grub-mkconfig_lib"
if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
exit 0 exit 0
@ -39,8 +39,17 @@ if [ -z "${OSPROBED}" ] ; then
fi fi
osx_entry() { osx_entry() {
if [ x$2 = x32 ]; then
# TRANSLATORS: it refers to kernel architecture (32-bit)
bitstr="$(gettext "(32-bit)")"
else
# TRANSLATORS: it refers to kernel architecture (64-bit)
bitstr="$(gettext "(64-bit)")"
fi
# TRANSLATORS: it refers on the OS residing on device %s
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF cat << EOF
menuentry "${LONGNAME} (${2}-bit) (on ${DEVICE})" --class osx --class darwin --class os { menuentry "${LONGNAME} $bitstr $onstr" --class osx --class darwin --class os {
EOF EOF
save_default_entry | sed -e "s/^/\t/" save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/" prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
@ -99,13 +108,14 @@ for OS in ${OSPROBED} ; do
LONGNAME="${LABEL}" LONGNAME="${LABEL}"
fi fi
echo "Found ${LONGNAME} on ${DEVICE}" >&2 gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2
case ${BOOT} in case ${BOOT} in
chain) chain)
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" --class windows --class os { menuentry "${LONGNAME} $onstr" --class windows --class os {
EOF EOF
save_default_entry | sed -e "s/^/\t/" save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/" prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
@ -146,8 +156,9 @@ EOF
LINITRD="${LINITRD#/boot}" LINITRD="${LINITRD#/boot}"
fi fi
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF cat << EOF
menuentry "${LLABEL} (on ${DEVICE})" --class gnu-linux --class gnu --class os { menuentry "${LLABEL} $onstr" --class gnu-linux --class gnu --class os {
EOF EOF
save_default_entry | sed -e "s/^/\t/" save_default_entry | sed -e "s/^/\t/"
if [ -z "${prepare_boot_cache}" ]; then if [ -z "${prepare_boot_cache}" ]; then
@ -168,13 +179,14 @@ EOF
done done
;; ;;
macosx) macosx)
OSXUUID="`grub-probe --target=fs_uuid --device ${DEVICE} 2> /dev/null`" OSXUUID="`${grub_probe} --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
osx_entry xnu_kernel 32 osx_entry xnu_kernel 32
osx_entry xnu_kernel64 64 osx_entry xnu_kernel64 64
;; ;;
hurd) hurd)
onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
cat << EOF cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" --class hurd --class gnu --class os { menuentry "${LONGNAME} $onstr" --class hurd --class gnu --class os {
EOF EOF
save_default_entry | sed -e "s/^/\t/" save_default_entry | sed -e "s/^/\t/"
prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/" prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
@ -198,7 +210,8 @@ EOF
EOF EOF
;; ;;
*) *)
echo " ${LONGNAME} is not yet supported by grub-mkconfig." >&2 echo -n " "
gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2
;; ;;
esac esac
done done

View file

@ -751,9 +751,9 @@ remove_grub_dmraid_hack(){
} }
get_grub2_map() { get_grub2_map() {
[ -e /tmp/device.map ] && rm /tmp/device.map rm "/tmp/device.map" || true
DIALOG --infobox "Generating GRUB2 device map...\nThis could take a while.\n\n Please be patient." 0 0 DIALOG --infobox "Generating GRUB2 device map...\nThis could take a while.\n\n Please be patient." 0 0
LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-mkdevicemap" --no-floppy --device-map="/tmp/device.map" >>/tmp/grub2.log LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-mkdevicemap" --no-floppy --device-map="/tmp/device.map" >> "/tmp/grub2.log"
} }
mapdev() { mapdev() {
@ -1256,7 +1256,7 @@ _createraid()
DISC=${RAIDDEVICE} DISC=${RAIDDEVICE}
RUN_CGDISK="1" RUN_CGDISK="1"
CHECK_BIOS_BOOT_GRUB2="1" CHECK_BIOS_BOOT_GRUB2="1"
CHECK_UEFI_SYS_PART="1" CHECK_UEFISYS_PART="1"
check_gpt check_gpt
fi fi
fi fi
@ -1929,7 +1929,7 @@ check_gpt() {
[[ "$(blkid -c /dev/null -p -i -o value -s PTTYPE ${DISC})" == "gpt" ]] && GUID_DETECTED="1" [[ "$(blkid -c /dev/null -p -i -o value -s PTTYPE ${DISC})" == "gpt" ]] && GUID_DETECTED="1"
if [[ "${GUID_DETECTED}" == "" ]]; then if [[ "${GUID_DETECTED}" == "" ]]; then
if [[ "${CHECK_UEFI_SYS_PART}" == "1" ]]; then if [[ "${CHECK_UEFISYS_PART}" == "1" ]]; then
## For UEFI systems force gpt conversion ## For UEFI systems force gpt conversion
sgdisk --mbrtogpt ${DISC} > ${LOG} && GUID_DETECTED="1" sgdisk --mbrtogpt ${DISC} > ${LOG} && GUID_DETECTED="1"
else else
@ -1939,7 +1939,7 @@ check_gpt() {
fi fi
if [[ "${GUID_DETECTED}" == "1" ]]; then if [[ "${GUID_DETECTED}" == "1" ]]; then
if [[ "${CHECK_UEFI_SYS_PART}" == "1" ]]; then if [[ "${CHECK_UEFISYS_PART}" == "1" ]]; then
check_uefisyspart check_uefisyspart
fi fi
@ -1965,27 +1965,27 @@ check_uefisyspart() {
RUN_CGDISK="1" RUN_CGDISK="1"
else else
if [[ -d "${DESTDIR}/boot/efi" ]] && [[ "$(mountpoint "${DESTDIR}/boot/efi")" ]]; then if [[ -d "${DESTDIR}/boot/efi" ]] && [[ "$(mountpoint "${DESTDIR}/boot/efi")" ]]; then
UEFI_SYS_PART="$(df -T "${DESTDIR}/boot/efi" | tail -n +2 | awk '{print $1}')" UEFISYS_PART="$(df -T "${DESTDIR}/boot/efi" | tail -n +2 | awk '{print $1}')"
DISC="$(echo "${UEFI_SYS_PART}" | sed 's/\(.\{8\}\).*/\1/')" DISC="$(echo "${UEFISYS_PART}" | sed 's/\(.\{8\}\).*/\1/')"
UEFI_SYS_PART_NUM="$(echo "${UEFI_SYS_PART}" | sed "s:${DISC}::g")" UEFISYS_PART_NUM="$(blkid -p -o value -s PART_ENTRY_NUMBER "${UEFISYS_PART}")"
else else
[[ ! -d "${DESTDIR}/boot/efi" ]] && mkdir -p "${DESTDIR}/boot/efi" [[ ! -d "${DESTDIR}/boot/efi" ]] && mkdir -p "${DESTDIR}/boot/efi"
DISC="$(df -T "${DESTDIR}/boot/efi" | tail -n +2 | awk '{print $1}' | sed 's/\(.\{8\}\).*/\1/')" DISC="$(df -T "${DESTDIR}/boot/efi" | tail -n +2 | awk '{print $1}' | sed 's/\(.\{8\}\).*/\1/')"
UEFI_SYS_PART_NUM="$(sgdisk -p ${DISC} | grep 'EF00' | tail -n +1 | awk '{print $1}')" UEFISYS_PART_NUM="$(sgdisk -p ${DISC} | grep 'EF00' | tail -n +1 | awk '{print $1}')"
UEFI_SYS_PART="${DISC}${UEFI_SYS_PART_NUM}" UEFISYS_PART="${DISC}${UEFISYS_PART_NUM}"
fi fi
if [[ "$(blkid -p -i -o value -s TYPE ${UEFI_SYS_PART})" != "vfat" ]]; then if [[ "$(blkid -p -i -o value -s TYPE ${UEFISYS_PART})" != "vfat" ]]; then
## Check whether UEFISYS is FAT, otherwise exit (any FAT variant, collectively recognized as vfat in Linux). ## Check whether UEFISYS is FAT, otherwise exit (any FAT variant, collectively recognized as vfat in Linux).
DIALOG --msgbox "UEFI Specification requires UEFI SYSTEM PARTIION to be formatted as FAT32. Please format it as FAT32 and run /arch/setup ." 0 0 && return 1 DIALOG --msgbox "UEFI Specification requires UEFI SYSTEM PARTIION to be formatted as FAT32. Please format it as FAT32 and run /arch/setup ." 0 0 && return 1
elif [[ "$(blkid -p -i -o value -s VERSION ${UEFI_SYS_PART})" != "FAT32" ]]; then elif [[ "$(blkid -p -i -o value -s VERSION ${UEFISYS_PART})" != "FAT32" ]]; then
## Check whether UEFISYS is FAT32 (specifically), otherwise warn the user (but do not exit). ## Check whether UEFISYS is FAT32 (specifically), otherwise warn the user (but do not exit).
DIALOG --msgbox "UEFI SYSTEM PARTIION is not FAT32 formatted. Some UEFI firmwares may not work properly with a FAT16 or FAT12 filesystem in the UEFISYS partition." 0 0 DIALOG --msgbox "UEFI SYSTEM PARTIION is not FAT32 formatted. Some UEFI firmwares may not work properly with a FAT16 or FAT12 filesystem in the UEFISYS partition." 0 0
fi fi
if [[ ! "$(mountpoint "${DESTDIR}/boot/efi")" ]]; then if [[ ! "$(mountpoint "${DESTDIR}/boot/efi")" ]]; then
mount -o rw,flush -t vfat "${UEFI_SYS_PART}" "${DESTDIR}/boot/efi" mount -o rw,flush -t vfat "${UEFISYS_PART}" "${DESTDIR}/boot/efi"
fi fi
fi fi
@ -2023,7 +2023,7 @@ partition() {
if ! [[ "${DISC}" == "" ]]; then if ! [[ "${DISC}" == "" ]]; then
if [[ "${GUIDPARAMETER}" == "yes" ]]; then if [[ "${GUIDPARAMETER}" == "yes" ]]; then
CHECK_BIOS_BOOT_GRUB2="1" CHECK_BIOS_BOOT_GRUB2="1"
CHECK_UEFI_SYS_PART="1" CHECK_UEFISYS_PART="1"
RUN_CGDISK="1" RUN_CGDISK="1"
check_gpt check_gpt
else else
@ -3479,7 +3479,7 @@ finish_syslinux () {
} }
# install extlinux bootloader # install extlinux bootloader
doextlinux () { dosyslinux_bios () {
bootdev="" bootdev=""
SYSLINUX_PACKAGES="syslinux" SYSLINUX_PACKAGES="syslinux"
SYSLINUX=EXTLINUX SYSLINUX=EXTLINUX
@ -3535,7 +3535,7 @@ doextlinux () {
finish_syslinux finish_syslinux
} }
dolilo() { dolilo_bios() {
if [[ ! -f ${DESTDIR}/etc/lilo.conf ]]; then if [[ ! -f ${DESTDIR}/etc/lilo.conf ]]; then
DIALOG --msgbox "Couldn't find ${DESTDIR}/etc/lilo.conf, installing lilo now ..." 0 0 DIALOG --msgbox "Couldn't find ${DESTDIR}/etc/lilo.conf, installing lilo now ..." 0 0
PACKAGES="lilo" PACKAGES="lilo"
@ -3607,7 +3607,7 @@ dolilo() {
DIALOG --msgbox "LILO was successfully installed." 0 0 DIALOG --msgbox "LILO was successfully installed." 0 0
} }
dogrub() { dogrub_legacy_bios() {
if [[ -f "${DESTDIR}/usr/lib/grub/i386-pc/kernel.img" ]]; then if [[ -f "${DESTDIR}/usr/lib/grub/i386-pc/kernel.img" ]]; then
DIALOG --msgbox "Found ${DESTDIR}/usr/lib/grub/i386-pc/kernel.img, deinstalling grub2 now ..." 0 0 DIALOG --msgbox "Found ${DESTDIR}/usr/lib/grub/i386-pc/kernel.img, deinstalling grub2 now ..." 0 0
${PACMAN} -R grub2-bios grub2-common > ${LOG} ${PACMAN} -R grub2-bios grub2-common > ${LOG}
@ -3835,34 +3835,63 @@ dogrub2_common_before() {
dogrub2_config() { dogrub2_config() {
BOOT_FS_UUID="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs_uuid "${DESTDIR}/boot" 2>/dev/null)" ########
BOOT_FS="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs "${DESTDIR}/boot" 2>/dev/null)"
BOOT_FS_LABEL="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs_label "${DESTDIR}/boot" 2>/dev/null)" BOOT_PART_FS_UUID="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs_uuid" "${DESTDIR}/boot" 2>/dev/null)"
BOOT_DRIVE="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=drive "${DESTDIR}/boot" 2>/dev/null)" BOOT_PART_FS="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs" "${DESTDIR}/boot" 2>/dev/null)"
ROOT_FS_UUID="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs_uuid "${DESTDIR}/" 2>/dev/null)" BOOT_PART_FS_LABEL="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs_label" "${DESTDIR}/boot" 2>/dev/null)"
ROOT_FS="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs "${DESTDIR}/" 2>/dev/null)" BOOT_PART_DRIVE="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="drive" "${DESTDIR}/boot" 2>/dev/null)"
ROOT_FS_LABEL="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs_label "${DESTDIR}/" 2>/dev/null)" BOOT_PART_HINTS_STRING="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="hints_string" "${DESTDIR}/boot" 2>/dev/null)"
ROOT_DEVICE="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=device "${DESTDIR}/" 2>/dev/null)"
########
ROOT_PART_FS_UUID="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs_uuid" "${DESTDIR}/" 2>/dev/null)"
ROOT_PART_FS="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs" "${DESTDIR}/" 2>/dev/null)"
ROOT_PART_FS_LABEL="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs_label" "${DESTDIR}/" 2>/dev/null)"
ROOT_PART_DEVICE="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="device" "${DESTDIR}/" 2>/dev/null)"
ROOT_PART_HINTS_STRING="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="hints_string" "${DESTDIR}/" 2>/dev/null)"
########
USR_PART_FS_UUID="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs_uuid" "${DESTDIR}/usr" 2>/dev/null)"
USR_PART_FS="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs" "${DESTDIR}/usr" 2>/dev/null)"
USR_PART_FS_LABEL="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs_label" "${DESTDIR}/usr" 2>/dev/null)"
USR_PART_HINTS_STRING="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="hints_string" "${DESTDIR}/usr" 2>/dev/null)"
########
if [[ "${GRUB2_UEFI}" == "1" ]]; then if [[ "${GRUB2_UEFI}" == "1" ]]; then
UEFISYS_FS_UUID="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs_uuid "${DESTDIR}/boot/efi" 2>/dev/null)" UEFISYS_PART_FS_UUID="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs_uuid" "${DESTDIR}/boot/efi" 2>/dev/null)"
UEFISYS_FS_LABEL="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs_label "${DESTDIR}/boot/efi" 2>/dev/null)" UEFISYS_PART_FS_LABEL="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs_label" "${DESTDIR}/boot/efi" 2>/dev/null)"
UEFISYS_DRIVE="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=drive "${DESTDIR}/boot/efi" 2>/dev/null)" UEFISYS_PART_DRIVE="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="drive" "${DESTDIR}/boot/efi" 2>/dev/null)"
UEFISYS_PART_HINTS_STRING="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="hints_string" "${DESTDIR}/boot/efi" 2>/dev/null)"
fi fi
########
## udev 180 onwards ## udev 180 onwards
if [[ "$(blkid -c /dev/null -p -i -o value -s PART_ENTRY_SCHEME ${ROOT_DEVICE})" == 'gpt' ]]; then if [[ "$(blkid -c /dev/null -p -i -o value -s PART_ENTRY_SCHEME ${ROOT_PART_DEVICE})" == 'gpt' ]]; then
ROOT_GPT_PART_UUID="$(blkid -c /dev/null -p -i -o value -s PART_ENTRY_UUID ${ROOT_DEVICE})" ROOT_PART_GPT_UUID="$(blkid -c /dev/null -p -i -o value -s PART_ENTRY_UUID ${ROOT_PART_DEVICE})"
ROOT_GPT_PART_LABEL="$(blkid -c /dev/null -p -i -o value -s PART_ENTRY_NAME ${ROOT_DEVICE})" ROOT_PART_GPT_LABEL="$(blkid -c /dev/null -p -i -o value -s PART_ENTRY_NAME ${ROOT_PART_DEVICE})"
fi fi
subdir="/boot" ########
! [[ "${ROOT_FS_UUID}" == "${BOOT_FS_UUID}" ]] && subdir="" if [[ "${ROOT_PART_FS_UUID}" == "${BOOT_PART_FS_UUID}" ]]; then
subdir=""
else
subdir="/boot"
fi
########
cp "${DESTDIR}/${GRUB2_PREFIX_DIR}/grub.cfg" "/tmp/.grub.cfg" cp "${DESTDIR}/${GRUB2_PREFIX_DIR}/grub.cfg" "/tmp/.grub.cfg"
# remove the default entries by truncating the file at our little tag (set default) # remove the default entries by truncating the file at our little tag (set default)
@ -3881,19 +3910,26 @@ if [ "\${grub_platform}" == "efi" ]; then
if [ "\${grub_cpu}" == "x86_64" ]; then if [ "\${grub_cpu}" == "x86_64" ]; then
set _SPEC_UEFI_ARCH="x64" set _SPEC_UEFI_ARCH="x64"
elif [ "\${grub_cpu}" == "i386" ]; then fi
if [ "\${grub_cpu}" == "i386" ]; then
set _SPEC_UEFI_ARCH="ia32" set _SPEC_UEFI_ARCH="ia32"
fi fi
fi fi
EOF
cat << EOF >> "${DESTDIR}/${GRUB2_PREFIX_DIR}/grub.cfg"
insmod part_gpt insmod part_gpt
insmod part_msdos insmod part_msdos
# Include fat fs module - required for uefi systems. # Include fat fs module - required for uefi systems.
insmod fat insmod fat
insmod ${BOOT_FS} insmod ${BOOT_PART_FS}
insmod ${ROOT_FS} insmod ${ROOT_PART_FS}
insmod ${USR_PART_FS}
insmod search_fs_file insmod search_fs_file
insmod search_fs_uuid insmod search_fs_uuid
@ -3905,7 +3941,7 @@ insmod chain
set pager="1" set pager="1"
# set debug="all" # set debug="all"
set locale_dir=\${prefix}/locale set locale_dir="\${prefix}/locale"
EOF EOF
@ -3930,8 +3966,22 @@ fi
insmod font insmod font
if loadfont \${prefix}/unicode.pf2 search --fs-uuid --no-floppy --set=usr_part ${USR_PART_HINTS_STRING} ${USR_PART_FS_UUID}
then search --fs-uuid --no-floppy --set=root_part ${ROOT_PART_HINTS_STRING} ${ROOT_PART_FS_UUID}
if [ -e "(\${usr_part})/share/grub/unicode.pf2" ]; then
set _fontfile="(\${usr_part})/share/grub/unicode.pf2"
else
if [ -e "(\${root_part})/usr/share/grub/unicode.pf2" ]; then
set _fontfile="(\${root_part})/usr/share/grub/unicode.pf2"
else
if [ -e "\${prefix}/unicode.pf2" ]; then
set _fontfile="\${prefix}/unicode.pf2"
fi
fi
fi
if loadfont "\${_fontfile}" ; then
insmod gfxterm insmod gfxterm
set gfxmode="auto" set gfxmode="auto"
@ -3946,30 +3996,30 @@ EOF
echo "" >> "${DESTDIR}/${GRUB2_PREFIX_DIR}/grub.cfg" echo "" >> "${DESTDIR}/${GRUB2_PREFIX_DIR}/grub.cfg"
if [[ "${NAME_SCHEME_PARAMETER}" == "UUID" ]]; then if [[ "${NAME_SCHEME_PARAMETER}" == "UUID" ]]; then
GRUB_ROOT_DRIVE="search --fs-uuid --no-floppy --set=root ${BOOT_FS_UUID}" GRUB_ROOT_DRIVE="search --fs-uuid --no-floppy --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID}"
_rootpart="/dev/disk/by-uuid/${ROOT_FS_UUID}" _rootpart="/dev/disk/by-uuid/${ROOT_PART_FS_UUID}"
elif [[ "${NAME_SCHEME_PARAMETER}" == "PARTUUID" ]]; then elif [[ "${NAME_SCHEME_PARAMETER}" == "PARTUUID" ]]; then
GRUB_ROOT_DRIVE="search --fs-uuid --no-floppy --set=root ${BOOT_FS_UUID}" # GRUB2 does not yet support PARTUUID GRUB_ROOT_DRIVE="search --fs-uuid --no-floppy --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID}" # GRUB2 does not yet support PARTUUID
_rootpart="/dev/disk/by-partuuid/${ROOT_GPT_PART_UUID}" _rootpart="/dev/disk/by-partuuid/${ROOT_PART_GPT_UUID}"
elif [[ "${NAME_SCHEME_PARAMETER}" == "LABEL" ]]; then elif [[ "${NAME_SCHEME_PARAMETER}" == "LABEL" ]]; then
GRUB_ROOT_DRIVE="search --label --no-floppy --set=root ${BOOT_FS_LABEL}" GRUB_ROOT_DRIVE="search --label --no-floppy --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_LABEL}"
_rootpart="/dev/disk/by-label/${ROOT_FS_LABEL}" _rootpart="/dev/disk/by-label/${ROOT_PART_FS_LABEL}"
elif [[ "${NAME_SCHEME_PARAMETER}" == "PARTLABEL" ]]; then elif [[ "${NAME_SCHEME_PARAMETER}" == "PARTLABEL" ]]; then
GRUB_ROOT_DRIVE="search --label --no-floppy --set=root ${BOOT_FS_LABEL}" # GRUB2 does not yet support PARTLABEL GRUB_ROOT_DRIVE="search --label --no-floppy --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_LABEL}" # GRUB2 does not yet support PARTLABEL
_rootpart="/dev/disk/by-partlabel/${ROOT_GPT_PART_LABEL}" _rootpart="/dev/disk/by-partlabel/${ROOT_PART_GPT_LABEL}"
else else
GRUB_ROOT_DRIVE="set root=${BOOT_DRIVE}" GRUB_ROOT_DRIVE="set root="${BOOT_PART_DRIVE}""
_rootpart="${ROOT_DEVICE}" _rootpart="${ROOT_PART_DEVICE}"
fi fi
# fallback to device if no label or uuid can be detected, eg. luks device # fallback to device if no label or uuid can be detected, eg. luks device
[[ -z "${ROOT_FS_LABEL}" ]] && _rootpart="${ROOT_DEVICE}" [[ -z "${ROOT_PART_FS_LABEL}" ]] && _rootpart="${ROOT_PART_DEVICE}"
[[ -z "${ROOT_FS_UUID}" ]] && _rootpart="${ROOT_DEVICE}" [[ -z "${ROOT_PART_FS_UUID}" ]] && _rootpart="${ROOT_PART_DEVICE}"
LINUX_UNMOD_COMMAND="linux ${subdir}/${VMLINUZ} root=${_rootpart} ${ROOTFLAGS} rootfstype=${ROOTFS} ${RAIDARRAYS} ${CRYPTSETUP} ro gpt loglevel=7 pcie_aspm=force add_efi_memmap" LINUX_UNMOD_COMMAND="linux ${subdir}/${VMLINUZ} root=${_rootpart} ${ROOTFLAGS} rootfstype=${ROOTFS} ${RAIDARRAYS} ${CRYPTSETUP} ro gpt loglevel=7 pcie_aspm=force add_efi_memmap"
LINUX_MOD_COMMAND=$(echo "${LINUX_UNMOD_COMMAND}" | sed -e 's# # #g' | sed -e 's# # #g') LINUX_MOD_COMMAND=$(echo "${LINUX_UNMOD_COMMAND}" | sed -e 's# # #g' | sed -e 's# # #g')
@ -4009,14 +4059,14 @@ EOF
## (${NUMBER}) UEFI Shell 2.0 ## (${NUMBER}) UEFI Shell 2.0
## Will work only in grub2 uefi ## Will work only in grub2 uefi
#menuentry "UEFI \${_UEFI_ARCH} Shell 2.0 - For Spec. Ver. >=2.3 systems" { #menuentry "UEFI \${_UEFI_ARCH} Shell 2.0 - For Spec. Ver. >=2.3 systems" {
# search --fs-uuid --no-floppy --set=root ${UEFISYS_FS_UUID} # search --fs-uuid --no-floppy --set=root ${UEFISYS_PART_HINTS_STRING} ${UEFISYS_PART_FS_UUID}
# chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}.efi # chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}.efi
#} #}
## (${NUMBER}) UEFI Shell 1.0 ## (${NUMBER}) UEFI Shell 1.0
## Will work only in grub2 uefi ## Will work only in grub2 uefi
#menuentry "UEFI \${_UEFI_ARCH} Shell 1.0 - For Spec. Ver. <2.3 systems" { #menuentry "UEFI \${_UEFI_ARCH} Shell 1.0 - For Spec. Ver. <2.3 systems" {
# search --fs-uuid --no-floppy --set=root ${UEFISYS_FS_UUID} # search --fs-uuid --no-floppy --set=root ${UEFISYS_PART_HINTS_STRING} ${UEFISYS_PART_FS_UUID}
# chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}_old.efi # chainloader /efi/shell/shell\${_SPEC_UEFI_ARCH}_old.efi
#} #}
@ -4033,7 +4083,7 @@ EOF
# insmod fat # insmod fat
# insmod search_fs_uuid # insmod search_fs_uuid
# insmod chain # insmod chain
# search --fs-uuid --no-floppy --set=root ${UEFISYS_FS_UUID} # search --fs-uuid --no-floppy --set=root ${UEFISYS_PART_HINTS_STRING} ${UEFISYS_PART_FS_UUID}
# chainloader /efi/Microsoft/Boot/bootmgfw.efi # chainloader /efi/Microsoft/Boot/bootmgfw.efi
#} #}
@ -4058,15 +4108,15 @@ EOF
EOF EOF
unset BOOT_FS_UUID unset BOOT_PART_FS_UUID
unset BOOT_FS unset BOOT_PART_FS
unset BOOT_FS_LABEL unset BOOT_PART_FS_LABEL
unset BOOT_DRIVE unset BOOT_PART_DRIVE
unset ROOT_FS_UUID unset ROOT_PART_FS_UUID
unset ROOT_FS unset ROOT_PART_FS
unset ROOT_FS_LABEL unset ROOT_PART_FS_LABEL
unset ROOT_DEVICE unset ROOT_PART_DEVICE
unset GRUB_ROOT_DRIVE unset GRUB_ROOT_DRIVE
unset LINUX_UNMOD_COMMAND unset LINUX_UNMOD_COMMAND
@ -4200,7 +4250,7 @@ dogrub2_bios() {
if [[ "$(blkid -c /dev/null -p -i -o value -s PTTYPE ${bootdev})" == "gpt" ]]; then if [[ "$(blkid -c /dev/null -p -i -o value -s PTTYPE ${bootdev})" == "gpt" ]]; then
CHECK_BIOS_BOOT_GRUB2="1" CHECK_BIOS_BOOT_GRUB2="1"
CHECK_UEFI_SYS_PART="" CHECK_UEFISYS_PART=""
RUN_CGDISK="" RUN_CGDISK=""
DISC="${bootdev}" DISC="${bootdev}"
check_gpt check_gpt
@ -4259,31 +4309,33 @@ do_uefi_efibootmgr() {
if [[ -d "${DESTDIR}/sys/firmware/efi/vars" ]] || [[ -d "/sys/firmware/efi/vars" ]]; then if [[ -d "${DESTDIR}/sys/firmware/efi/vars" ]] || [[ -d "/sys/firmware/efi/vars" ]]; then
## Delete old entries of grub2 - command to be checked - do not do for now ## Delete old entries of grub2 - command to be checked - do not do for now
# for bootnum in $(efibootmgr | grep '^Boot[0-9]' | fgrep -i " ${EFIBOOTMGR_LABEL}" | cut -b5-8) # for bootnum in $(efibootmgr | grep '^Boot[0-9]' | fgrep -i " ${_EFIBOOTMGR_LABEL}" | cut -b5-8)
# do # do
# chroot "${DESTDIR}" "/usr/sbin/efibootmgr" --bootnum "${bootnum}" --delete-bootnum # chroot "${DESTDIR}" "/usr/sbin/efibootmgr" --bootnum "${bootnum}" --delete-bootnum
# done # done
chroot "${DESTDIR}" "/usr/sbin/efibootmgr" --create --gpt --disk "${EFIBOOTMGR_DISC}" --part "${EFIBOOTMGR_PART_NUM}" --write-signature --label "${EFIBOOTMGR_LABEL}" --loader "\\EFI\\${EFIBOOTMGR_LOADER_DIR}\\${EFIBOOTMGR_LOADER_FILE}" chroot "${DESTDIR}" "/usr/sbin/efibootmgr" --create --gpt --disk "${_EFIBOOTMGR_DISC}" --part "${_EFIBOOTMGR_PART_NUM}" --write-signature --label "${_EFIBOOTMGR_LABEL}" --loader "\\EFI\\${_EFIBOOTMGR_LOADER_DIR}\\${_EFIBOOTMGR_LOADER_FILE}"
else else
DIALOG --msgbox "/sys/firmware/efi/vars/ directory not found. Check whether you have booted in UEFI boot mode, manually load efivars kernel module and create a boot entry for ${EFIBOOTMGR_LABEL} in the UEFI Boot Manager." 0 0 DIALOG --msgbox "/sys/firmware/efi/vars/ directory not found. Check whether you have booted in UEFI boot mode, manually load efivars kernel module and create a boot entry for ${_EFIBOOTMGR_LABEL} in the UEFI Boot Manager." 0 0
fi fi
chroot_umount chroot_umount
else else
DIALOG --msgbox "efivars kernel module was not loaded properly. Manually load it and create a boot entry for ${EFIBOOTMGR_LABEL} in UEFI Boot Manager using efibootmgr." 0 0 DIALOG --msgbox "efivars kernel module was not loaded properly. Manually load it and create a boot entry for ${_EFIBOOTMGR_LABEL} in UEFI Boot Manager using efibootmgr." 0 0
fi fi
unset EFIBOOTMGR_LABEL unset _EFIBOOTMGR_LABEL
unset EFIBOOTMGR_DISC unset _EFIBOOTMGR_DISC
unset EFIBOOTMGR_PART_NUM unset _EFIBOOTMGR_PART_NUM
unset EFIBOOTMGR_LOADER_DIR unset _EFIBOOTMGR_LOADER_DIR
unset EFIBOOTMGR_LOADER_FILE unset _EFIBOOTMGR_LOADER_FILE
} }
do_apple_efi_hfs_bless() { do_apple_efi_hfs_bless() {
modprobe -r efivars || true
## Grub upstream bzr mactel branch => http://bzr.savannah.gnu.org/lh/grub/branches/mactel/changes ## Grub upstream bzr mactel branch => http://bzr.savannah.gnu.org/lh/grub/branches/mactel/changes
## Fedora's mactel-boot => https://bugzilla.redhat.com/show_bug.cgi?id=755093 ## Fedora's mactel-boot => https://bugzilla.redhat.com/show_bug.cgi?id=755093
DIALOG --msgbox "TODO: Apple Mac EFI Bootloader Setup" 0 0 DIALOG --msgbox "TODO: Apple Mac EFI Bootloader Setup" 0 0
@ -4292,15 +4344,15 @@ do_apple_efi_hfs_bless() {
do_efi_bootmgr_setup() { do_efi_bootmgr_setup() {
if [[ "$(dmidecode -s system-manufacturer)" == 'Apple Inc.' ]] || [[ "$(dmidecode -s system-manufacturer)" == 'Apple Computer, Inc.' ]]; then if [[ "$(cat "/sys/class/dmi/id/sys_vendor")" == 'Apple Inc.' ]] || [[ "$(cat "/sys/class/dmi/id/sys_vendor")" == 'Apple Computer, Inc.' ]]; then
do_apple_efi_hfs_bless do_apple_efi_hfs_bless
else else
## For all the non-Mac UEFI systems ## For all the non-Mac UEFI systems
EFIBOOTMGR_LABEL="${_BOOTMGR_LABEL}" _EFIBOOTMGR_LABEL="${_BOOTMGR_LABEL}"
EFIBOOTMGR_DISC="${_BOOTMGR_DISC}" _EFIBOOTMGR_DISC="${_BOOTMGR_DISC}"
EFIBOOTMGR_PART_NUM="${_BOOTMGR_PART_NUM}" _EFIBOOTMGR_PART_NUM="${_BOOTMGR_PART_NUM}"
EFIBOOTMGR_LOADER_DIR="${_BOOTMGR_LOADER_DIR}" _EFIBOOTMGR_LOADER_DIR="${_BOOTMGR_LOADER_DIR}"
EFIBOOTMGR_LOADER_FILE="${_BOOTMGR_LOADER_FILE}" _EFIBOOTMGR_LOADER_FILE="${_BOOTMGR_LOADER_FILE}"
do_uefi_efibootmgr do_uefi_efibootmgr
fi fi
@ -4312,12 +4364,20 @@ do_efi_bootmgr_setup() {
} }
doelilo_uefi_x86_64() {
do_uefi_x86_64
DIALOG --msgbox "TODO: Elilo x86_64 UEFI Bootloader Setup" 0 0
}
dogrub2_uefi_efibootmgr() { dogrub2_uefi_efibootmgr() {
_BOOTMGR_LABEL="Arch Linux (GRUB2)" _BOOTMGR_LABEL="Arch Linux (GRUB2)"
_BOOTMGR_DISC="${DISC}" _BOOTMGR_DISC="${DISC}"
_BOOTMGR_PART_NUM="${UEFI_SYS_PART_NUM}" _BOOTMGR_PART_NUM="${UEFISYS_PART_NUM}"
_BOOTMGR_LOADER_DIR="arch" _BOOTMGR_LOADER_DIR="arch_grub"
_BOOTMGR_LOADER_FILE="grub${SPEC_UEFI_ARCH}.efi" _BOOTMGR_LOADER_FILE="grub${SPEC_UEFI_ARCH}.efi"
do_efi_bootmgr_setup do_efi_bootmgr_setup
@ -4330,19 +4390,19 @@ dogrub2_uefi_common() {
DIALOG --msgbox "Installing grub2-efi-${UEFI_ARCH} now ..." 0 0 DIALOG --msgbox "Installing grub2-efi-${UEFI_ARCH} now ..." 0 0
PACKAGES="grub2-efi-${UEFI_ARCH} grub2-common dosfstools" PACKAGES="grub2-efi-${UEFI_ARCH} grub2-common dosfstools"
if [[ "$(dmidecode -s system-manufacturer)" != "Apple Inc." ]] && [[ "$(dmidecode -s system-manufacturer)" != "Apple Computer, Inc." ]]; then if [[ "$(cat "/sys/class/dmi/id/sys_vendor")" != "Apple Inc." ]] && [[ "$(cat "/sys/class/dmi/id/sys_vendor")" != "Apple Computer, Inc." ]]; then
PACKAGES="${PACKAGES} efibootmgr" PACKAGES="${PACKAGES} efibootmgr"
fi fi
run_pacman run_pacman
# reset PACKAGES after installing # reset PACKAGES after installing
PACKAGES="" PACKAGES=""
get_grub2_map # get_grub2_map
DISC="$(grub-probe --target=device "${DESTDIR}/" | sed 's/\(.\{8\}\).*/\1/')" DISC="$(grub-probe --target=device "${DESTDIR}/" | sed 's/\(.\{8\}\).*/\1/')"
if ! [[ "${DISC}" == "" ]]; then if ! [[ "${DISC}" == "" ]]; then
CHECK_UEFI_SYS_PART="1" CHECK_UEFISYS_PART="1"
CHECK_BIOS_BOOT_GRUB2="" CHECK_BIOS_BOOT_GRUB2=""
RUN_CGDISK="" RUN_CGDISK=""
check_gpt check_gpt
@ -4352,7 +4412,7 @@ dogrub2_uefi_common() {
chroot "${DESTDIR}" "/usr/sbin/grub_efi_${UEFI_ARCH}-install" \ chroot "${DESTDIR}" "/usr/sbin/grub_efi_${UEFI_ARCH}-install" \
--root-directory="/boot/efi" \ --root-directory="/boot/efi" \
--bootloader-id="arch" \ --bootloader-id="arch_grub" \
--boot-directory="/boot" \ --boot-directory="/boot" \
--no-floppy --recheck >> "/tmp/grub2_${UEFI_ARCH}_uefi.log" --no-floppy --recheck >> "/tmp/grub2_${UEFI_ARCH}_uefi.log"
@ -4360,12 +4420,15 @@ dogrub2_uefi_common() {
mkdir -p "${DESTDIR}/boot/grub" mkdir -p "${DESTDIR}/boot/grub"
BOOT_FS_UUID="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs_uuid "${DESTDIR}/boot" 2>/dev/null)" BOOT_PART_FS_UUID="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs_uuid" "${DESTDIR}/boot" 2>/dev/null)"
BOOT_FS="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target=fs "${DESTDIR}/boot" 2>/dev/null)" BOOT_PART_FS="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="fs" "${DESTDIR}/boot" 2>/dev/null)"
BOOT_PART_HINTS_STRING="$(LD_LIBRARY_PATH="${DESTDIR}/lib:${DESTDIR}/usr/lib" "${DESTDIR}/usr/sbin/grub-probe" --target="hints_string" "${DESTDIR}/boot" 2>/dev/null)"
[[ -e "${DESTDIR}/boot/grub/grub.cfg" ]] && mv "${DESTDIR}/boot/grub/grub.cfg" "${DESTDIR}/boot/grub/grub.cfg.save" [[ -e "${DESTDIR}/boot/grub/grub.cfg" ]] && mv "${DESTDIR}/boot/grub/grub.cfg" "${DESTDIR}/boot/grub/grub.cfg.save"
cat << EOF > "${DESTDIR}/boot/grub/grub.cfg" cat << EOF > "${DESTDIR}/boot/grub/grub.cfg"
insmod usbms insmod usbms
insmod usb_keyboard insmod usb_keyboard
@ -4375,7 +4438,7 @@ insmod part_msdos
insmod fat insmod fat
insmod iso9660 insmod iso9660
insmod udf insmod udf
insmod ${BOOT_FS} insmod ${BOOT_PART_FS}
insmod ext2 insmod ext2
insmod reiserfs insmod reiserfs
@ -4385,19 +4448,21 @@ insmod hfsplus
insmod linux insmod linux
insmod chain insmod chain
search --fs-uuid --no-floppy --set=root ${BOOT_FS_UUID} search --fs-uuid --no-floppy --set=root ${BOOT_PART_HINTS_STRING} ${BOOT_PART_FS_UUID}
if test -f (\${root})/grub/grub.cfg ; then if [ -f "(\${root})/grub/grub.cfg" ]; then
set prefix=(\${root})/grub set prefix="(\${root})/grub"
source (\${root})/grub/grub.cfg source "(\${root})/grub/grub.cfg"
elif test -f (\${root})/boot/grub/grub.cfg ; then else
set prefix=(\${root})/boot/grub if [ -f "(\${root})/boot/grub/grub.cfg" ]; then
source (\${root})/boot/grub/grub.cfg set prefix="(\${root})/boot/grub"
source "(\${root})/boot/grub/grub.cfg"
fi
fi fi
EOF EOF
cp "${DESTDIR}/boot/grub/grub.cfg" "/boot/efi/efi/arch/grub${SPEC_UEFI_ARCH}_standalone.cfg" cp "${DESTDIR}/boot/grub/grub.cfg" "/boot/efi/efi/arch_grub/grub${SPEC_UEFI_ARCH}_standalone.cfg"
__WD="${PWD}/" __WD="${PWD}/"
@ -4409,7 +4474,7 @@ EOF
--directory="/usr/lib/grub/${UEFI_ARCH}-efi" \ --directory="/usr/lib/grub/${UEFI_ARCH}-efi" \
--format="${UEFI_ARCH}-efi" \ --format="${UEFI_ARCH}-efi" \
--compression="xz" \ --compression="xz" \
--output="/boot/efi/efi/arch/grub${SPEC_UEFI_ARCH}_standalone.efi" \ --output="/boot/efi/efi/arch_grub/grub${SPEC_UEFI_ARCH}_standalone.efi" \
"boot/grub/grub.cfg" > "/tmp/grub2_${UEFI_ARCH}_uefi_mkstandalone.log" "boot/grub/grub.cfg" > "/tmp/grub2_${UEFI_ARCH}_uefi_mkstandalone.log"
chroot_umount chroot_umount
@ -4967,6 +5032,44 @@ configure_system() {
fi fi
} }
install_bootloader_uefi_x86_64() {
DIALOG --menu "Which x86_64 UEFI bootloader would you like to use?" 13 55 2 \
"GRUB2_UEFI_x86_64" "GRUB2 x86_64 UEFI" \
"ELILO" "x86_64 UEFI version of LILO" 2>${ANSWER} || CANCEL=1
case $(cat ${ANSWER}) in
"GRUB2_UEFI_x86_64") dogrub2_uefi_x86_64 ;;
"ELILO") doelilo_uefi_x86_64 ;;
esac
}
install_bootloader_uefi_i386() {
DIALOG --menu "Which i386 UEFI bootloader would you like to use?" 13 55 1 \
"GRUB2_UEFI_i386" "GRUB2 i386 UEFI" 2>${ANSWER} || CANCEL=1
case $(cat ${ANSWER}) in
"GRUB2_UEFI_i386") dogrub2_uefi_i386 ;;
esac
}
install_bootloader_bios() {
DIALOG --menu "Which BIOS bootloader would you like to use?" 13 55 4 \
"SYSLINUX" "SYSLINUX/EXTLINUX" \
"GRUB2_BIOS" "GRUB2 BIOS" \
"GRUB_LEGACY" "GRUB LEGACY" \
"LILO" "LILO" 2>${ANSWER} || CANCEL=1
case $(cat ${ANSWER}) in
"SYSLINUX") dosyslinux_bios ;;
"GRUB2_BIOS") dogrub2_bios ;;
"GRUB_LEGACY") dogrub_legacy_bios ;;
"LILO") dolilo_bios ;;
esac
}
install_bootloader() { install_bootloader() {
destdir_mounts || return 1 destdir_mounts || return 1
@ -4982,21 +5085,16 @@ install_bootloader() {
[[ "${UEFI_x86_64}" == "1" ]] && DIALOG --yesno "Setup has detected that you are using x86_64 (64-bit) UEFI ...\nDo you like to install grub2-efi-x86_64 as the bootloader?" 0 0 && dogrub2_uefi_x86_64 [[ "${UEFI_x86_64}" == "1" ]] && DIALOG --yesno "Setup has detected that you are using x86_64 (64-bit) UEFI ...\nDo you like to install grub2-efi-x86_64 as the bootloader?" 0 0 && dogrub2_uefi_x86_64
DIALOG --menu "Which BIOS/UEFI bootloader would you like to use?" 13 55 7 \ DIALOG --menu "x86_64 UEFI or i386 UEFI or BIOS?" 13 55 3 \
"EXTLINUX" "EXTLINUX/SYSLINUX" \ "UEFI_x86_64" "x86_64 UEFI" \
"GRUB2_BIOS" "GRUB2 BIOS" \ "UEFI_i386" "i386 UEFI" \
"GRUB2_UEFI_x86_64" "GRUB2 64-bit UEFI" \ "BIOS" "BIOS" 2>${ANSWER} || CANCEL=1
"GRUB2_UEFI_i386" "GRUB2 32-bit UEFI" \
"GRUB_LEGACY" "GRUB LEGACY" \
"LILO" "LILO" 2>${ANSWER} || CANCEL=1
case $(cat ${ANSWER}) in case $(cat ${ANSWER}) in
"EXTLINUX") doextlinux ;; "UEFI_x86_64") install_bootloader_uefi_x86_64 ;;
"GRUB2_BIOS") dogrub2_bios ;; "UEFI_i386") install_bootloader_uefi_i386 ;;
"GRUB2_UEFI_x86_64") dogrub2_uefi_x86_64 ;; "BIOS") install_bootloader_bios ;;
"GRUB2_UEFI_i386") dogrub2_uefi_i386 ;;
"GRUB_LEGACY") dogrub ;;
"LILO") dolilo ;;
esac esac
if [[ "${CANCEL}" = "1" ]]; then if [[ "${CANCEL}" = "1" ]]; then
NEXTITEM="7" NEXTITEM="7"
else else