Subject: Booting BSD from 2nd IDE drive -- solved!
To: None <netbsd-users@NetBSD.ORG>
From: Scott Mitchell <rsm1@borg.cs.waikato.ac.nz>
List: netbsd-users
Date: 04/17/1995 13:31:04
Hi all,

This is a reply to my own query about getting NetBSD to boot from my second
IDE disk. First of all, many thanks to all those who replied and to the
maintainers/contributors of the FAQ list.

As I said a few days ago:
> I installed NetBSD-i386 for the first time this morning -- everything seemed 
> to be fine until the time came to reboot into my new OS. Some background: 
>  
> My system is a DECpc LPx+ DX4/100, 8Mb RAM, 2 IDE drives -- a 270Mb C: and a 
> 540 Mb D:. DOS/Windows lives on the 270Mb disk, and the plan was to devote 
> the entire 540Mb drive to NetBSD. 
>  
> The installation appeared to proceed perfectly, but I now have no idea how to 
> get the system to boot from the 2nd IDE disk. I still want to be able to use 
> DOS/Win, so I assume I need to install some kind of boot selector. I grabbed 
> 'os-bs' from ftp.netbsd.org, thinking this would do the trick, but it doesn't 
> notice the prescence of the 2nd drive....what have I done wrong?! 
>  
> If its relevant, the disks are a Western Digital WDAC1270F (917cyl, 12head, 
> 48sec) and a Seagate ST3660A (1057cyl, 16head, 63sec). All the hardware is 
> recognised correctly by the insatllation disk. 

Once I worked out what was going on, the solution was reasonbly simple:

- The people I bought the machine off had set the BIOS drive types up to be
  similar, but not exactly the same as, the physical disks in the
  machine. I don't know why -- I used the autodetect feature to set up a
  couple of user-defined types that agreed with what was printed on the
  disks, and with the geometries reported by NetBSD. Both disks still
  worked perfectly under DOS after this was done.

- The BIOS was also configured to use "LBA Conversion" (I assume this
  stands for Large Block Addressing) for handling large (>528Mb) disks. I
  turned this off.

- Someone (the guys at the shop, I guess) had installed a custom bootblock
  on the master drive that was doing its own geometry translation -- the
  geometry reported by PFDISK was screwed up if I booted from the hard
  disk, but correct if I used a floppy. I managed to get rid of this thing
  by booting DOS from a floppy and using BOOTEASY to install new bootblocks
  on both drives. For some reason this wouldn't work if the machine was
  booted from the hard disk.

Anyhow, once all this had been done I reinstalled NetBSD on the second
drive, rebooted,.... et voila! up pops a little menu (courtesy of BOOTEASY)
asking me to choose DOS or DISK 2. I pick DISK 2, and up comes BSD, happy
as you please.

The key thing here seems to be geometry translation. It sucks. Once I got
rid of it everything was _so_easy_. As long as you don't want to install
DOS on an enormous disk as well as running BSD this should all work for you
too.

Thanks again to all those who helped with this problem.
My troubles aren't over yet though -- look out for more installments :)

Cheers,

	Scott

+----------------------------------------------------------------------------+
| Scott Mitchell, Computer Science Dept, University of Waikato, Hamilton, NZ |
| email: rsm1@cs.waikato.ac.nz       WWW: http://www.cs.waikato.ac.nz/~rsm1/ |
| phone: +64 (7) 856-2889 ext6026    fax: +64 (7) 838-4155                   |
+----------------------------------------------------------------------------+