rootfs-block/module-setup.sh: find root btrfs subvolumes
If root is a btrfs subvolume, find it, if fstab is not usedmaster
parent
481ee9e6fc
commit
df1e8127da
|
|
@ -30,11 +30,19 @@ cmdline_journal() {
|
||||||
}
|
}
|
||||||
|
|
||||||
cmdline_rootfs() {
|
cmdline_rootfs() {
|
||||||
local dev=/dev/block/$(find_root_block_device)
|
local _dev=/dev/block/$(find_root_block_device)
|
||||||
if [ -e $dev ]; then
|
local _fstype _flags _subvol
|
||||||
printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
|
if [ -e $_dev ]; then
|
||||||
printf " rootflags=%s" "$(find_mp_fsopts /)"
|
printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$_dev")")"
|
||||||
printf " rootfstype=%s" "$(find_mp_fstype /)"
|
_fstype="$(find_mp_fstype /)"
|
||||||
|
_flags="$(find_mp_fsopts /)"
|
||||||
|
printf " rootfstype=%s" "$_fstype"
|
||||||
|
if [[ $use_fstab != yes ]] && [[ $_fstype = btrfs ]]; then
|
||||||
|
_subvol=$(findmnt -e -v -n -o FSROOT --target /) \
|
||||||
|
&& _subvol=${_subvol#/}
|
||||||
|
_flags="$_flags,${_subvol:+subvol=$_subvol}"
|
||||||
|
fi
|
||||||
|
printf " rootflags=%s" "${_flags#,}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue