Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 217730 Details for
Bug 302634
sys-boot/grub2: grub-mkconfig fails when fs (btrfs) is not supported
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for grub2 from bzr
grub-mkconfig-fallback.patch (text/plain), 2.20 KB, created by
Sander Sweers
on 2010-01-28 14:02:09 UTC
(
hide
)
Description:
patch for grub2 from bzr
Filename:
MIME Type:
Creator:
Sander Sweers
Created:
2010-01-28 14:02:09 UTC
Size:
2.20 KB
patch
obsolete
>diff -ur grub2-orig/util/grub-mkconfig.in grub2-new/util/grub-mkconfig.in >--- grub2-orig/util/grub-mkconfig.in 2010-01-28 15:01:46.746567396 +0100 >+++ grub2-new/util/grub-mkconfig.in 2010-01-28 15:38:48.560587115 +0100 >@@ -119,8 +119,8 @@ > fi > > # Device containing our userland. Typically used for root= parameter. >-GRUB_DEVICE="`${grub_probe} --target=device /`" >-GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true >+GRUB_DEVICE="`${grub_probe} --target=device /`" || GRUB_DEVICE="`legacy_find_root_device`" >+GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || GRUB_DEVICE_UUID="`legacy_convert_to_uuid ${GRUB_DEVICE}`" > > # Device containing our /boot partition. Usually the same as GRUB_DEVICE. > GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`" >diff -ur grub2-orig/util/grub-mkconfig_lib.in grub2-new/util/grub-mkconfig_lib.in >--- grub2-orig/util/grub-mkconfig_lib.in 2010-01-28 15:01:46.740383831 +0100 >+++ grub2-new/util/grub-mkconfig_lib.in 2010-01-28 15:38:10.474013430 +0100 >@@ -188,3 +188,65 @@ > done > echo "$a" > } >+ >+legacy_find_root_device () >+{ >+ mount_point=$1 >+ >+ # Autodetect current root device >+ device= >+ if [ -f /etc/fstab ] ; then >+ device="`awk '$1!~/^#/{ >+ if ($2 ~ "^/+$") { $2 = "/"; } else { sub("/*$", "", $2); } >+ if ($2 == "'"$mount_point"'"){ >+ print $1; >+ } >+ }' /etc/fstab | tail -n 1`" >+ fi >+ >+ if [ -n "$device" ] ; then >+ case "$device" in >+ LABEL=* | UUID=*) >+ device="`findfs $device`" >+ device="`readlink -f "$device"`" >+ ;; >+ *) >+ device=`readlink -f "$device"` >+ ;; >+ esac >+ fi >+ >+ echo $device >+} >+ >+legacy_convert_to_uuid() >+{ >+ echo "Cannot determine uuid of root device. Trying legacy probe method" >&2 >+ local dev; dev="$1" >+ >+ convert=false >+ case "$dev" in >+ /dev/disk/*) >+ ;; >+ /dev/mapper/*) >+ ;; >+ /dev/evms/[hs]d[a-z][0-9]*) >+ convert=: >+ ;; >+ /dev/evms/*) >+ ;; >+ /dev/md[0-9]*) >+ ;; >+ /dev/*) >+ convert=: >+ ;; >+ esac >+ if $convert; then >+ if [ -b "$dev" ]; then >+ uuid="`blkid -o value -s UUID "$dev" || true`" >+ fi >+ fi >+ >+ echo "$uuid" >+} >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 302634
: 217730