From owner-freebsd-questions@FreeBSD.ORG Mon Oct 12 18:53:10 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC1231065670 for ; Mon, 12 Oct 2009 18:53:10 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from mail-yw0-f197.google.com (mail-yw0-f197.google.com [209.85.211.197]) by mx1.freebsd.org (Postfix) with ESMTP id A99518FC14 for ; Mon, 12 Oct 2009 18:53:10 +0000 (UTC) Received: by ywh35 with SMTP id 35so30238992ywh.7 for ; Mon, 12 Oct 2009 11:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=sebz5S6Nib5R/jq31TYAaDWhMmxpFzrE37J05s/JqJw=; b=sEkTDWH96beJH6wkn7YXnruxyvZJXNHxv73Dy0JGRXiX8YnbxuFe/ELr1z3nCdt/Jf +dGDZHGHmKicYVEn1OXK7k1jjh7CZIMGh+Jcf11djWQilZ0mMZOKlynihIyhv0P+18jU tQDBv7YyECIUGd4LQgtlwWnq/0DgnMQR9vU/8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Mu0CCwPxeI8n2I10PJZkOWNauR5/216ta6UxdXV0kHeDWsiQ7B1XS3gun0MHhYGs9B Xg56tnnD+6RDuVRW6vh9Shw7yQKSAIjCXzb/TorUUkwDT4bv2RvZx7d+QIH7qMBkHGWQ 01cUVrEYj2noxArnjShkQYSinwGQ+oeToYMxY= MIME-Version: 1.0 Received: by 10.101.102.16 with SMTP id e16mr5903461anm.84.1255373589899; Mon, 12 Oct 2009 11:53:09 -0700 (PDT) In-Reply-To: <98ac902a0910120214m29d299b5o6aa58fdba45c9f95@mail.gmail.com> References: <98ac902a0910120214m29d299b5o6aa58fdba45c9f95@mail.gmail.com> Date: Mon, 12 Oct 2009 12:53:09 -0600 Message-ID: From: Tim Judd To: Alex Jurkiewicz Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: restore(8)ing new / -- boots on metal but not in a VM X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2009 18:53:11 -0000 On 10/12/09, Alex Jurkiewicz 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.