suikan4github/kaiten-yaki

Fail to install the ubuntu when the / volume is btrfs

Closed this issue · 3 comments

Failed to install Ubuntu 20.04 LTS when the / logical volume is btrffs. See the screen shot.

encrypted ubuntu-2021-07-11-21-55-21

The mounted point is different from the usual. To work with btrfs, need to handle the sub-volume.
https://mutschler.eu/linux/install-guides/ubuntu-btrfs/#step-5-post-installation-steps

Adding following option to the mount solve this problem.

 -o subvol=@

Following command can detect

lsblk -o NAME,FSTYPE | grep -i "${VGNAME}-${LVROOTNAME}" | grep -i "btrfs" > /dev/null

Thus follwing line :

mount /dev/mapper/"${VGNAME}"-"${LVROOTNAME}" "${TARGETMOUNTPOINT}"

should be changed to :

if lsblk -o NAME,FSTYPE | grep -i "${VGNAME}-${LVROOTNAME}" | grep -i "btrfs" > /dev/null ; then 
	btrfsoption="-o subvol=@"
else
	brtfsoption=""
fi
mount "${brtfsoption}" /dev/mapper/"${VGNAME}"-"${LVROOTNAME}" "${TARGETMOUNTPOINT}"

Only Ubuntu fails. Void Linux can be install with btrfs without any modification.

Merged to develop. Ready to release.