possible fix for bios systems

This commit is contained in:
lelgenio 2019-12-26 01:59:39 -03:00
parent 5b3aeb60a2
commit 63d04275d2
1 changed files with 17 additions and 12 deletions

View File

@ -227,16 +227,20 @@ partition_drive() {
local dev="$1"; shift local dev="$1"; shift
# 100 MB /boot partition, everything else under LVM # 100 MB /boot partition, everything else under LVM
if $IS_BIOS;then
parted -s "$dev" \
mklabel dos \
mkpart primary fat32 1M 100M \
mkpart primary ext4 100M 100% \
set 1 boot on \
set 2 lvm on
else
parted -s "$dev" \ parted -s "$dev" \
mklabel gpt \ mklabel gpt \
mkpart boot 1 100M \ mkpart boot 1 100M \
mkpart lvm 100M 100% \ mkpart lvm 100M 100% \
set 1 boot on\ set 1 boot on\
set 2 lvm on set 2 lvm on
if $IS_BIOS;then
parted -s "$dev" \
set 1 bios_grub on
fi fi
} }
#}}} #}}}
@ -262,7 +266,7 @@ setup_lvm() {
lvcreate --yes -C y -L1G "$volgroup" -n swap lvcreate --yes -C y -L1G "$volgroup" -n swap
# Use the rest of the space for root # Use the rest of the space for root
lvcreate --yes -L '30G' "$volgroup" -n root lvcreate --yes -L '50G' "$volgroup" -n root
lvcreate --yes -l '+100%FREE' "$volgroup" -n home lvcreate --yes -l '+100%FREE' "$volgroup" -n home
# Enable the new volumes # Enable the new volumes
@ -617,10 +621,10 @@ set_bootctl() {
fi fi
if $IS_BIOS;then if $IS_BIOS;then
grub install "$boot_dev" grub-install "$boot_dev"
grub grub-mkconfig -o /boot/grub/grub.cfg
else
else
bootctl install bootctl install
cat > /boot/loader/entries/arch.conf <<EOF cat > /boot/loader/entries/arch.conf <<EOF
title arch title arch
@ -632,6 +636,7 @@ initrd initramfs-linux-zen.img
options $crypt options $crypt
#options quiet splash loglevel=3 vga=current rd.udev.log_priority=3 rd.systemd.show_status=auto vt.global_cursor_default=0 nmi_watchdog=0 $crypt #options quiet splash loglevel=3 vga=current rd.udev.log_priority=3 rd.systemd.show_status=auto vt.global_cursor_default=0 nmi_watchdog=0 $crypt
EOF EOF
fi fi
} }
#}}} #}}}