Public bug reported:
A review of the read-only-rootfs script in i-t-u-c reveals the
following:
local userdata_mnt="/tmpmnt_${userdata_label}"
[...]
mount -o defaults,rw "$path" "$rootmnt"
mkdir -p "$userdata_mnt"
[...]
mount -o discard "$path" "$userdata_mnt"
mount --move "$userdata_mnt" "${rootmnt}/userdata"
[...]
mount -o remount,ro "${rootmnt}"
I assume that this has all been copied from what's currently being done
on the phone. But it needs closer examination, because not only are we
unconditionally mounting the rootfs read-write from the initramfs, we're
doing so without first running fsck over it, which is something we
*NEVER* do in the existing system. Moving to a read-only rootfs model
should not result in changes that cause *higher* risk to the
filesystem's integrity!
It's not clear to me why the rootfs is being mounted rw at all here. I
suspect that this code was written at two different times, and that
initially we needed to mount rw in order to ensure the /userdata
mountpoint existed. But with the current code we're never creating that
mountpoint at all, and so it's possible that we don't need to mount rw
at all but should only be mounting ro.
** Affects: initramfs-tools-ubuntu-core (Ubuntu)
Importance: High
Assignee: James Hunt (jamesodhunt)
Status: New
** Changed in: initramfs-tools-ubuntu-core (Ubuntu)
Assignee: (unassigned) => James Hunt (jamesodhunt)
** Changed in: initramfs-tools-ubuntu-core (Ubuntu)
Importance: Undecided => High
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1376116
Title:
initramfs-tools-ubuntu-core: scripts/read-only-rootfs unconditionally
mounts rootfs read-write without fsck
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools-ubuntu-core/+bug/1376116/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs