missing /dev/console in debootstrap --foreign, a bug or not ?

Loïc Minier loic.minier at ubuntu.com
Tue Jan 20 17:50:26 GMT 2009

On Tue, Jan 20, 2009, Scott James Remnant wrote:
> Is there an initramfs at all?  I had a vague belief that the default
> in-kernel initramfs included a /dev/console?

 I think the idea is to boot an Ubuntu kernel without the usual
 initramfs, complete the debootstrap in the native environment (e.g.
 qemu-system-arm), and then generate a real initramfs.

 I don't know what kernel includes as a fallback, but would love to know
 where I could find out (never heard of in-kernel initramfs).

> >  I think it wouldn't hurt if debootstrap's second stage would create
> >  /dev/console if it's required and missing, but I'm not sure whether we
> >  can actually start debootstrap's second stage.
> debootstrap does call MAKEDEV with a few essentials (including console)
> and unpacks this during the first stage.

 I grepped on MAKEDEV and found this in the second-stage:
    /debootstrap/functions:     (cd "$TARGET/dev"; /sbin/MAKEDEV fd std ptyp ptyq vcs tty1 tty2 tty3 tty4 tty5 tty6)

 and this in the source:
    functions:      (cd "$TARGET/dev"; /sbin/MAKEDEV fd std ptyp ptyq vcs tty1 tty2 tty3 tty4 tty5 tty6)
    Makefile:MAKEDEV := $(shell if [ -e /dev/MAKEDEV ]; then echo /dev/MAKEDEV; else echo /sbin/MAKEDEV; fi)
    Makefile:       (cd dev && $(MAKEDEV) std ptmx fd)

 So it MAKEDEVs: fd std ptmx ptyp ptyq vcs tty1 tty2 tty3 tty4 tty5 tty6

 Which one is supposed to include /dev/console?  From the man page and
 the MAKEDEV source, it seems /dev/console is only created for "console"
 or "generic"; "std" will create ttys, but not "console" I think.

Loïc Minier

More information about the ubuntu-devel mailing list