Re: Booting applications on hardware from USB and other means

  • From: Antti Kantee <pooka@xxxxxx>
  • To: rumpkernel-users@xxxxxxxxxxxxx
  • Date: Thu, 26 May 2016 17:27:03 +0000

On 26/05/16 15:27, Robert Gifford wrote:

We had initial difficulties getting the nginx application to boot (more
later) with bmk on hardware. To simplify, we switched to trying to just get
a "hello world" test application to boot, but had issues with this as well.
Has anyone used BMK on the bare metal anytime recently?  It works fine when
virtualized.  We're scoured the list and tried many of the suggestions.
Some details:

I doubt it's tested very often. At least I don't remember when I last dug an old laptop out of the closet for testing bare metal.

Also, the bare metal low level code is more or less in the same condition as two years ago when I spent a week writing it. So, it's probably not the most comprehensive and "hardware independent" code out there.

That's not to say that it shouldn't be fixed to work, but it's challenging for me to do so via debug-over-email.

Trying to boot off of usb:
     1. With an older version (commit
544aaab7280a3fcdca869f3987b15f9c34eec15c) of rumprun it crashes with the
message of: "failed to mount rootfs from image"

      2. With newest version, it doesn't get that far. Fails at detecting
PCI wm(NIC - PCH2 LAN 82579LM Controller rev 0x04): "PANIC:
bmk_isr_rumpkernel: cpu_intr_init"
         2.a While we could remove that PCI device, we end up back at the
failure to mount

Look at platform/hw/arch/x86/intr.c::cpu_intr_init. It might be as simple as adding a FILLGATE() clause to the switch for the interrupt in question and adding the same INTRSTUB() into arch/i386/locore.S.

These errors were the same for both computers.

Thinking it might be a problem with using USB we also tried:
    a. dd to a partition on HDD and boot directly from there using Ubuntu
14.04 i386 Grub2. Same behavior as above for older and newer rumprun.
    b. Booting from iso on HDD Ubuntu partition, again from Ubuntu's Grub2.
Same problem.
    c. Chainload into the partition on HDD which contains the rumprun iso:
Hangs after displaying "GRUB" for both older and newer rumprun

There are two things:
1) the mass storage that the config is available from must be recognized and made available by the rump kernel (e.g. umass)
2) the config code must know where to look for the config, see lib/librumprun_base/config.c (and its counterpart in "rumprun iso")

If "1" is not true, you can always workaround by using the --cookfs tool to produce a file system image which gets "loaded" from memory. However, you'd still need to teach the config code to look for the cookfs image.

  - antti

Other related posts: