Bug 488679 - /dev/root automatically unlinked?
Summary: /dev/root automatically unlinked?
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: 10
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-05 06:48 UTC by Tetsuo Handa
Modified: 2009-05-06 16:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-06 16:48:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tetsuo Handa 2009-03-05 06:48:35 UTC
Description of problem:
It seems to me that /dev/root is deleted immediately after /dev/root was
created by "mkrootdev" command, resulting boot failure.

Version-Release number of selected component (if applicable):
Linux kernel 2.6.29-rcX on Fedora 10.

How reproducible:
Almost always.

Steps to Reproduce:
1. Compile kernel 2.6.29-rcX on Fedora 10.
2. Reboot.
  
Actual results:
Mounting /dev/root on /sysroot fails.

Expected results:
Mounting /dev/root on /sysroot succeeds.

Additional info:
I'm using Fedora 10 on VMware Workstation 6.5.1 .
Below is /init taken from /boot/initrd-2.6.29-rc7.img .
----------
#!/bin/nash

mount -t proc /proc /proc
setquiet
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
mkdir /dev/shm
mkdir /dev/mapper
echo Creating initial device nodes
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/fb c 29 0
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12
mknod /dev/ttyS0 c 4 64
mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66
mknod /dev/ttyS3 c 4 67
/lib/udev/console_init tty0
daemonize --ignore-missing /bin/plymouthd
plymouth --show-splash
echo Setting up hotplug.
hotplug
echo Creating block device nodes.
mkblkdevs
echo Creating character device nodes.
mkchardevs
echo "Loading scsi_transport_spi module"
modprobe -q scsi_transport_spi
echo "Loading mptbase module"
modprobe -q mptbase
echo "Loading mptscsih module"
modprobe -q mptscsih
echo "Loading mptspi module"
modprobe -q mptspi
modprobe scsi_wait_scan
rmmod scsi_wait_scan
mkblkdevs
echo Creating root device.
mkrootdev -t ext3 -o defaults,ro UUID=47c7cb9e-a15b-4554-9fce-60cd7c84c8b2
echo Mounting root filesystem.
mount /sysroot
cond -ne 0 plymouth --hide-splash
echo Setting up other filesystems.
setuproot
loadpolicy
plymouth --newroot=/sysroot
echo Switching to new root and running init.
switchroot
echo Booting has failed.
sleep -1
----------

Under specific circumstances, mounting /dev/root on /sysroot fails.
----------
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
----------

Cases where mount (almost always) suceeds:

(1) Commenting out the "echo Mounting root filesystem." line.
    Whether "Mounting root filesystem." is printed or not should not
    affect whether mounting /dev/root on /sysroot suceeds or not.

(2) Booting with 1 virtual CPU or booting with "nosmp" option.

Case where mount (sometimes) fails:

(3) Inserting "find /dev" line before "echo Mounting root filesystem." line
    and booting with 1 virtual CPU.
    Whether files under /dev/ directory are printed or not should not
    affect whether mounting /dev/root on /sysroot suceeds or not.
    Also, note that /dev/root is not printed by "find /dev" when fails.

This bug is similar to #481761 and #475773 , but I'm not using LVM nor RAID.
Really plain single ext3 partion.

  # fdisk -l
  
  Disk /dev/sda: 6442 MB, 6442450944 bytes
  255 heads, 63 sectors/track, 783 cylinders
  Units = cylinders of 16065 * 512 = 8225280 bytes
  Disk identifier: 0x0001fbd1
  
     Device Boot      Start         End      Blocks   Id  System
  /dev/sda1   *           1         783     6289416   83  Linux

This seems to be timing dependent problem.

Comment 1 Jeremy Katz 2009-05-06 16:48:34 UTC
There are a few timing things which are resolved with the current mkinitrd in Fedora 10 updates including what looks like this one


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