Hi Anas, In my autoinstall post-script (shell) for SuSE 9 Intel, both of the following resulted in "mount: only root can do that": mount 1.2.3.4:/autoinst/SuSE9.0 /mnt/resources mount -t nfs 1.2.3.4:/autoinst/SuSE9.0 /usr/local/mnt/ The local directories had been created. The file server (Solaris 8 SPARC) definitely was available; a similar share gets used during the install for the root disk and RPMs. I could do all of this fine at the post-script time, by switching to a VT and typing it. So, I threw in a call to id, which verified I was root:root. Near the end, I spelled out the full paths to everything, which had no effect. The last thing I tried just for kicks before going to rc scripts, was to wrap the call to mount in su, which resulted in "/bin/su: cannot set groups: Operation not permitted": su - root -c "mount -t nfs 1.2.3.4:/autoinst/SuSE9.0 /usr/local/mnt/" If it matters, I'm booting the client off of a standard CD1, with a "hostip=... netmask=... gateway=... install=nfs... autoyast=tftp..." and I've customized the root disk to include iptables, which gets initialized in a autoinstall pre-script (shell) to only allow access between between the two systems involved. Since this environment goes away with the reboot preceding post-scripts (if I remember correctly), I'm guessing it's irrelevant, but that's the whole picture. That's all I have. Hope it helps. If I made a mistake, I hope it wasn't too obvious. :) I'm going fine now with the rc scripts... Roy Anas Nashif wrote:
Hi, This has been reported once in the past, but I was never able to reproduce it. Some debug info would be really helpful so we can fix it if it is a bug somewhere..
Anas
Roy Butler wrote:
Autoinstall gurus,
I'm trying to mount an NFS share from a post-install script and it's failing with the error "mount: only root can do that". I threw a call to id in the script and it reports "uid=0(root) gid=0(root)", so I'm a little baffled. The mount can be performed manually during the install or after completion with no problem. Here's the relevant part of my XML configuration file (server IP faked):
--------------------
<![CDATA[#!/bin/sh
mkdir /mnt/resources
id
mount 1.2.3.4:/autoinst/SuSE9.0 /mnt/resources
for MYSCRIPT in /mnt/resources/scripts/generic/A*; do $MYSCRIPT done > /var/adm/autoinstall/logs/generic.log 2>&1
umount /mnt/resources]]>
--------------------
Does anybody have an idea what the issue could be? I need it to happen after the RPM installs. I suppose I could throw this in a one-time rc script, but I'd like to understand the underlying issue...
Thanks, Roy
-- Roy Butler - MIST Development Environment Jet Propulsion Laboratory email: roy.butler@jpl.nasa.gov phone: 818-354-8825