[1336] in netbsd-help mailing list archive
bad disktab
daemon@ATHENA.MIT.EDU (Robby Griffin)
Mon Oct 19 04:41:48 1998
From: Robby Griffin <rmg@MIT.EDU>
To: netbsd-help@foobarbaz.mit.edu
Cc: rmg@foobarbaz.mit.edu, xela@foobarbaz.mit.edu
Date: Mon, 19 Oct 1998 04:41:33 EDT
Hi, I've "installed MIT SIPB NetBSD-Athena 8.2 i386 on MITnet" this
evening using an install floppy created by xela (no, I don't know which
floppy image he used). I hit a couple of problems along the way, which I
was able to get around with a little hackage.
1) When replacing linux with NetBSD on my machine, I planned to run
fdisk from DOS in order to delete all the linux partitions, including
a couple of logical drives in an extended partition created by linux.
DOS / Win95 fdisk refused to believe that the logical drives existed,
but also refused to believe that the extended partition was empty, so
I couldn't completely clear the partition table. Having partially
cleared it though, and having taken LILO off the MBR, I was stuck.
I ended up using a linux rescue floppy and running mknod (thanks to
eichin for the device numbers) and then linux fdisk to do it. What I
probably should have done was to delete all the partitions in linux
before shutting the machine down to install NetBSD, but of course I
had no idea M$ fdisk programs were that dumb (can someone please make
a note of this in netbsd-install.tex? :).
It'd be Really Nice (tm) if the NetBSD installation process
included an optional partitioning step with an interactive fdisk
though, instead of just expecting you to have already correctly
un-partitioned the drive under another OS. But then, only other OSes
"really" use the partition table, right? :| Perhaps a pointer to a
more advanced DOS-based fdisk program, or a pointer to pointers (say,
http://www.fdisk.com/fdisk) would be helpful along with the info on
fips.
2) After I got all the space cleared on the drive, the installation
scripts created a bad /etc/disktab entry for it, causing these errors
and terminating the installation:
> disklabel: partition d: partition extends past end of unit
> newfs: /dev/rwd0a: open: Device not configured
Here's the offending /etc/disktab entry:
> temp|NetBSD installation generated:\
> :dt=ST506:ty=winchester:\
> :nc#1579:ns#63:nt#16:se#512:\
> :pa#114688:oa#62:ta=4.2BSD:ba#8192:fa#1024:\
> :pb#16384:ob#114750:tb=swap:\
> :pc#1591570:oc#62:\
> :pd#1592568:od#0:\
> :pe#65536:oe#131134:te=4.2BSD:be#8192:fe#1024:\
> :pf#1394688:of#196670:tf=4.2BSD:bf#8192:ff#1024:
Please observe that the d partition is purported to contain more
sectors than the drive geometry allows: pd > nc * ns * nt.
This happens because pd contains the actual number of sectors on the
drive (*NOTE 1*), but the drive geometry given by nc, ns, and nt is
faked. The size of the d partition should be rounded down accordingly
(to a multiple of ns * nt), or else the drive geometry should be more
realistic (I know, you don't really want the install script to mess
with factoring people's drive sizes). I got around this problem by
inserting my own "temp" entry in /etc/disktab with :pd#1591632: before
the disksetup script (*NOTE 2*) appended its version.
NOTE 1: The questions script used 'disklabel wd0' to determine the size
of the drive. This reads the in-core disklabel info rather than trying
to read from the disk itself. Since the drive had never been labelled,
the geometry represented was that detected by the wd driver at boot
time instead of the made-up geometry that the installation expected.
Perhaps this works when installing onto previously-labelled disks, I'm
not sure.
NOTE 2: During installation via nfs, sipb-nfs:/u3/netbsd-install was
mounted as /afs, so ident said:
> /afs/sipb/system/i386_nbsd1/srvd-8.2/install/disksetup:
> $Id: disksetup.sh,v 1.3 1998/09/21 16:33:37 ghudson Exp $
as opposed to the file accessible via the same path over afs, which is
nathanw's version from February, and which actually appears to attempt
the rounding-down thing (I didn't try it; maybe it needs backslashes
in front of the *'s to prevent shell globbing? Note the XXX comment).
Thanks,
Robby
P.S. Sorry to be long-winded but I'm trying to provide useful feedback
here :)