Bug 611090 - RFE: Set up a minimal /dev so we can boot without an initrd
Summary: RFE: Set up a minimal /dev so we can boot without an initrd
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-03 15:44 UTC by Avi Kivity
Modified: 2013-01-09 11:23 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-17 18:37:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Avi Kivity 2010-07-03 15:44:17 UTC
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):
13.42-1.fc13

Comment 1 Avi Kivity 2010-07-04 04:51:12 UTC
Why was this assigned to dracut?  Without an initrd, dracut would never run?

Comment 2 Harald Hoyer 2010-07-05 06:45:58 UTC
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 15:31:06 UTC
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 06:48:43 UTC
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 16:57:24 UTC
Of course, we're now talking systemd.

Comment 6 Jon Masters 2010-10-18 04:11:55 UTC
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 17:47:37 UTC
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 18:37:19 UTC
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.