Fix: various errors with more than 9 partitions, update README
See: https://forum.archlabslinux.com/t/installer-doesnt-list-all-partitions/6461/44
This commit is contained in:
parent
93a46247bc
commit
72f711df51
20
README.md
20
README.md
@ -1,15 +1,17 @@
|
|||||||
# ArchLabs Installer
|
# ArchLabs Installer
|
||||||
|
|
||||||
|
Shell script to install Arch Linux based distributions with a focus on customization
|
||||||
|
|
||||||
#### Features
|
#### Features
|
||||||
|
|
||||||
- Minimal dependencies.
|
- Minimal dependencies.
|
||||||
- LUKS and/or LVM support.
|
- LUKS and/or LVM support.
|
||||||
- Btrfs and subvolume support.
|
- Btrfs and subvolume support.
|
||||||
- Full device auto partitioning.
|
- Full device auto partitioning.
|
||||||
- Mirror country selection and sorting.
|
- Mirror selection and sorting.
|
||||||
- Self updating with persistent settings.
|
- Self updating with persistent settings.
|
||||||
- Background base install process while you customize.
|
- Base packages install in the background for faster installs.
|
||||||
- Choose kernel, file system, bootloader, packages, sessions, shell, login manager, etc.
|
- Choose your own kernel, file system, bootloader, packages, sessions, shell, login manager, etc.
|
||||||
|
|
||||||
|
|
||||||
#### Requirements
|
#### Requirements
|
||||||
@ -17,6 +19,7 @@
|
|||||||
- `awk`
|
- `awk`
|
||||||
- `sed`
|
- `sed`
|
||||||
- `curl`
|
- `curl`
|
||||||
|
- `bash`
|
||||||
- `dialog`
|
- `dialog`
|
||||||
- `parted`
|
- `parted`
|
||||||
- `coreutils`
|
- `coreutils`
|
||||||
@ -28,14 +31,5 @@
|
|||||||
#### Manual Installation
|
#### Manual Installation
|
||||||
|
|
||||||
```
|
```
|
||||||
curl -fSL https://bitbucket.org/archlabslinux/installer/raw/master/installer -o /usr/bin/installer
|
curl -fSL https://bitbucket.org/archlabslinux/installer/raw/master/installer -o /usr/local/bin/installer
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
A packaged version can also be found in our repos:
|
|
||||||
|
|
||||||
- stable: https://bitbucket.org/archlabslinux/archlabs\_repo
|
|
||||||
|
|
||||||
- unstable: https://bitbucket.org/archlabslinux/archlabs\_unstable
|
|
||||||
|
|
||||||
|
23
installer
23
installer
@ -5,7 +5,7 @@
|
|||||||
# Some ideas and code reworked from other resources
|
# Some ideas and code reworked from other resources
|
||||||
# AIF, Calamares, and the Arch Wiki.. Credit where credit is due
|
# AIF, Calamares, and the Arch Wiki.. Credit where credit is due
|
||||||
|
|
||||||
# shellcheck disable=2086,2046,2254,2164,2030,2031
|
# shellcheck disable=2086,2046,2254,2164,2030,2031,2001
|
||||||
VER=2.16
|
VER=2.16
|
||||||
|
|
||||||
# default values {
|
# default values {
|
||||||
@ -1235,8 +1235,8 @@ part_mount()
|
|||||||
|
|
||||||
part_pretty()
|
part_pretty()
|
||||||
{
|
{
|
||||||
local part="$1"
|
local part="$1" # valid block device partition or empty string for all
|
||||||
local regexp="$2"
|
local regexp="$2" # awk search regex for partition type or empty string for all
|
||||||
local s dev size isize model
|
local s dev size isize model
|
||||||
|
|
||||||
# invalid block device passed in
|
# invalid block device passed in
|
||||||
@ -1252,11 +1252,9 @@ part_pretty()
|
|||||||
s=${size%%__*}
|
s=${size%%__*}
|
||||||
size_t="${s: -1:1}"
|
size_t="${s: -1:1}"
|
||||||
isize=${s:0:-1}
|
isize=${s:0:-1}
|
||||||
if [[ $dev = /dev/nvme* ]]; then
|
# find the root device: /dev/sda1 -> /dev/sda, /dev/nvme0n1p12 -> /dev/nvme0n1
|
||||||
model=$(lsblk -lno MODEL "${dev%p[1-9]}" | awk '{gsub(/ |\t/, "_"); print}')
|
drive="$(sed 's/p\?[1-9][0-9]*$//' <<< "$dev")"
|
||||||
else
|
model=$(lsblk -lno MODEL "$drive" | awk '{gsub(/ |\t/, "_"); print}')
|
||||||
model=$(lsblk -lno MODEL "${dev%[1-9]}" | awk '{gsub(/ |\t/, "_"); print}')
|
|
||||||
fi
|
|
||||||
[[ $size_t == 'K' || ($size_t == 'M' && ${isize%.*} -lt 80) ]] || printf "%s\n" "$dev ${size}__$model"
|
[[ $size_t == 'K' || ($size_t == 'M' && ${isize%.*} -lt 80) ]] || printf "%s\n" "$dev ${size}__$model"
|
||||||
done < <(lsblk -lno TYPE,PATH,SIZE,FSTYPE,LABEL $part |
|
done < <(lsblk -lno TYPE,PATH,SIZE,FSTYPE,LABEL $part |
|
||||||
awk "/$regexp/"' && !'"/${IGNORE_DEV:-NONEXX}/"' {
|
awk "/$regexp/"' && !'"/${IGNORE_DEV:-NONEXX}/"' {
|
||||||
@ -1371,10 +1369,10 @@ part_cryptlv()
|
|||||||
}
|
}
|
||||||
|
|
||||||
part_countdec()
|
part_countdec()
|
||||||
{
|
{ # loop all passed partitions and remove them from the list, decrementing the counter
|
||||||
for pt; do
|
for p; do
|
||||||
if (( PART_COUNT )); then
|
if (( PART_COUNT )); then
|
||||||
PARTS="$(sed "/${pt//\//\\/}/d" <<< "$PARTS")"
|
PARTS="$(sed "/${p##/dev/} /d" <<< "$PARTS")" # sed //d doesn't like slashes so strip the /dev/
|
||||||
(( PART_COUNT-- ))
|
(( PART_COUNT-- ))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -1398,6 +1396,7 @@ mount_menu()
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
# we don't show the underlying partition(s) for LVM and/or LUKS
|
||||||
[[ $LUKS && $LUKS_PART ]] && part_countdec $LUKS_PART
|
[[ $LUKS && $LUKS_PART ]] && part_countdec $LUKS_PART
|
||||||
[[ $LVM && $LVM_PARTS ]] && part_countdec $LVM_PARTS
|
[[ $LVM && $LVM_PARTS ]] && part_countdec $LVM_PARTS
|
||||||
mount_root || { ROOT=''; return 1; }
|
mount_root || { ROOT=''; return 1; }
|
||||||
@ -3919,7 +3918,7 @@ fi
|
|||||||
mirrorpid=''
|
mirrorpid=''
|
||||||
|
|
||||||
if [[ ! -f /tmp/new ]]; then
|
if [[ ! -f /tmp/new ]]; then
|
||||||
msg "Update" "\nChecking for newer installer versions.\n" 0
|
msg "Update" "\nChecking for installer updates.\n" 0
|
||||||
if hash reflector > /dev/null 2>&1; then
|
if hash reflector > /dev/null 2>&1; then
|
||||||
( reflector --list-countries 2>/dev/null | sed '1,2d' | awk 'NF{NF--}; {print}' > /tmp/mcountry ) &
|
( reflector --list-countries 2>/dev/null | sed '1,2d' | awk 'NF{NF--}; {print}' > /tmp/mcountry ) &
|
||||||
mirrorpid=$!
|
mirrorpid=$!
|
||||||
|
Reference in New Issue
Block a user