Re: Mounting NFS from an initrd
hi ya adam
On 17 Feb 2004, Adam C Powell IV wrote:
> Greetings,
>
> I'm trying to make an initrd script which allows mounting root NFS with
> a stock Debian kernel-image package, in the spirit of Russel Coker's
> http://lists.debian.org/debian-devel/2001/debian-devel-200109/msg00307.html
>
> So I stuck a script in /etc/mkinitrd/scripts/nfs , and when I installed
> a kernel on woody, the client mounted root just fine.
>
> Now with sarge, it's failing with:
>
> mount: RPC: Program not registered
test# mount remote:/opt /mnt/test
where "test" is your initrd test box
where "remote" is your other box that you want to get data from
the rpc error message says that "remote" does NOT allow "test" to
mount its resources
- you have to export /opt to allow "test" to mount it
on "remote" ... check/change:
/etc/exports
/opt 192.168.1.0/255.255.255.0(rw,...otheroptions )
restart nfs
/etc/hosts.{allow,deny}
- check for mountd: 192.168.1.0/255.255.255.0
- check for portmap: 192.168.1.0/255.255.255.0
restart inetd
- even better if you explicitly list only "test"
- make sure your kernel supports nfs ( v3 or v4 )
- sometimes nfs is sensitive to masking options..
192.168.1.0/255.255.255.0 usually fixing things
test# rpcinfo -p remote
- should show you portmap, rpc.mount, ...
c ya
alvin
> So I searched around, and found that I need to be running portmap. So I
> put portmap in the initrd, along with rpc.statd for good measure. And
> even with /proc mounted, with portmap and rpc.statd running, mount still
> gives me this error.
>
> What gives? Any ideas on how to get it "registered"?
>
Reply to: