mirror of
https://codeberg.org/privacy1st/arch
synced 2024-12-23 01:16:04 +01:00
interactive pacstrap (fix)
This commit is contained in:
parent
aced91deef
commit
31d3d15fbc
@ -34,7 +34,6 @@ function increase_cow_space() {
|
||||
function get_user_input() {
|
||||
# @post
|
||||
# BIOS_TYPE (uefi or bios)
|
||||
# KERNEL (linux or linux-lts)
|
||||
# FS (BTRFS, EXT4, F2FS)
|
||||
# HOSTNAME
|
||||
# USERNAME, USER_PWD
|
||||
@ -46,9 +45,6 @@ function get_user_input() {
|
||||
TMP1=('uefi' 'Newer mainboards' 'bios' 'Legacy BIOS on older mainboards')
|
||||
get_single_choice BIOS_TYPE "Select your bios type" TMP1 || return $?
|
||||
|
||||
TMP1=('linux-lts' 'Long-Time-Stable Linux kernel' 'linux' 'Latest Linux kernel')
|
||||
get_single_choice KERNEL "Select kernel version" TMP1 || return $?
|
||||
|
||||
TMP1=('BTRFS' 'Allows snapshots and dynamic extension of the FS' 'EXT4' 'Default FS of many distributions' 'F2FS' 'Flash-Friendly-FS for SSD or NVMe')
|
||||
get_single_choice FS "Select filesystem to use" TMP1 || return $?
|
||||
|
||||
@ -159,25 +155,11 @@ function choose_mount_options() {
|
||||
function run_pacstrap() {
|
||||
# @pre
|
||||
# BIOS_TYPE
|
||||
# KERNEL
|
||||
# CPU_VENDOR
|
||||
|
||||
echo "Running pacstrap ..."
|
||||
PKGS=()
|
||||
|
||||
case "${KERNEL}" in
|
||||
linux)
|
||||
PKGS+=("${KERNEL}" "${KERNEL}-headers")
|
||||
;;
|
||||
linux-lts)
|
||||
PKGS+=("${KERNEL}" "${KERNEL}-headers")
|
||||
;;
|
||||
*)
|
||||
echo "Not yet implemented!"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
case "${CPU_VENDOR}" in
|
||||
amd)
|
||||
PKGS+=("${CPU_VENDOR}-ucode")
|
||||
@ -340,7 +322,7 @@ function main() {
|
||||
# installation finished
|
||||
|
||||
check_network || return $?
|
||||
# out: BIOS_TYPE, KERNEL, FS, HOSTNAME, USERNAME, USER_PWD, LUKS_PWD
|
||||
# out: BIOS_TYPE, FS, HOSTNAME, USERNAME, USER_PWD, LUKS_PWD
|
||||
get_user_input || return $?
|
||||
# out: CPU_VENDOR
|
||||
get_cpu_vendor || return $?
|
||||
@ -371,7 +353,7 @@ function main() {
|
||||
mkdir /mnt/boot || return $?
|
||||
sudo mount "$BOOT_PART" /mnt/boot || return $?
|
||||
|
||||
# in: BIOS_TYPE, KERNEL, CPU_VENDOR
|
||||
# in: BIOS_TYPE, CPU_VENDOR
|
||||
run_pacstrap || return $?
|
||||
# in: FS
|
||||
run_genfstab || return $?
|
||||
|
@ -13,8 +13,6 @@ LUKS_PWD=test
|
||||
# if unset, then USER_PWD will be used for ROOT_PWD
|
||||
# ROOT_PWD=test
|
||||
|
||||
KERNEL=linux
|
||||
|
||||
TARGET_BLOCK_DEVICE=/dev/sda
|
||||
BOOT_PART_SIZE=500 # MiB
|
||||
FS=BTRFS
|
||||
@ -30,3 +28,6 @@ BIOS_TYPE=uefi
|
||||
LEAVE_MOUNTED=1
|
||||
|
||||
PACSTRAP_INTERACTIVE=1
|
||||
|
||||
# TODO: additional pacman packages, e.g.
|
||||
# ADD_PKGS=('de-p1st-kernel-default')
|
Loading…
Reference in New Issue
Block a user