Bug 611090 - RFE: Set up a minimal /dev so we can boot without an initrd
RFE: Set up a minimal /dev so we can boot without an initrd
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2010-07-03 11:44 EDT by Avi Kivity
Modified: 2013-01-09 06:23 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-17 13:37:19 EST
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 Avi Kivity 2010-07-03 11:44:17 EDT
Description of problem:

When debugging early boot kernel problems, it is convenient to use kvm and an external kernel, with a Fedora guest set up without lvm:

  qemu-kvm fedora.img -kernel /path/to/kernel -append 'root=/dev/sda1 console=ttyS0 ro' -serial stdio

this works, except that init fails to open a few /dev nodes and hangs (using init=/bin/bash works).

Turns out all that is needed for a successful boot is to set up a few device nodes:

crw-r--r-- 1 root root 5,  1 Jul  3 18:39 console
crw-r--r-- 1 root root 1, 11 Jul  3 18:23 kmsg
crw-r--r-- 1 root root 1,  1 Jul  3 18:22 mem
crw-r--r-- 1 root root 1,  3 Jul  3 18:21 null
crw-r--r-- 1 root root 1,  8 Jul  3 18:22 random
crw-r--r-- 1 root root 4, 64 Jul  3 18:21 ttyS0
crw-r--r-- 1 root root 1,  9 Jul  3 18:22 urandom
crw-r--r-- 1 root root 1,  5 Jul  3 18:21 zero

If anaconda could set up these nodes statically on /dev, everything would be ready for hacking.

Version-Release number of selected component (if applicable):
Comment 1 Avi Kivity 2010-07-04 00:51:12 EDT
Why was this assigned to dracut?  Without an initrd, dracut would never run?
Comment 2 Harald Hoyer 2010-07-05 02:45:58 EDT
First thing upstart could do, if no /dev/console is available could be to mount a devtmpfs on /dev.
Comment 3 Petr Lautrbach 2010-09-22 11:31:06 EDT
qemu-kvm fedora.img -kernel /path/to/kernel -append 'root=/dev/sda1
console=ttyS0 ro devtmpfs.mount=1' -serial stdio

works for me
Comment 4 Fedora Admin XMLRPC Client 2010-10-15 02:48:43 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Jon Masters 2010-10-15 12:57:24 EDT
Of course, we're now talking systemd.
Comment 6 Jon Masters 2010-10-18 00:11:55 EDT
Let me know if you did not want this re-assigned. I re-assigned it to "systemd" on Friday, per my previous comment.
Comment 7 Lennart Poettering 2010-10-19 13:47:37 EDT
Hmm, systemd relies on devtmpfs which has all these nodes anyway. I am not sure what exactly you are asking for in this bug report.

One of the first things systemd does is mount devtmpfs to /dev if that's not done yet.
Comment 8 Lennart Poettering 2010-11-17 13:37:19 EST
Anyway, since i don't understand the bug report, and I got no replies on this I will close this now.

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