Re: restore(8)ing new / -- boots on metal but not in a VM

2009-10-14 Thread Alex Jurkiewicz
2009/10/14 Tim Judd taj...@gmail.com:
 My suggestion is to check the VM config and see if you can emulate an
 IDE ad(4) device instead of the possible SCSI da(4) device that
 vmware/virtualbox may setup.  I'm almost positive (not 100% because I
 don't have either one of those installed at the moment) that both
 those products default to a SCSI device.

Both are capable of emulating IDE, and both can offer something that
FreeBSD uses the da driver for (SATA for Vbox, SCSI for Vmware). I've
tested with both ad and da drives on both solutions.

Creating a dump image fresh in a VM gives me a file I can restore from
and boot successfully in VMs. I haven't tested physical machines yet
-- if I can boot physical machines off this new dump file my problems
are solved. If not...

At this point it seems simplest to produce a few different versions of
my dump image. Chances there's just something different in the first
few sectors of the disk, but having a single dump image and multiple
first sectors for the image seems more complex overall.

Thanks for the help,
AJ
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: restore(8)ing new / -- boots on metal but not in a VM

2009-10-13 Thread Tim Judd
On 10/12/09, Alex Jurkiewicz a...@bluebottle.net.au wrote:
 2009/10/13 Tim Judd taj...@gmail.com:
 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)]


 The dump was taken from an ad0 device on physical hardware, and I'm
 attempting to restore to the same, just on virtual hardware.

 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.

 So, if I make a dumpfile of / on an ad(4) device, I can't restore it
 to a da(4) device and expect it to boot? I guess at minimum I'll need
 two copies of this image if I want to roll it out on machines with
 both sorts of drive, right?

 Thanks,
 AJ



That's part of my point, I don't run with boot0, so it may be one of
it's features.


My suggestion is to check the VM config and see if you can emulate an
IDE ad(4) device instead of the possible SCSI da(4) device that
vmware/virtualbox may setup.  I'm almost positive (not 100% because I
don't have either one of those installed at the moment) that both
those products default to a SCSI device.


Let us know.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


restore(8)ing new / -- boots on metal but not in a VM

2009-10-12 Thread Alex Jurkiewicz
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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: restore(8)ing new / -- boots on metal but not in a VM

2009-10-12 Thread Tim Judd
On 10/12/09, Alex Jurkiewicz a...@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.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: restore(8)ing new / -- boots on metal but not in a VM

2009-10-12 Thread Alex Jurkiewicz
2009/10/13 Tim Judd taj...@gmail.com:
 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)]


The dump was taken from an ad0 device on physical hardware, and I'm
attempting to restore to the same, just on virtual hardware.

 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.

So, if I make a dumpfile of / on an ad(4) device, I can't restore it
to a da(4) device and expect it to boot? I guess at minimum I'll need
two copies of this image if I want to roll it out on machines with
both sorts of drive, right?

Thanks,
AJ
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org