* util/grub.d/10_linux.in: Add rootflags=subvol=<name> if / is on a
btrfs subvolume. * util/grub.d/20_linux_xen.in: Likewise.
This commit is contained in:
parent
78fa584f67
commit
e74c31125d
3 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-04-13 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* util/grub.d/10_linux.in: Add rootflags=subvol=<name> if / is on a
|
||||||
|
btrfs subvolume.
|
||||||
|
* util/grub.d/20_linux_xen.in: Likewise.
|
||||||
|
|
||||||
2011-04-13 Colin Watson <cjwatson@ubuntu.com>
|
2011-04-13 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
Rewrite /proc/self/mountinfo handling to cope with bind-mounts and
|
Rewrite /proc/self/mountinfo handling to cope with bind-mounts and
|
||||||
|
|
|
@ -51,6 +51,14 @@ else
|
||||||
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ]; then
|
||||||
|
rootsubvol="`make_system_path_relative_to_its_root /`"
|
||||||
|
rootsubvol="${rootsubvol#/}"
|
||||||
|
if [ "x${rootsubvol}" != x ]; then
|
||||||
|
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
linux_entry ()
|
linux_entry ()
|
||||||
{
|
{
|
||||||
os="$1"
|
os="$1"
|
||||||
|
|
|
@ -51,6 +51,14 @@ else
|
||||||
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "x`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2>/dev/null || true`" = xbtrfs ]; then
|
||||||
|
rootsubvol="`make_system_path_relative_to_its_root /`"
|
||||||
|
rootsubvol="${rootsubvol#/}"
|
||||||
|
if [ "x${rootsubvol}" != x ]; then
|
||||||
|
GRUB_CMDLINE_LINUX="rootflags=subvol=${rootsubvol} ${GRUB_CMDLINE_LINUX}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
linux_entry ()
|
linux_entry ()
|
||||||
{
|
{
|
||||||
os="$1"
|
os="$1"
|
||||||
|
|
Loading…
Reference in a new issue