Bug#806273: Patch for disabling kernel mounts when grub-mount is available
On Wed, Nov 16, 2016 at 12:30:52PM +0100, Emmanuel Kasper wrote:
> On 11/15/2016 06:25 PM, Ben Hutchings wrote:
> > On Tue, 2016-11-15 at 15:33 +0100, Emmanuel Kasper wrote:
> >> The included patch disables read_only mounts when grub-mount is available.
> >
> > Why not require that grub-mount is available, and disable the other
> > path entirely?
> >
> > Ben.
>
> makes sense
>
> I had a look at the platforms where grub-mount is available
>
> and it seems only
> mips64el s390x
> are missing from the list
>
> now do these platforms need os-prober ?
> I don't think so as most OSes detected by os-prober are x86.
>
> I noticed that the osprober udeb already limits itself to the platform
> where grub-mount is available so requiring grub-mount to be available
> should be a relative conservative change.
>
FWIW, Ubuntu just pushed the following update[1] to xenial's os-prober that
disables mounting using "mount" completely:
----%<----
diff -Nru os-prober-1.70ubuntu3/debian/changelog os-prober-1.70ubuntu3.1/debian/changelog
--- os-prober-1.70ubuntu3/debian/changelog 2016-03-11 13:43:46.000000000 +0000
+++ os-prober-1.70ubuntu3.1/debian/changelog 2016-12-06 15:05:22.000000000 +0000
@@ -1,3 +1,10 @@
+os-prober (1.70ubuntu3.1) xenial; urgency=critical
+
+ * os-probes/common/50mounted-tests: don't mount filesystems with mount for
+ probing as that can cause corruption in some cases. (LP: #1579609)
+
+ -- Eric Desrochers <eric.desrochers@canonical.com> Tue, 06 Dec 2016 10:05:22 -0500
+
os-prober (1.70ubuntu3) xenial; urgency=low
* Check for MSDOS extended partitions and skip any further tests which
diff -Nru os-prober-1.70ubuntu3/os-probes/common/50mounted-tests os-prober-1.70ubuntu3.1/os-probes/common/50mounted-tests
--- os-prober-1.70ubuntu3/os-probes/common/50mounted-tests 2015-11-20 10:07:43.000000000 +0000
+++ os-prober-1.70ubuntu3.1/os-probes/common/50mounted-tests 2016-12-06 15:05:22.000000000 +0000
@@ -58,26 +58,8 @@
type=fuseblk
fi
else
- ro_partition "$partition"
- for type in $types $delaytypes; do
- if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
- debug "mounted as $type filesystem"
- case "$type" in
- btrfs)
- if [ -x "$tmpmnt/@/lib" ] && \
- ! mount --bind "$tmpmnt/@" "$tmpmnt"; then
- warn "failed to mount btrfs subvolume @ on $partition"
- if ! umount $tmpmnt; then
- warn "failed to umount $tmpmnt"
- fi
- mounted=
- fi
- ;;
- esac
- mounted=1
- break
- fi
- done
+ echo "Failed to probe for filesystem type" >&2
+ exit 1
fi
if [ "$mounted" ]; then
---->%----
1: https://launchpad.net/ubuntu/+source/os-prober/1.70ubuntu3.1
> --
> To unsubscribe, send mail to 806273-unsubscribe@bugs.debian.org.
>
Reply to: