Bug 677254 - booting with nfsroot doesn't work over nfsv3 - mkinitrd doesn't include /etc/netconfig+/etc/protocols
Summary: booting with nfsroot doesn't work over nfsv3 - mkinitrd doesn't include /etc/...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 11.4
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Factory
Hardware: x86-64 Other
: P5 - None : Normal with 5 votes (vote)
Target Milestone: ---
Assignee: Michal Marek
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-06 15:18 UTC by Per Jessen
Modified: 2012-06-22 09:48 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Per Jessen 2011-03-06 15:18:07 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-GB; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10

I'm setting up a number of diskless boxes for booting over PXE with nfsroot. As far as I can tell, NFSv4 doesn't work for nfsroot (something about idmapd not being able to run early enough), so I force my clients to use nfsv3. 
With this however, I keep seeing mount.nfs report "Protocol not supported".  

After some debugging, I determined that /etc/protocols and /etc/netconfig were required for mount.nfs to work.  My initrd was built with features nfs and network, but when I added those two files, my nfsroot finally worked.

Reproducible: Always
Comment 1 Paulo Marques 2011-04-16 23:08:53 UTC
I can confirm that I had the exact same problem with x86-32 too.

To fix it, I did on the nfs server, as root:

# cd <exported directory for the client's home>
# chroot .
# cd /boot
# mkdir img
# cd img
# gzip -cd /boot/initrd | cpio -imd --quiet
# cp /etc/{protocols,netconfig} etc
# find . | cpio --quiet -H newc -o | gzip -9 -n > /boot/initrd_patched
# cd /boot
# rm initrd
# ln -s initrd_patched initrd
# exit

Maybe these instructions will work as a temporary workaround for people hitting the same problem.

NOTE: I just wrote these instructions here, so maybe I missed something. Don't miss the "chroot ." line or you'll be doing changes to the boot directory of your server!
Comment 2 Per Jessen 2012-06-22 09:48:44 UTC
(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-GB; rv:1.9.2.10)
> Gecko/20100914 Firefox/3.6.10
> 
> I'm setting up a number of diskless boxes for booting over PXE with nfsroot. As
> far as I can tell, NFSv4 doesn't work for nfsroot (something about idmapd not
> being able to run early enough), so I force my clients to use nfsv3. 
> With this however, I keep seeing mount.nfs report "Protocol not supported".  
> 
> After some debugging, I determined that /etc/protocols and /etc/netconfig were
> required for mount.nfs to work.  My initrd was built with features nfs and
> network, but when I added those two files, my nfsroot finally worked.

Update - on a Factory (12.2 beta2) install/update just yesterday, I had to rebuild the initrd anyway, and /etc/protocols and /etc/netconfig are now included correctly.  As far as I'm concerned, that means the problem is solved.