Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Aug 2014 20:37:04 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        Mike Tancsa <mike@sentex.net>
Cc:        "freebsd-emulation@freebsd.org" <emulation@freebsd.org>
Subject:   Re: Vritbox 4.3.12 and RELENG_6 guest ?
Message-ID:  <alpine.BSF.2.11.1408052033070.63230@wonkity.com>
In-Reply-To: <53E18A4C.2070100@sentex.net>
References:  <53E18A4C.2070100@sentex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 5 Aug 2014, Mike Tancsa wrote:

> I have been trying to convert a FreeBSD 6 box to a vdi image without luck. 
> To do so, I did the following steps, but when I attach the .vdi file to the 
> VM I created, I dont get by the initial boot loader.
> Has anyone done anything like this ?
>
> dd if=/dev/zero of=sz.dd bs=1024k count=20000
> mdconfig -t vnode -f sz.dd
>
>
> gpart create -s MBR md0
> gpart add -t freebsd md0
> gpart set -a active -i 1 md0
> gpart bootcode -b /boot/boot0 md0

Multiboot a VM is a bit unusual.  /boot/mbr is the ordinary bootcode. 
If the original machine multibooted, it would probably be better as 
multiple VMs.

> gpart create -s BSD -n 20 md0s1

Bootcode is needed in the bsdlabel also:
http://www.wonkity.com/~wblock/docs/html/disksetup.html#_the_old_standard_mbr

gpart bootcode -b /boot/boot md0s1



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