Create rpool/ROOT dataset automatically, and supply password

automatically.
This commit is contained in:
oddlama 2021-05-30 02:44:26 +02:00
parent bae9e41741
commit c6d037f95f
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
2 changed files with 5 additions and 2 deletions

View File

@ -408,10 +408,13 @@ function format_zfs_standard() {
"${extra_args[@]}" \
rpool \
"${devices[@]}" \
<<< "$GENTOO_INSTALL_ENCRYPTION_KEY"
|| die "Could not create zfs pool on $devices_desc"
zfs create -o mountpoint=/ rpool/ROOT \
|| die "Could not create zfs dataset 'rpool/ROOT'"
zfs create -o mountpoint=/ rpool/ROOT/default \
|| die "Could not create zfs default dataset"
|| die "Could not create zfs dataset 'rpool/ROOT/default'"
zpool set bootfs=rpool/ROOT/default rpool \
|| die "Could not set zfs property bootfs on rpool"
}

View File

@ -176,7 +176,7 @@ function cache_lsblk_output() {
function get_device_by_ptuuid() {
local ptuuid="${1,,}"
local dev
if [[ -n $CACHED_LSBLK_OUTPUT ]]; then
if [[ -v CACHED_LSBLK_OUTPUT ]]; then
dev="$CACHED_LSBLK_OUTPUT"
else
dev="$(lsblk --all --path --pairs --output NAME,PTUUID,PARTUUID)" \