diff options
Diffstat (limited to 'initrd/initrd-stuff/etc')
| -rw-r--r-- | initrd/initrd-stuff/etc/functions | 16 | ||||
| -rw-r--r-- | initrd/initrd-stuff/etc/messages | 5 |
2 files changed, 14 insertions, 7 deletions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions index a83f2fe0..8c8e1c8f 100644 --- a/initrd/initrd-stuff/etc/functions +++ b/initrd/initrd-stuff/etc/functions @@ -2,9 +2,8 @@ # linux diskless clients (included by init, hwautocfg, # servconfig, ... within initial ramdisk) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-03-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-04-2006 # Felix Endres, 21-03-2006 -# Blub # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -139,10 +138,17 @@ case $ipcfg in esac } ####################################################################### -# nfs mounter +# nfs mounter for root filesystem and other sources nfsmnt () { local nfsroot=$1 +local dest=$2 +if [ -z "$dest" ] ; then + dest="/mnt" + e_nfs="$error_rnfs" +else + e_nfs="$error_gnfs" +fi for mnt in nfsmount mount none; do test -x /bin/$mnt && break; done @@ -150,11 +156,11 @@ done loadmod /lib/modules/@@@KERNVER@@@/kernel/fs/nfs/nfs.ko "$error_modnfs" case $mnt in nfsmount) - nfsmount -o ro $nfsroot /mnt || error "$error_nfs" + nfsmount -o ro $nfsroot $dest || error "$e_nfs" ;; mount) portmap || error "$error_portm" - mount -n -t nfs -o ro $nfsroot /mnt || error "$errmsg" + mount -n -t nfs -o ro,nolock $nfsroot $dest || error "$e_nfs" killall -9 portmap ;; none) diff --git a/initrd/initrd-stuff/etc/messages b/initrd/initrd-stuff/etc/messages index 416caa81..c7adeb3e 100644 --- a/initrd/initrd-stuff/etc/messages +++ b/initrd/initrd-stuff/etc/messages @@ -3,7 +3,7 @@ # version 4 # this file could be used for localization of error messages # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 02-04-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 03-04-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -89,12 +89,13 @@ error_modnfs="needed for mounting rootfs" error_iptool=" No tool for local IP configuration found. You should at \ least add\n one of the following programs to your ramdisk: ip \ ipconfig\n ifconfig." -error_nfs=" Mount of root filesystem via NFS was requested via kernel command \ +error_rnfs=" Mount of root filesystem via NFS was requested via kernel command \ line\nbut failed. There might be the following reasons for that:\n\ * No nfs.ko module could be loaded and no NFS support was present in the\n\ running kernel - see error messages above\n\ * You tried to mount from wrong server or path ($nfsroot)\n\ * No NFS server is running or you do not have permissions" +error_gnfs=" Mount of some NFS source failed ..." error_portm=" Portmapper should be present, if normal mount \ command is used. Please\n check your initial ramdisk setup (mkdxsinitrd)." error_mntt=" No suitable mount tool found." |
