Merge branch 'feature/24' into develop

This commit is contained in:
Suikan 2021-07-12 23:12:27 +09:00
commit 885ac34a5a
4 changed files with 18 additions and 1 deletions

View file

@ -7,6 +7,8 @@ Record of the modification in project development.
### Deprecated
### Removed
### Fixed
- [Issue 24 : Fail to install the ubuntu when the / volume is btrfs](https://github.com/suikan4github/kaiten-yaki/issues/24)
### Known Issue
## [1.1.0] - 2021-07-11

View file

@ -291,8 +291,11 @@ function para_install_msg() {
function post_install() {
## Mount the target file system
# ${TARGETMOUNTPOINT} is created by the GUI/TUI installer
# ${BTRFSOPTION} is defined by the caller of this function for BTRFS formated volume.
# ${BTRFSOPTION} have to be NOT quoted. Otherwise, mount will receive an empty
# string as first option, when the veraible is empty.
echo "...Mounting /dev/mapper/${VGNAME}-${LVROOTNAME} on ${TARGETMOUNTPOINT}."
mount /dev/mapper/"${VGNAME}"-"${LVROOTNAME}" "${TARGETMOUNTPOINT}"
mount ${BTRFSOPTION} /dev/mapper/"${VGNAME}"-"${LVROOTNAME}" "${TARGETMOUNTPOINT}"
# And mount other directories
echo "...Mounting all other dirs."

View file

@ -53,6 +53,15 @@ function main() {
# Post-install stage
# *******************************************************************************
# If the target volume is formated by btrfs, Ubiquity install the root into the
# @ sub-volume. Thus, mount command inside post_install have to use special option
# to specify @ as mount target.
if lsblk -o NAME,FSTYPE | grep -i "${VGNAME}-${LVROOTNAME}" | grep -i "btrfs" > /dev/null ; then
export BTRFSOPTION="-o subvol=@"
else
export BTRFSOPTION=""
fi
# Distribution dependent finalizing. Embedd encryption key into the ramfs image.
# The script is parameterized by env-variable to fit to the distribution
post_install

View file

@ -74,6 +74,9 @@ function main() {
# Post-install stage
# *******************************************************************************
# We don't need special option for BTRFSOPTION.
export BTRFSOPTION=""
# Distribution dependent finalizing. Embedd encryption key into the ramfs image.
# The script is parameterized by env-variable to fit to the distribution
post_install