Update major version, fix syslinux ucode
This commit is contained in:
parent
1e93f2b6c5
commit
2a08b86a24
@ -8,7 +8,7 @@
|
||||
# Some ideas and code reworked from other resources
|
||||
# AIF, Cnichi, Calamares, Arch Wiki.. Credit where credit is due
|
||||
|
||||
VER="1.8.44" # version
|
||||
VER="2.0" # version
|
||||
DIST="ArchLabs" # distributor
|
||||
MNT="/mnt" # install mountpoint
|
||||
|
||||
@ -35,9 +35,9 @@ MYSHELL="" # login shell for root and the primary user
|
||||
PACKAGES="" # list of all packages to install including WM_PACKAGES
|
||||
USER_PKGS="" # packages selected by the user during install
|
||||
WM_PACKAGES="" # full list of packages added during wm/de choice
|
||||
UCODE="" # cpu manufacturer microcode filename (if any)
|
||||
HOOKS="shutdown" # list of additional HOOKS to add in /etc/mkinitcpio.conf
|
||||
FONT="ter-i16n" # font used in the linux console
|
||||
UCODE="" # cpu manufacturer microcode filename (if any)
|
||||
|
||||
LUKS="" # empty when not using luks encryption
|
||||
LUKS_DEV="" # boot parameter string for LUKS
|
||||
@ -1446,7 +1446,7 @@ EOF
|
||||
if [[ -e /run/archiso/sfs/airootfs ]]; then
|
||||
printf "Copying vmlinuz and ucode to /boot\n"
|
||||
[[ $KERNEL == 'linux' ]] && cp -vf $RUN/x86_64/vmlinuz $MNT/boot/vmlinuz-linux
|
||||
[[ $UCODE && ! $VM ]] && cp -vf $RUN/${UCODE/-/_}.img $MNT/boot/${UCODE}.img
|
||||
[[ $UCODE ]] && cp -vf $RUN/${UCODE/-/_}.img $MNT/boot/${UCODE}.img
|
||||
fi
|
||||
|
||||
printf "Copying network settings to /etc\n"
|
||||
@ -1788,13 +1788,11 @@ prerun_grub()
|
||||
{
|
||||
local cfg="$MNT/etc/default/grub"
|
||||
sed -i "s/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR=\"${DIST}\"/g;
|
||||
s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/g" $cfg
|
||||
|
||||
s/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"\"/g" $cfg
|
||||
if [[ $LUKS_DEV ]]; then
|
||||
sed -i "s~#GRUB_ENABLE_CRYPTODISK~GRUB_ENABLE_CRYPTODISK~g;
|
||||
s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g" $cfg
|
||||
s~GRUB_CMDLINE_LINUX=.*~GRUB_CMDLINE_LINUX=\"${LUKS_DEV}\"~g" $cfg
|
||||
fi
|
||||
|
||||
if [[ $SYS == 'BIOS' && $LVM && $SEP_BOOT == false ]]; then
|
||||
sed -i "s/GRUB_PRELOAD_MODULES=.*/GRUB_PRELOAD_MODULES=\"lvm\"/g" $cfg
|
||||
fi
|
||||
@ -1813,9 +1811,6 @@ prerun_grub()
|
||||
|
||||
prerun_systemd-boot()
|
||||
{
|
||||
# no LVM then systemd-boot uses PARTUUID
|
||||
[[ $ROOT_PART == */dev/mapper* ]] || ROOT_PART_ID="PART$ROOT_PART_ID"
|
||||
|
||||
# create the boot entry configs
|
||||
mkdir -p ${MNT}${BMNTS[$SYS-systemd-boot]}/loader/entries
|
||||
cat > ${MNT}${BMNTS[$SYS-systemd-boot]}/loader/loader.conf << EOF
|
||||
@ -1856,26 +1851,51 @@ EOF
|
||||
prerun_syslinux()
|
||||
{
|
||||
mkdir -pv $MNT${BMNTS[$SYS-syslinux]}/syslinux
|
||||
cp -rfv $RUN/syslinux/splash.png $MNT${BMNTS[$SYS-syslinux]}/syslinux/
|
||||
cp -rfv /usr/lib/syslinux/bios/* $MNT${BMNTS[$SYS-syslinux]}/syslinux/
|
||||
cat > $MNT${BMNTS[$SYS-syslinux]}/syslinux/syslinux.cfg << EOF
|
||||
UI menu.c32
|
||||
PROMPT 0
|
||||
|
||||
UI vesamenu.c32
|
||||
MENU TITLE $DIST Boot Menu
|
||||
MENU BACKGROUND splash.png
|
||||
TIMEOUT 50
|
||||
DEFAULT $DIST
|
||||
|
||||
MENU WIDTH 78
|
||||
MENU MARGIN 4
|
||||
MENU ROWS 5
|
||||
MENU VSHIFT 10
|
||||
MENU TIMEOUTROW 13
|
||||
MENU TABMSGROW 14
|
||||
MENU CMDLINEROW 14
|
||||
MENU HELPMSGROW 16
|
||||
MENU HELPMSGENDROW 29
|
||||
|
||||
# Refer to https://www.syslinux.org/wiki/index.php/Comboot/menu.c32
|
||||
MENU COLOR border 30;44 #40ffffff #a0000000 std
|
||||
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
|
||||
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
|
||||
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
|
||||
MENU COLOR help 37;40 #c0ffffff #a0000000 std
|
||||
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
|
||||
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
|
||||
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
|
||||
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
|
||||
|
||||
|
||||
LABEL $DIST
|
||||
MENU LABEL $DIST Linux
|
||||
LINUX ../vmlinuz-$KERNEL
|
||||
APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
||||
INITRD ../initramfs-$KERNEL.img$([[ $UCODE ]] && printf "\nINITRD %s" "../${UCODE}.img")
|
||||
INITRD $([[ $UCODE ]] && printf "%s" "../${UCODE}.img,")../initramfs-$KERNEL.img
|
||||
|
||||
LABEL ${DIST}fallback
|
||||
MENU LABEL $DIST Linux Fallback
|
||||
LINUX ../vmlinuz-$KERNEL
|
||||
APPEND root=$ROOT_PART_ID $([[ $LUKS_DEV ]] && printf "%s " "$LUKS_DEV")rw
|
||||
INITRD ../initramfs-$KERNEL-fallback.img$([[ $UCODE ]] && printf "\nINITRD %s" "../${UCODE}.img")
|
||||
INITRD $([[ $UCODE ]] && printf "%s" "../${UCODE}.img,")../initramfs-$KERNEL-fallback.img
|
||||
|
||||
|
||||
# some examples for chainloading other bootloaders
|
||||
|
||||
#LABEL grub2
|
||||
#MENU LABEL Grub2
|
||||
@ -1895,8 +1915,10 @@ install_bootloader()
|
||||
{
|
||||
if [[ $ROOT_PART == */dev/mapper* ]]; then
|
||||
ROOT_PART_ID="$ROOT_PART"
|
||||
else
|
||||
elif [[ $BOOTLDR == 'syslinux' ]]; then
|
||||
ROOT_PART_ID="UUID=$(blkid -s UUID -o value $ROOT_PART)"
|
||||
elif [[ $BOOTLDR == 'systemd-boot' ]]; then
|
||||
ROOT_PART_ID="PARTUUID=$(blkid -s PARTUUID -o value $ROOT_PART)"
|
||||
fi
|
||||
|
||||
if [[ $SYS == 'UEFI' ]]; then
|
||||
|
Reference in New Issue
Block a user