FreeBSD Hangs on Boot

Bug #780657 reported by Falk Nisius
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Medium
Unassigned
qemu-kvm (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: qemu-kvm

On 11.04 Natty, with the Kernel 2.6.38.8-42-server, with kvm 0.14 on an intel i970 hangs FreeBSD on Boot, like described in

http://<email address hidden>/msg50722.html

and following mails. The Solution in the kvm.git seams to be working.
The issue is not on 10.10 with the 2.6.35-28 at the same machine.
is it possible to update the package with a fixed Version from git ?

WORKAROUND: Setting:
beastie_disable="YES"

in /boot/loader.conf solves the problem of booting FreeBSD. Pressing enter (quickly) to bypass the initial beastie menu, during installation solved the boot under installation.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for taking the time to submit this bug and helping to make Ubuntu better.

I'm marking this confirmed based on the mailing list conversations. However as the fix appears to be in the kernel, I'm marking the qemu-kvm bug invalid.

If you can verify that one single commit (say 09493165180e69a1dcdb44e049015e31c6de57e2) in the kvm.git tree fixed the bug, then we could try and cherrypick that into our kernel trees. However, we definately can't just take the kvm.git tree as our kernel tree.

It looks likely that the email thread you pointed to will result in the correct fixed being pushed to Linus' tree pretty quickly, at which point it will be pulled into our oneiric tree. At that point we can also cherrypick the fix into the natty tree.

Changed in qemu-kvm (Ubuntu):
status: New → Invalid
Changed in linux (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Bjoern Connolly (pobox) wrote :

Is this the same bug as #746114?

Revision history for this message
Falk Nisius (falknisius) wrote :

Yes it looks like the same.

There is a comment on FreeBSD ACPI Mailing List for AMD CPUs, where the CPU Turbo Mode freeze native BSD Systems. Perhaps that correspondends with this bug, because it would first recognized on AMD Systems.

If you prevent the boot menu of FreeBSD the BSD guests runs without any problems, or you are fast enough to hit the option or enter before the issue comes, than also BSD runs fine as KVM guest.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

In that case, a kernel with kvm.git commits e5d135f80b98b0 and 2607b0533353c might fix it

Revision history for this message
Falk Nisius (falknisius) wrote :

that was clear, but when comes the patch to the Ubuntu kernel ? With the next 2.6.38.x with x > 8 ?
Im able to compile a kernel with the patch and use it on a productive system, but I didn't wish to do that without any testing environment to find other for me unknown dependencies

Revision history for this message
Bjoern Connolly (pobox) wrote :

I can confirm that setting:
beastie_disable="YES" in /boot/loader.conf solves the problem of booting FreeBSD.

Pressing enter (quickly) to bypass the initial beastie menu, during installation solved the boot under installation.

Revision history for this message
Falk Nisius (falknisius) wrote :

I can also confirm this solution and use it, in the moment. For me is it solved

Revision history for this message
Tom Vijlbrief (tvijlbrief) wrote :

Replacing the SeaBios implementation of the delay in src/clock.c with
the method used in the Bochs BIOS is also a workaround for FreeBSD:

//=========================
// Wait for CX:DX microseconds
void
handle_1586(struct bregs *regs)
{
    // Use the rtc to wait for the specified time.
    u32 count = (regs->cx << 16) | regs->dx;
#if 0
    u8 statusflag = 0;
    int ret = set_usertimer(count, GET_SEG(SS), (u32)&statusflag);
    if (ret) {
        set_code_invalid(regs, RET_ECLOCKINUSE);
        return;
    }
    while (!statusflag)
        wait_irq();
#else
    // Use bochs code: (<email address hidden>)
    count/= 15;
    while (count-- > 0) {
      u8 orig = inb(PORT_PS2_CTRLB) & 0x10;
      while (orig == (inb(PORT_PS2_CTRLB) & 0x10))
        ;
    }
#endif
    set_success(regs);
}

//=======================

You can replace /usr/share/seabios/bios.bin with
the bios downloaded from:

http://www.v7f.eu/public/bios.bin

penalvch (penalvch)
tags: added: natty needs-upstream-testing regression-release
description: updated
tags: added: kernel-kvm
Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.