Bug 359621 - READONLY=yes errors during bootup
Summary: READONLY=yes errors during bootup
Keywords:
Status: CLOSED DUPLICATE of bug 214891
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: K12LTSP
TreeView+ depends on / blocked
 
Reported: 2007-10-31 04:31 UTC by Warren Togami
Modified: 2014-03-17 03:11 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-08-04 19:19:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Warren Togami 2007-10-31 04:31:49 UTC
K12LTSP i386 chroot (almost F8 GA packages) booted with selinux=0
selinux-policy is not installed in the chroot.

Thin client nfs root boots this chroot, read-only filesystem.
/etc/sysconfig/readonly-root:
READONLY=yes

The below error messages are ugly, but they do not prevent the thin client from
working.


Setting clock  (utc): Tue Oct 30 21:13:23 PDT 2007                     [  OK  ]
Starting udev: udevd-event[459]: rename_netif: error changing netif name eth0 to
eth1: Device or resource busy
                                                                       [  OK  ]
Loading default keymap (us):                                           [  OK  ]
Setting hostname localhost.localdomain:                                [  OK  ]
Setting up Logical Volume Management:    No volume groups found
                                                                       [  OK  ]
find: /var/lock/lvm: Permission denied
find: /var/run/mdadm: Permission denied
cp: cannot access `/etc/lvm/archive': Permission denied
cp: cannot access `/etc/lvm/backup': Permission denied
mount: can't find / in /etc/fstab or /etc/mtab
Mounting local filesystems:  can't create lock file /etc/mtab~775: Read-only
file system (use -n flag to override)
                                                                       [FAILED]


bash-3.2# ls -ldZ /var/lock/lvm
drwx------  root root system_u:object_r:lvm_lock_t:s0  /var/lock/lvm
bash-3.2# ls -ldZ /var/run/mdadm
drwx------  root root system_u:object_r:mdadm_var_run_t:s0 /var/run/mdadm

The permissions don't explain why we're seeing permission denied errors...

Starting udev: udevd-event[459]: rename_netif: error changing netif name eth0 to
eth1: Device or resource busy
                                                                       [  OK  ]

udev is behaving badly here.  The interface obtained a DHCP lease prior to boot,
and copied its DHCP lease with:
cp /var/lib/dhclient/dhclient.leases /sysroot/dev/.dhclient-eth0.leases
udev shouldn't be trying to rename the interface.

Comment 1 Bill Nottingham 2007-10-31 04:41:23 UTC
Per the udev - what's in persistent-net.rules for that interface? Is there a
persistent net rules file? 

Comment 2 David Woodhouse 2007-10-31 15:03:11 UTC
For /etc/mtab.... one of the reasons we still _have_ /etc/mtab rather than
simply making it a symlink to /proc/mounts was because of the special-case in
umount(8) for tearing down a loopback device set up be 'mount -oloop'.

There are patches which fix that, by setting an 'auto-destruct' flag on the
loopback device so it goes away automatically when it's closed/unmounted.
 
kernel: http://marc.info/?l=linux-kernel&m=119361296818388&w=2
util-linux-ng: http://marc.info/?l=util-linux-ng&m=119362955331691&w=2

Are there other reasons for keeping /etc/mtab around?

Comment 3 Warren Togami 2007-10-31 15:27:43 UTC
Ah, persistent-net.rules was created by anaconda, containing the interfaces of
the host.  I have to delete it from the chroot after anaconda installs.

Comment 4 Bill Nottingham 2007-10-31 18:42:14 UTC
Re: mtab - ISTR there being other options preserved in mtab that aren't in
/proc/mounts. gid and mode come to mind.

Comment 5 David Woodhouse 2007-10-31 19:23:15 UTC
hm. uid and mode actually get given to the kernel. What doesn't, for some
arbitrary VFAT fs, is 'uhelper=hal' and 'shortname=lower'.

No idea what 'shortname=lower' is and why that doesn't show up in /proc/mounts
--but 'uhelper' is something else we'd certainly have to deal with.

Comment 6 Bill Nottingham 2007-10-31 19:45:25 UTC
Oh, the meta-option _netdev (used to distinguish network block device mounts) is
also not passed into the kernel.

Comment 7 Warren Togami 2008-03-05 19:40:36 UTC
Fedora 9 READONLY=yes

Setting up Logical Volume Management:    No volume groups found
                                                            [  OK  ]
find: /var/lock/lvm: Permission denied
find: /var/run/PolicyKit: Permission denied
find: /var/run/mdadm: Permission denied
cp: cannot access '/etc/lvm/archive': Permission denied
cp: cannot access '/etc/lvm/backup': Permission denied
can't create lock file /etc/mtab/~994: Read-only file system (use -n flag to
override)
Mounting local filesystems:  mount: devpts already mounted or /dev/pts busy
can't create lock file /etc/mtab~999: Read-only file system (use -n flag to
override)
                                                            [FAILED]


Any suggestions?

Comment 8 Bill Nottingham 2008-03-14 18:05:59 UTC
Did you remember 'setsebool -P allow_mount_anyfile=on'?

Comment 9 Warren Togami 2008-03-14 20:11:08 UTC
The chroot has no selinux-policy and is booted with selinux=0.  Does that matter?

Comment 10 Bill Nottingham 2008-03-14 20:17:35 UTC
What does the fstab look like?

Comment 11 Warren Togami 2008-03-14 22:15:17 UTC
[root@newcaprica ~]# cat /opt/ltsp/i386/etc/fstab
/dev/root  /         auto    defaults,noatime 0 0
devpts     /dev/pts  devpts  gid=5,mode=620   0 0
tmpfs      /dev/shm  tmpfs   defaults         0 0
proc       /proc     proc    defaults         0 0
sysfs      /sys      sysfs   defaults         0 0


Comment 12 Bill Nottingham 2008-03-17 15:25:32 UTC
/dev/root? Why?

Comment 13 Warren Togami 2008-03-19 18:38:28 UTC
/ is irrelevant anyway since it is mounted by this point.

Got rid of the permission denied errors that were the result of NFS root_squash.
 So there remains only:

can't create lock file /etc/mtab/~994: Read-only file system (use -n flag to
override)
Mounting local filesystems:  mount: devpts already mounted or /dev/pts busy
can't create lock file /etc/mtab~999: Read-only file system (use -n flag to
override)

Comment 14 Bug Zapper 2008-05-14 03:48:23 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 15 Warren Togami 2008-08-04 19:19:01 UTC
The remaining ugly error message is really a duplicate of 214891 so closing.

*** This bug has been marked as a duplicate of bug 214891 ***


Note You need to log in before you can comment on or make changes to this bug.