Bug 488679 - /dev/root automatically unlinked?
/dev/root automatically unlinked?
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-03-05 01:48 EST by Tetsuo Handa
Modified: 2009-05-06 12:48 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-06 12:48:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tetsuo Handa 2009-03-05 01:48:35 EST
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 .

mount -t proc /proc /proc
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.
echo Creating block device nodes.
echo Creating character device nodes.
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
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.
plymouth --newroot=/sysroot
echo Switching to new root and running init.
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 12:48:34 EDT
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.