Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Oct 2009 12:53:09 -0600
From:      Tim Judd <tajudd@gmail.com>
To:        Alex Jurkiewicz <alex@bluebottle.net.au>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: restore(8)ing new / -- boots on metal but not in a VM
Message-ID:  <ade45ae90910121153u4dddaf25ofbee2a1ef984a4f3@mail.gmail.com>
In-Reply-To: <98ac902a0910120214m29d299b5o6aa58fdba45c9f95@mail.gmail.com>
References:  <98ac902a0910120214m29d299b5o6aa58fdba45c9f95@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/12/09, Alex Jurkiewicz <alex@bluebottle.net.au> wrote:
> Hi all,
> A little background: I'm writing a script that will allow me to
> restore(8) a standard FreeBSD partition to multiple machines. So far,
> I'm at the 'see if it works in principle' stage, and I'm finding
> something strange.
>
> My procedure:
> * Start with an empty hard drive (ad0).
> * Boot off the FreeBSD CD, enter the live CD filesystem shell (Fixit
> -> Live CD Filesystem)
> * Create a single slice with fdisk that spans the entire disk (fdisk
> -i /dev/ad0)
> * Create a single partition with bsdlabel that spans the entire slice
> (bsdlabel -w /dev/ad0s1)
> * Install the FreeBSD Boot Loader (boot0cfg -B /dev/ad0)
> * Format and restore the dumpfile (newfs /dev/ad0s1a && mount
> /dev/ad0s1a /mnt && cd /mnt && ssh storagebox "dd
> if=home/aj/image.dump" | restore -rvf -
> * Unmount /mnt and restart.
>
> The steps work fine... on physical hardware. The restored image boots
> up fine. As a VM guest, running in either VMWare or VirtualBox, it
> don't work. Everything appears to go fine, but when I get to the boot
> loader, pressing F1 just makes the PC speaker beep at me.
>
> Any pointers would be appreciated. I'm using FreeBSD 6.4.
>
> Cheers,
> Alex Jurkiewicz


Is the virtual machine using SCSI emulation to boot, or is it using IDE?

SCSI drives are da(4), IDE drives are ata(4) [aka ad(4)]

If the boot blocks (maybe boot0 specific) point to an ad/ata device,
and the virtual machine is SCSI, it won't find the boot sectors.


Personally, I use the "standard" boot blocks which don't allow
multibooting but I don't multiboot BSD anyway.


The standard boot blocks work by finding the first bsd slice, and
booting it.  I like the keyword find because it doesn't direct the
boot blocks to something unfindable.  :D


Let me know the subsystem layout, and we'll work from there.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ade45ae90910121153u4dddaf25ofbee2a1ef984a4f3>