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

Robert Nelson robertcnelson at gmail.com
Tue Jan 20 14:19:12 GMT 2009


On Tue, Jan 20, 2009 at 7:46 AM, Oliver Grawert <ogra at ubuntu.com> wrote:
> hi,
>
> we are currently trying to develop a tool to cross build an ARM rootfs.
> This tool is essentially a wrapper around debootstrap and
> qemu-system-arm. It first runs debootstrap --foreign on a qemu image it
> creates, then spawns a qemu instance in which it
> runs /debootstrap/debootstrap --second-stage (it does a good bunch of
> other stuff, but thats not relevant for this mail).
>
> What we found during work on this script is that the first stage of
> debootstrap --foreign does not create a /dev/console node, so qemu
> panics during boot if you ise it with a bare kernel image (it might be
> different if you use an initramfs that spawns udev though, which we
> currently not do for bootstrapping)
>
> currently the script simply calls mknod to add the device file to the
> image, but we were discussing the issue in the mobile team and came to
> the conclusion that running debootstrap --foreign might indeed often be
> used like that. to me it is not clear if debootstrap --foreign shouldnt
> create /dev/console in any case. normal debootstrapping of non foreign
> chroots wouldnt be affected so the default behavior wouldnt change if
> you for example do a debootstrap --arch=i386 on an amd64 host or
> --arch=lpia on a i386 one ... it would only affect cases where yu
> actually can not chroot and execute the binaries inside the chroot.
>
> some input from people with deeper insight in the debootstrap code would
> be very helpful here.
>
> ciao
>        oli
>
>

Hi Oliver,

I had to do something similar before "Mojo Handhelds" introduced a
debian-installer, you can find it in the archives here:
http://elinux.org/index.php?title=BeagleBoardHandheldsMojo&diff=9074&oldid=6933

Basically we did this in qemu:

sudo debootstrap --verbose --arch arm --foreign
--exclude=dash,handhelds-keyring frisky /media/disk-2/
http://repository.handhelds.org/frisky-armv6el-vfp/

sudo debootstrap --verbose --arch arm --foreign hasty /media/disk-2/
http://repository.handhelds.org/hasty-armv5el/

followed by, to make it boot in QEMU, such that we can complete the
install (second-stage):

sudo mknod /media/disk-2/dev/console c 5 1

Although from experience, things were much easier for end users just
to go with the debian-installer method over pure deboostrap, just way
to much confusion for new users.

Otherwise the debootstrap in Jaunty works great in chroot environments..


http://elinux.org/BeagleBoardHandheldsMojo
http://elinux.org/BeagleBoardDebian


Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/



More information about the ubuntu-devel mailing list