Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ else
/opt/ic/bin/guest_disk crypt-format var "$VAR_PARTITION"
/opt/ic/bin/guest_disk crypt-open var "$VAR_PARTITION"
echo "Populating /var filesystem in ${VAR_PARTITION} on first boot."
mkfs.ext4 -F /dev/mapper/var_crypt -d /var
# Prevent udev from processing the device while we format it.
udevadm lock --device=/dev/mapper/var_crypt mkfs.ext4 -F /dev/mapper/var_crypt -d /var
Comment thread
Bownairo marked this conversation as resolved.
# Fix root inode (mkfs fails to set correct security context).
echo "ea_set / security.selinux system_u:object_r:var_t:s0\\000" | debugfs -w /dev/mapper/var_crypt

Expand Down Expand Up @@ -80,4 +81,7 @@ else
# and continue operating.
cryptsetup luksClose old_var_crypt || echo "Failed to close old /var crypto partition"
fi

# Explicitly trigger udev now that the device should be ready.
udevadm trigger --settle --action=change /dev/mapper/var_crypt
fi
Loading