Bug#350629: please support root on NFS filesystem
Micha Lenk
micha at lenk.info
Mon Jan 30 20:19:35 UTC 2006
Package: grub
Version: 0.95+cvs20040624-17
Severity: wishlist
Hello,
I am running grub on a diskless system which mounts it's root filesystem
via nfs. When installing a new kernel image I would like to have my
/boot/grub/menu.lst updated by update-grub but update-grub silently
refuses to update my menu.lst.
I attached a patch which makes update-grub somewhat NFS aware. The patch
lets the function find_device() return /dev/nfs if the first field in
/etc/fstab looks like a NFS mounted share (if it contains a colon). In
the function convert() it bypasses the check for existence of /dev/nfs
and the check for an apropriate device in /boot/grub/devices.map if NFS
is used for the corresponding mount.
It might be usefull having netboot support in install-grub too, so a
call of 'install-grub --recheck' could lead to a line like this
(nd) /dev/nfs
in /boot/grub/devices.map. This is just an idea, so I didn't try to find
out how to achieve this feature.
Yours
Micha
-- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-adeos
Locale: LANG=de_DE at euro, LC_CTYPE=de_DE at euro (charmap=ISO-8859-15)
Versions of packages grub depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libncurses5 5.4-4 Shared libraries for terminal hand
-- no debconf information
-------------- next part --------------
--- update-grub 2006-01-30 21:32:33.000000000 +0100
+++ update-grub.nfs-aware 2006-01-30 21:33:26.000000000 +0100
@@ -74,6 +74,9 @@
LABEL=* | UUID=*)
device=`readlink -f "$(findfs $device)"`
;;
+ *:*)
+ device='/dev/nfs'
+ ;;
*)
device=`readlink -f "$device"`
;;
@@ -128,6 +131,12 @@
# Convert an OS device to the corresponding GRUB drive.
# This part is OS-specific.
convert () {
+ # Handle NFS device
+ if [ "$1" == "/dev/nfs" ]; then
+ echo "(nd)"
+ exit 0
+ fi
+
# First, check if the device file exists.
if test -e "$1"; then
:
More information about the Pkg-grub-devel
mailing list