Missing boot loader (was: Re: creating a virtual clone)

David Newman dnewman at networktest.com
Fri May 29 14:53:55 UTC 2015


On 4/6/15 9:28 PM, Olivier Nicole wrote:

> My solution is http://www.cs.ait.ac.th/~on/technotes/archives/2015/01/30/how-to_clone_a_freebsd_virtual_machine_on_vmware/index.html
> certainly not the best/fastest, but it works.

Thanks for this. After following the clone instructions, restore appears
to work, but the system comes up with a "Missing boot loader" error.

This is perhaps because the next-to-last step from the live CD is:

cd /
mount -o rw /dev/da0p1 /mnt
gpart bootcode -b /mnt/boot/pmbr -p /mnt/boot/gptboot -i 1 da0

And that returns "/dev/da0p1: Operation not permitted" even though da0p1
is the target system's root/boot partition.

I've pasted below the complete procedure. What's missing?

Thanks in advance for troubleshooting clues.

dn


1. Create the virtual machine with vSphere client

2. Boot VM using FreeBSD live CD

3. Partition disk (one ufs in da0p1, one swap in da0p2, do newfs on da0p1)

4. enable and start network interface on target VM:

ifconfig em0 inet 1.1.1.2/24

5. mount root system on VM with 'mount /dev/da0p1 /mnt'

6. copy dump source filesystem using restore:

cd /mnt
ssh user at 1.1.1.1 "cat /home/user/srcmachine.dump" | restore -r -f -
cd /
umount /mnt

7.  enable and start network interface on target VM:

ifconfig em0 inet 1.1.1.2/24

8. configure the bootloader:

mount /dev/da0p1 /mnt
gpart bootcode -b /mnt/boot/pmbr -p /mnt/boot/gptboot -i 1 da0

((NOTE: Per the notes above, this step does not work.))

9. Configure /mnt/etc/fstab to use /dev/da0p1 as root and /dev/da0p2 as swap







> 
> Best regards,
> 
> Olivier
> 
> On Tue, Apr 7, 2015 at 12:43 AM, David Newman <dnewman at networktest.com> wrote:
>> To test some new software, I'd like to replicate a 9.3-RELEASE machine
>> and run it as a virtual machine (in this case inside VMware vSphere, but
>> I'm open to using other hypervisors if this isn't possible with VMware).
>>
>> The 9.3 host is itself virtual, running as a VPS instance in a colo.
>>
>> What's the best way to do this?
>>
>> Thanks!
>>
>> dn
>>
>> _______________________________________________
>> freebsd-questions at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 


More information about the freebsd-questions mailing list