Accepting request 149432 from home:arvidjaar:bnc:799457:grub-mount
- In openSUSE grub-mount is called grub2-mount It may fix bnc#767272. OBS-URL: https://build.opensuse.org/request/show/149432 OBS-URL: https://build.opensuse.org/package/show/Base:System/os-prober?expand=0&rev=16
This commit is contained in:
parent
fad4a64f9a
commit
3208036ff3
71
os-prober-1.49-grub2-mount.patch
Normal file
71
os-prober-1.49-grub2-mount.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
||||||
|
Subject: replace grub-mount with grub2-mount everywhere
|
||||||
|
|
||||||
|
References: bnc#799457, bnc#767272
|
||||||
|
|
||||||
|
We use grub2-mount, not grub-mount. As shown in bnc#799457,
|
||||||
|
grub2-mount may access filesystem even when kernel driver
|
||||||
|
will refuse it. os-prober makes devices read-only to prevent
|
||||||
|
accidental damage, so kernel driver fails if log replay is needed
|
||||||
|
but cannot be performed.
|
||||||
|
|
||||||
|
This may likely fix bnc#767272
|
||||||
|
|
||||||
|
Index: os-prober/common.sh
|
||||||
|
===================================================================
|
||||||
|
--- os-prober.orig/common.sh
|
||||||
|
+++ os-prober/common.sh
|
||||||
|
@@ -259,8 +259,8 @@ linux_mount_boot () {
|
||||||
|
debug "found boot partition $1 for linux system on $partition, but cannot map to existing device"
|
||||||
|
else
|
||||||
|
debug "found boot partition $bootpart for linux system on $partition"
|
||||||
|
- if which grub-mount >/dev/null 2>&1 && \
|
||||||
|
- grub-mount "$boottomnt" "$tmpmnt/boot" 2>/dev/null; then
|
||||||
|
+ if which grub2-mount >/dev/null 2>&1 && \
|
||||||
|
+ grub2-mount "$boottomnt" "$tmpmnt/boot" 2>/dev/null; then
|
||||||
|
mounted=1
|
||||||
|
else
|
||||||
|
ro_partition "$boottomnt"
|
||||||
|
Index: os-prober/linux-boot-probes/common/50mounted-tests
|
||||||
|
===================================================================
|
||||||
|
--- os-prober.orig/linux-boot-probes/common/50mounted-tests
|
||||||
|
+++ os-prober/linux-boot-probes/common/50mounted-tests
|
||||||
|
@@ -34,8 +34,8 @@ if [ ! -d "$tmpmnt" ]; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
mounted=
|
||||||
|
-if which grub-mount >/dev/null 2>&1 && \
|
||||||
|
- grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
|
||||||
|
+if which grub2-mount >/dev/null 2>&1 && \
|
||||||
|
+ grub2-mount "$partition" "$tmpmnt" 2>/dev/null; then
|
||||||
|
mounted=1
|
||||||
|
type=fuseblk
|
||||||
|
else
|
||||||
|
Index: os-prober/os-probes/common/50mounted-tests
|
||||||
|
===================================================================
|
||||||
|
--- os-prober.orig/os-probes/common/50mounted-tests
|
||||||
|
+++ os-prober/os-probes/common/50mounted-tests
|
||||||
|
@@ -49,8 +49,8 @@ if [ ! -d "$tmpmnt" ]; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
mounted=
|
||||||
|
-if which grub-mount >/dev/null 2>&1 && \
|
||||||
|
- grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
|
||||||
|
+if which grub2-mount >/dev/null 2>&1 && \
|
||||||
|
+ grub2-mount "$partition" "$tmpmnt" 2>/dev/null; then
|
||||||
|
debug "mounted using GRUB"
|
||||||
|
mounted=1
|
||||||
|
type=fuseblk
|
||||||
|
Index: os-prober/os-probes/init/common/10filesystems
|
||||||
|
===================================================================
|
||||||
|
--- os-prober.orig/os-probes/init/common/10filesystems
|
||||||
|
+++ os-prober/os-probes/init/common/10filesystems
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
set +e # ignore errors from modprobe
|
||||||
|
|
||||||
|
FILESYSTEMS='ext2 ext3 ext4 reiserfs xfs jfs msdos vfat ntfs minix hfs hfsplus qnx4 ufs btrfs'
|
||||||
|
-# fuse is needed to make grub-mount work.
|
||||||
|
+# fuse is needed to make grub2-mount work.
|
||||||
|
FILESYSTEMS="$FILESYSTEMS fuse"
|
||||||
|
# The Ubuntu kernel udebs put a number of filesystem modules in
|
||||||
|
# fs-{core,secondary}-modules. It's fairly cheap to check for these too.
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jan 19 19:12:20 UTC 2013 - arvidjaar@gmail.com
|
||||||
|
|
||||||
|
- In openSUSE grub-mount is called grub2-mount
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jan 19 13:41:59 UTC 2013 - arvidjaar@gmail.com
|
Sat Jan 19 13:41:59 UTC 2013 - arvidjaar@gmail.com
|
||||||
|
|
||||||
|
@ -40,6 +40,8 @@ Patch2: os-prober-skip-MS-legacy-on-UEFI.patch
|
|||||||
Patch3: os-prober-1.49-fix-grub2.cfg-parsing.patch
|
Patch3: os-prober-1.49-fix-grub2.cfg-parsing.patch
|
||||||
# PATCH-FIX-OPENSUSE: Do not try to mount LVM2 PV [bnc#798604]
|
# PATCH-FIX-OPENSUSE: Do not try to mount LVM2 PV [bnc#798604]
|
||||||
Patch4: os-prober-1.49-skip-LVM2_member.patch
|
Patch4: os-prober-1.49-skip-LVM2_member.patch
|
||||||
|
# PATCH-FIX-OPENSUSE: Use correct name for grub2-mount
|
||||||
|
Patch5: os-prober-1.49-grub2-mount.patch
|
||||||
|
|
||||||
Requires: /bin/grep
|
Requires: /bin/grep
|
||||||
Requires: /bin/sed
|
Requires: /bin/sed
|
||||||
@ -63,6 +65,7 @@ cp %SOURCE1 .
|
|||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}"
|
make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}"
|
||||||
|
Loading…
Reference in New Issue
Block a user