Subject: Re: initial disk setup
To: Peter <plp@actcom.co.il>
From: Jonathan A. Kollasch <jakllsch@kollasch.net>
List: port-i386
Date: 07/17/2006 14:18:46
--GRPZ8SYKNexpdSJ7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Jul 16, 2006 at 11:38:17AM +0300, Peter wrote:
>=20
>=20
> On Sat, 15 Jul 2006, Jonathan A. Kollasch wrote:
>=20
> >On Sat, Jul 15, 2006 at 08:30:21PM +0300, Peter wrote:
> >>
> >>I have done a manual disk setup from scratch and it was very hard. Could
> >>a tool like sfdisk be adopted for netbsd ? Either that or a very
> >>accurate howto released for this ?
> >
> >sfdisk looks very much like fdisk(8).
> >
> >Partitioning seems simple to me:
> >
> >- Optionally, encompass the entire disk with an MBR partition.
> >- run disklabel -i
>=20
> Yes, but I omitted to say that it has to be done by a script, not=20
> interactively. For sfdisk, this is easy. For fdisk it is not. The step=20
> where one has to munge with cylinders and such in fdisk is the killer=20
> imho. sfdisk can be used to automate this I think. It does not have to=20
> be sfdisk, I was thinking of sfdisk as an idea for a scriptable=20
> partition editor.
>=20
> >Now, the suggested wedge editor would be nice, but we have all the
> >necessary tools (with the notable exception of the one(s) for GPT)
> >for the platforms we support.
>=20
> Peter

here's an example of how to automatically create one MBR partition:

#!/bin/sh
disk=3Dsd0
for i in `fdisk -S $disk`;do export $i; done
fdisk -fu0s 169/63/`expr $DLSIZE - 63` $disk

disklabel and disklabel -R (and an admittedly elaborate shell script)
can be used to automate the disklabeling if an sd0e is not what you
want.

	Jonathan Kollasch

--GRPZ8SYKNexpdSJ7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFEu+KVOjx1ye3hmokRAmbIAJ9MRyytrmCQcr01YAvKnuNQhnbxDwCfTA/M
F6AHfsYD7CB/YCOwRQelTiQ=
=3ruH
-----END PGP SIGNATURE-----

--GRPZ8SYKNexpdSJ7--