Subject: Re: Creating file-backed VBDs
To: Anzi <anzi@dnainternet.net>
From: haad <haaaad@gmail.com>
List: port-xen
Date: 11/06/2006 17:29:21
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Hello all
> 
> What is the correct way to create vbd for netbsd 3 domU in netbsd 3.0.1
> 
> 
> Tried:
> dd if=/dev/zero of=filesystem/nbsd-disk bs=1k count=1
> newfs  -s 6136830 -F filesystem/nbsd-disk
> 
create file with if=/dev/zero of=filesystem/nbsd-disk bs=1024k count=2048 and
then write this to your xen DOMU conf file

disk = ['file:filesystem/nbsd-disk,0,w]

then boot netbsd XENU install kernel ,and install system on your vbd backed
disk.This works for me like a charm.
> after installation started and I have setup partion sizes console says
> Status: Finished
>    Command: disklabel -w -r -f /tmp/disktab xbd0 'Xen Virtual ESD'
>     Hit enter to continue
> --------------------------------------------------------------------------------
> 
> disklabel: Invalid signature in mbr record 0
> 
> Status: Command failed
>    Command: /sbin/newfs -O 1 -b 16384 -f 2048  /dev/rxbd0a
>     Hit enter to continue
> --------------------------------------------------------------------------------
> 
> /dev/rxbd0a: 2496.0MB (5111808 sectors) block size 16384, fragment size
> 2048
>        using 14 cylinder groups of 178.30MB, 11411 blks, 22400 inodes.
> wtfs: write error for sector 5111807: Input/output error
> 
> after that I cant continue. So What I am doing wrong.
> 
> domU config for disks says:
> 
> disk = [ 'file:/xendoms/netbsdAntti/filesystem/nbsd-disk,0x1,w' ]
> (tried with different ways)
> 
> -Anzi-
> 
> 
> Mike Sun wrote:
> 
>> Thanks.  Looks like that did the trick.
>>
>> On 11/5/06, Hubert Feyrer <hubert@feyrer.de> wrote:
>>
>>> On Sun, 5 Nov 2006, Mike Sun wrote:
>>> > I have created a disk image with "dd if=/dev/zero of=nbsd-disk bs=1k
>>> > seek=2048k count=1" and am able to start and enter the NetBSD
>>> ...
>>> > Do I need to fdisk the file disk image?  Or manually disklabel and
>>> > create a filesystem on it?
>>>
>>> Does the same happen with a non-sparse file (i.e.: "dd if=/dev/zero
>>> of=nbsd-disk bs=1m count=2000")?
>>>
>>>
>>>   - Hubert
>>
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFT2Lh9Wt2FT7y228RArXFAJ9QaEtXhvAGsz172TPxwr5yUAfRsQCfQdIJ
jgf8wXuOO+tZ4cGH3lrlZgw=
=YFq2
-----END PGP SIGNATURE-----