Subject: Re: Create a swap drive
To: None <port-i386@NetBSD.org>
From: Henry Nelson <netb@yuba.ne.jp>
List: port-i386
Date: 06/26/2006 15:27:50
On Sun, Jun 25, 2006 at 11:11:07PM -0400, der Mouse wrote:
> > disklabel: ioctl DIOCWDINFO: No disk label on disk;
> > use "disklabel -I" to install initial label
>
> This is one of the most annoying pieces of NetBSD/i386, to me.
>
> My reaction to this has historically been (for wd1)
>
> disklabel wd1 | disklabel -R -r wd1 /dev/stdin
I just got finished trying to back up a failing disk and hit upon this
message. I tried a dozen or so command lines, including "disklabel -I",
but nothing seemed to stick until the following:
disklabel -I -R -r -F wd1 protolabel
To get a serial console, I then invoked installboot:
installboot -o console=com0 -o speed=38400 /dev/rwd1a /usr/mdec/bootxx_ffsv1
I thought installboot made a disk bootable, but after switching disks, I
found out that the disk was not bootable. Somehow I got it bootable with
three interactive sessions of fdisk, using the install disk:
fdisk -i wd0
fdisk -0 -c /usr/mdec/mbr -u wd0
fdisk -a wd0
My questions are, what is the correct order of invoking these commands to
get a bootable, partitioned hard disk that has been zeroed? Should it be
the opposite of what I did, i.e., fdisk first, installboot second, and
finally disklabel? Is there a more efficient way to invoke fdisk, i.e.,
initialize, make a partition, and mark active all in one non-interactive
command line?
It would be assuring to get some kind of definitive answer on this. TIA
--
henry nelson
WWW_HOME=http://yuba.ne.jp/~home/