Subject: Re: Help, newfs/disklabel for disk images
To: Michael Dexter <dexter@ambidexter.com>
From: Jeff Rizzo <riz@NetBSD.org>
List: netbsd-users
Date: 07/25/2006 17:32:16
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig15DEF1F5E444ECE24454DEFA
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Michael Dexter wrote:
>
> Hello,
>
> Our team is porting a project from OpenBSD to NetBSD and TFM, (having
> Read it) is not getting me through a hang up with the formatting of
> disk images under NetBSD 3.0 Release, x86 P4.
>
> I follow these steps under OpenBSD to create and mount a 500MB disk
> image:
>
> sudo dd if=3D/dev/zero of=3D/home/sysjail00.img bs=3D1024 count=3D50000=
0
> sudo vnconfig -c /dev/vnd0c /home/sysjail00.img
> sudo newfs /dev/vnd0c
> sudo fsck -y /dev/vnd0c
> sudo mkdir /mnt/sysjail00/
> sudo mount_ffs /dev/vnd0c /mnt/sysjail00/
>
> Under NetBSD I get as far as:
>
> sudo dd if=3D/dev/zero of=3D/home/sysjail00.img bs=3D1024 count=3D50000=
0
> sudo vnconfig vnd0 /home/sysjail00.img
> ... and
> sudo newfs vnd0 fails. I have tried vnd0c and I see evidence on the
> net (in reference to memory, CD and CF images) that disklabel and
> perhaps fdisk may be required. I tried several disklabel variations
> but perhaps a manual disklabel edit is required? If so, what entries
> are required?
>
> Appreciated,
>
> Michael.

On the i386 (and amd64) ports of NetBSD, the "entire disk" raw partition
is "d", so if you use vnd0d above, it should all work.

+j



--------------enig15DEF1F5E444ECE24454DEFA
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRMa4HbOuUtxCgar5AQPm6gP/U2xHQwuBMw03HgFslB7IHnniqoAKyfvE
x1b0jbQAWbxr+EoNNTD6g61K5zGFBLOqF/7B6e7N8Jns4kEnEW0oc11b3u644KrJ
nL78w28yItwwnX8yruMnP6ukj2l407DSo4ZBtK7jXs7/4VgHYA6o0ucWNz+ruzFu
KIuCJxPYO0k=
=95m9
-----END PGP SIGNATURE-----

--------------enig15DEF1F5E444ECE24454DEFA--