Re: One warning message when switching root to /sysroot (which is the mount point for NFS)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have found the reason for "mount: only root can do that (effective
UID is -2)",
The nfs server is NFSv4-powered, NFSv4 has a concept of a root of the
overall exported file system. The export point exported with fsid=0 is
used as this root. If we didn't specify "fsid=0" in the /etc/exports
file, when it is mounted by the NFS client, all the owner of the
overall exported file system will become "nfsnobody:nfsnobody".
Because of this, the owner of "/bin/mount" is changed to
"nfsnobody:nfsnobody" from "root:root". when "mount" is called, the
warning message is shown.

On Sat, Jun 12, 2010 at 2:47 PM, Min Jun,Xi <xi.minjun@xxxxxxxxx> wrote:
> Hi all,
>
> I am using one NFS directory as the root file system; at first, I use
> yum with "--installroot=/tmp/rootimg" option to install all the
> necessary rpm packages into "/tmp/rootimg". Then, I added one simple
> dracut module into the rootimg (which only output some information
> indeed), and I run "chroot /tmp/rootimg dracut xxx" to generate the
> "initrd.gz" file.
>
> I updated my kernel command lines like this:
> ++++++++++++++++++++++++++++++++++
> #netboot rhel6-ppc64-compute
> timeout=5
> image=xcat/netboot/rhel6/ppc64/compute/kernel
>        label=xcat
>        initrd=xcat/netboot/rhel6/ppc64/compute/initrd.gz
>        append="root=nfs4:192.168.11.107:/tmp/rootimg:rw  ip=dhcp
> rdshell rdinfo rdinitdebug"
> +++++++++++++++++++++++++++++++++++
>
> The diskless node can be booted, but with some error/warning messages
> during the scripts under /etc/init.d/ are being executed. You can see
> them from the following message.
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++
> + exec switch_root /sysroot /sbin/init
> mount: only root can do that (effective UID is -2)
>                Welcome to Red Hat Enterprise Linux Server
>                Press 'I' to enter interactive startup.
> Starting udev: [  OK  ]
> Setting hostname ca4dsls02:  [  OK  ]
> Setting up Logical Volume Management:   No volume groups found
> [  OK  ]
> Checking filesystems
> WARNING: couldn't open /etc/fstab: No such file or directory
> Checking all file systems.
> [  OK  ]
> mount: only root can do that (effective UID is -2)
> Mounting local filesystems:  mount: only root can do that (effective UID is -2)
> [FAILED]
> chgrp: changing group of `/var/run/utmp': Invalid argument
>                                                          chgrp:
> changing group of `/var/log/wtmp': Invalid argument
>
>                                             chown: changing ownership
> of `/tmp/.ICE-unix': Invalid argument
>  Enabling /etc/fstab swaps:  swapon: /etc/fstab: open failed: No such
> file or directory
>
>                [FAILED]
> Entering non-interactive startup
> Retrigger failed udev events[  OK  ]
> Starting sshd: /var/empty/sshd must be owned by root and not group or
> world-writable.
> [FAILED]
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> So, here, I have several questions,
> 1) why does "mount: only root can do that (effective UID is -2)" show
> here? what can I do to make it not show here?
>
> 2) "/etc/fstab" is not there, should I create one before switching
> root to the NFS mountpoint?
>
> 3) "chgrp" and "chown" fails here, should I prepare the directories
> myself before switching root?
>
> Thank you!
>



-- 
best regards,
Xi Minjun
xCAT Development Team Member in CDL,IBM
Notes ID: Min Jun Xi/China/IBM/
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux