diff --git a/usr/lib/archboot/installer/mountpoints.sh b/usr/lib/archboot/installer/mountpoints.sh index c44f2f7a6..89da3719d 100644 --- a/usr/lib/archboot/installer/mountpoints.sh +++ b/usr/lib/archboot/installer/mountpoints.sh @@ -231,10 +231,15 @@ _mountpoints() { _btrfs_parts _check_mkfs_values echo "${_DEV}:${_FSTYPE}:${_MP}:${_DOMKFS}:${_LABEL_NAME}:${_FS_OPTIONS}:${_BTRFS_DEVS}:${_BTRFS_LEVEL}:${_BTRFS_SUBVOLUME}:${_BTRFS_COMPRESS}" >>/tmp/.parts - #shellcheck disable=SC2001,SC2086 - [[ ! "${_FSTYPE}" == "btrfs" || -n ${_DO_ROOT} ]] && _DEVS="${_DEVS//$(${_LSBLK} NAME,SIZE -d "${_DEV}")/}" - fi + # always remove root device + if [[ -n "${_DO_ROOT}" ]]; then + _DEVS="${_DEVS//$(${_LSBLK} NAME,SIZE -d "${_DEV}")/}" + else + # don't remove btrfs format devices on none root MP + [[ ! "${_FSTYPE}" == "btrfs" ]] && _DEVS="${_DEVS//$(${_LSBLK} NAME,SIZE -d "${_DEV}")/}" + fi _DO_ROOT="" + fi done #shellcheck disable=SC2028 _dialog --yesno "Would you like to create and mount the filesytems like this?\n\nSyntax\n------\nDEVICE:FSTYPE:MOUNTPOINT:FORMAT:LABEL:FSOPTIONS:BTRFS_DETAILS\n\n$(while read -r i;do echo "${i}\n" | sed -e 's, ,#,g';done