Skip to content

Commit 461694d

Browse files
committed
ALEZ 1.1; update_parts() added; README updated
1 parent 83f3c88 commit 461694d

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ WHAT IS ALEZ?
1010

1111
ALEZ (pronounced like 'ales', as in beer) is a shell script to simplify the process of installing Arch Linux using the ZFS file system.
1212

13-
ALEZ automates the processes of partitioning disks, creating and configuring a ZFS pool and some basic datasets, installing a base Arch Linux system and configuring and installing the GRUB or systemd bootloader so that they all play nicely with ZFS. The defaul datasets are configured to be managed with the ([zedenv](https://github.com/johnramsden/zedenv)) boot environment manager.
13+
ALEZ automates the processes of partitioning disks, creating and configuring a ZFS pool and some basic datasets, installing a base Arch Linux system
14+
and configuring and installing the GRUB or systemd bootloader so that they all play nicely with ZFS.
15+
16+
The default datasets are configured ready to be managed with the ([zedenv](https://github.com/johnramsden/zedenv)) boot environment manager.
1417

1518

1619
LIMITATIONS
@@ -28,7 +31,8 @@ ALEZ has a few limitations you need to be aware of:
2831
HOW DO I USE IT?
2932
----------------
3033

31-
The easiest way to use ALEZ is to [download archlinux-alez.](https://github.com/danboid/ALEZ/releases), which is a version of Arch Linux remastered to include ZFS support and the Arch Linux Easy ZFS (ALEZ) installer. [Transfer the iso onto a USB drive](https://wiki.archlinux.org/index.php/USB_flash_installation_media) (or burn it to a disc) just as you would for the regular Arch iso, boot it and then type 'alez' at the prompt to start the installer.
34+
The easiest way to use ALEZ is to [download archlinux-alez.](https://github.com/danboid/ALEZ/releases), which is a version of Arch Linux remastered to include ZFS support and the Arch Linux Easy ZFS (ALEZ) installer.
35+
[Transfer the iso onto a USB drive](https://wiki.archlinux.org/index.php/USB_flash_installation_media) (or burn it to a disc) just as you would for the regular Arch iso, boot it and then type 'alez' at the prompt to start the installer.
3236

3337

3438

@@ -52,7 +56,7 @@ If ALEZ abruptly 'completes' near the start of the install, it could be that it
5256
Running ALEZ under virt-manager / qemu
5357
----------------------------------------
5458

55-
GRUB fails to install under VMs created using the virt-manager defaults because it defaults to using an IDE disk bus. Change your VM disk bus to SATA before running the installer.
59+
GRUB fails to install under VMs created using the virt-manager defaults because it defaults to using an IDE disk bus. Change your VM disk bus to VirtIO or SATA before running ALEZ.
5660

5761

5862

alez.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
# shellcheck disable=SC2015
33

4-
# Arch Linux Easy ZFS (ALEZ) installer 1.0
4+
# Arch Linux Easy ZFS (ALEZ) installer 1.1
55
# by Dan MacDonald with contributions from John Ramsden
66

77
# Exit on error
@@ -13,7 +13,7 @@ export LANG=C
1313
# This is required to fix grub's "failed to get canonical path" error
1414
export ZPOOL_VDEV_NAME_PATH=1
1515

16-
version=1.0
16+
version=1.1
1717

1818
# Colors
1919
RED='\033[0;31m'
@@ -53,7 +53,6 @@ unmount_cleanup() {
5353

5454
error_cleanup() {
5555
echo -e "${RED}WARNING:${NC} Error occurred. Unmounted datasets and exported ${zroot}"
56-
# Other cleanup
5756
}
5857

5958
# Run stuff in the ZFS chroot install function with optional message
@@ -147,7 +146,7 @@ get_matching_kernel() {
147146
printf "%s\n%s\n" "zfs-linux${kern_suffix} package is out of sync with linux${kern_suffix}." \
148147
"Downloading kernel ${kernel_version} from archive"
149148

150-
# # Get package list
149+
# Get package list
151150
ala="https://archive.archlinux.org/packages"
152151
kern_match="$(curl --silent "${ala}/.all/index.0.xz" | unxz | grep -P "linux${kern_suffix}-${zfs_depend_ver}")"
153152

@@ -345,6 +344,13 @@ get_parts() {
345344
done
346345
}
347346

347+
update_parts() {
348+
partinfo="$(get_parts)"
349+
plength="$(echo "${partinfo}" | wc -l)"
350+
mapfile -t partids < <(ls /dev/disk/by-id/* "$(${show_path} && ls /dev/disk/by-path/* || : ;)")
351+
}
352+
353+
348354
# Define a multiline variable
349355
define() {
350356
# shellcheck disable=SC2086
@@ -396,7 +402,7 @@ else
396402
bootloader="g"
397403
fi
398404

399-
# check if vd* disk exists
405+
# Check if any VirtIO devices exist
400406
if lsblk | grep -E 'vd.*disk'; then
401407
[ -d /dev/disk/by-path/ ] && show_path=true
402408
fi
@@ -459,9 +465,7 @@ while dialog --clear --title "New zpool?" --yesno "${msg}" $HEIGHT $WIDTH; do
459465
dialog --tailbox ${partsfile} 0 0
460466
fi
461467

462-
partinfo="$(get_parts)"
463-
plength="$(echo "${partinfo}" | wc -l)"
464-
mapfile -t partids < <(ls /dev/disk/by-id/* "$(${show_path} && ls /dev/disk/by-path/* || : ;)")
468+
update_parts
465469

466470
if [ "$zpconf" == "s" ]; then
467471
msg="Select a partition.\n\nIf you used alez to create your partitions,\nyou likely want the one ending with -part2"
@@ -545,8 +549,8 @@ if [[ "${install_type}" =~ ^(u|U)$ ]]; then
545549
dialog --tailbox ${partsfile} 0 0
546550
fi
547551

548-
partinfo="$(get_parts)"
549-
plength="$(echo "${partinfo}" | wc -l)"
552+
update_parts
553+
550554
# shellcheck disable=SC2086
551555
msg="Enter the number of the partition above that you want to use for an esp.\n\n"
552556
msg+="If you used alez to create your partitions,\nyou likely want the one ending with -part1"
@@ -593,9 +597,7 @@ if [[ "${install_type}" =~ ^(b|B)$ ]]; then
593597
dialog --tailbox ${partsfile} 0 0
594598
fi
595599

596-
partinfo="$(get_disks)"
597-
plength="$(echo "${partinfo}" | wc -l)"
598-
mapfile -t partids < <(ls /dev/disk/by-id/* "$(${show_path} && ls /dev/disk/by-path/* || : ;)")
600+
update_parts
599601

600602
# shellcheck disable=SC2086
601603
grubdisk=$(dialog --stdout --clear --title "Install type" \
@@ -646,5 +648,3 @@ chroot /mnt bash
646648
# back out of chroot
647649
zpool export ${zroot}
648650
EOT
649-
650-
# vim: tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab

0 commit comments

Comments
 (0)