Skip to content

Commit

Permalink
Align sysroot mount options with SLE Micro, which in turn is applying…
Browse files Browse the repository at this point in the history
… default mount options

Signed-off-by: David Cassany <dcassany@suse.com>
  • Loading branch information
davidcassany committed Mar 7, 2024
1 parent a04cecf commit 744e9fd
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ if [ "${snapshotter}" == "btrfs" ]; then
rootvol_unit=$(systemd-escape -p --suffix=mount ${root_part_mnt})
case "${elemental_mode}" in
*active*)
opts="ro,noatime,seclabel,compress=lzo,space_cache=v2" ;;
opts="ro" ;;
*passive*)
opts="ro,noatime,seclabel,compress=lzo,space_cache=v2,subvol=${elemental_img}" ;;
opts="ro,subvol=${elemental_img}" ;;
*)
exit 1 ;;
esac
Expand All @@ -75,7 +75,7 @@ if [ "${snapshotter}" == "btrfs" ]; then
echo "[Mount]"
echo "Where=${root_part_mnt}"
echo "What=${root}"
echo "Options=rw,noatime,seclabel,compress=lzo,space_cache=v2,subvol=@"
echo "Options=defaults,subvol=@"
} > "$GENERATOR_DIR/${rootvol_unit}"

{
Expand All @@ -87,7 +87,7 @@ if [ "${snapshotter}" == "btrfs" ]; then
echo "[Mount]"
echo "Where=/sysroot/.snapshots"
echo "What=${root}"
echo "Options=rw,noatime,seclabel,compress=lzo,space_cache=v2,subvol=@/.snapshots"
echo "Options=defaults,subvol=@/.snapshots"
} > "$GENERATOR_DIR/${snapshots_unit}"

mkdir -p "$GENERATOR_DIR"/initrd-root-fs.target.wants
Expand Down Expand Up @@ -117,7 +117,7 @@ else
echo "[Mount]"
echo "Where=${root_part_mnt}"
echo "What=${root}"
echo "Options=rw,suid,dev,exec,auto,nouser,async"
echo "Options=defaults"
} > "$GENERATOR_DIR/${state_unit}"

{
Expand All @@ -128,7 +128,7 @@ else
echo "[Mount]"
echo "Where=/sysroot"
echo "What=${root_part_mnt}/${image}"
echo "Options=ro,suid,dev,exec,auto,nouser,async"
echo "Options=ro"
} > "$GENERATOR_DIR"/sysroot.mount
fi

Expand Down

0 comments on commit 744e9fd

Please sign in to comment.