[CentOS] Error trying to mount NFS volume from kickstart in CentOS 5

Wed Apr 25 20:30:10 UTC 2007
Alfred von Campe <alfred at von-campe.com>

I guess I'll keep following up my own posts until someone else chimes  
in :-).  Seriously, though, had anybody else seen this problem?  Has  
anyone successfully mounted an NFS volume from kickstart wiht CentOS  
5?  To recap the problem, I have the following commands in the  
kickstart %post section:

   %post
   mount centosmirror:/local/www/html/ks /mnt
   /mnt/ks/post/post.sh > /root/post_install.log 2>&1
   umount /mnt

It's pretty straight forward, and this has worked for me for years.   
But not anymore with CentOS 5.  The mount command fails with a  
"mount.nfs: Input/output error" message.  Here is an annotated copy  
of a console session after waiting for the kickstart installation to  
complete, and then getting to the console using "Ctrl-Alt-F2":

   [1] # /usr/bin/mount centosmirror:/local/www/html /tmp
       # umount /tmp
       # ls -l /usr/bin/mount
         lrwxrwxrwx 1 root 0 9 Apr 10 15:41 /usr/bin/mount -> ./busybox
       # cp /usr/bin/busybox /mnt/sysimage/tmp
   [2] # /mnt/sysimage/bin/mount centosmirror:/local/www/html /tmp
         mount: wrong fs type, bad option, bad superblock on  
centosmirror:/local/www/html,
              missing codepage or other error
              In some cases useful info is found in syslog - try
              dmesg | tail  or so

       # chroot /mnt/sysimage/
   [3] # /tmp/busybox mount centosmirror:/local/www/html /mnt
       # umount /mnt
   [4] # /bin/mount centosmirror:/local/www/html /mnt
       mount.nfs: Input/output error

       [After a reboot of the newly installed CentOS 5 system]

   [5] # /bin/mount centosmirror:/local/www/html /mnt

The mounts marked [1], [3], and [5] worked, but [2] and [4] didn't,  
even though they use the exact same binary as [5].  Note that I had  
to use /tmp as the mount point in steps [1] and [2], because I would  
have clobbered my environment if I hadn't (I learned this the hard  
way :-).

Conclusion: the native CentOS 5 mount command fails in a kickstart  
environment (with two different failure modes depending if you are  
chrooted or not).

I will probably work around this issue by using wget to copy all the  
files I need, but I still would like to figure out the root cause.   
Is this worth filing a bug for (either CentOS or upstream or both)?

Alfred