*BSD News Article 16234


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!bruce.cs.monash.edu.au!monu6!escargot!minyos.xx.rmit.OZ.AU!s902113
From: s902113@minyos.xx.rmit.OZ.AU (Luke Mewburn)
Newsgroups: comp.os.386bsd.questions
Subject: Re: NetBSD and DOS coexistence ?
Date: 18 May 1993 15:31:00 GMT
Organization: Not RMIT (this is an implicit disclaimer :)
Lines: 115
Message-ID: <1tavfkINN226@escargot.xx.rmit.OZ.AU>
References: <1993May15.164807.15131@alf.uib.no>
Reply-To: zak@rmit.edu.au
NNTP-Posting-Host: minyos.xx.rmit.oz.au

tl@cmr.no (Tom Lislegaard) writes:

> I'm having problems installing NetBSD and DOS on the same disk, can
> anyone explain to me step by step how to do it so I can boot both systems
> alternately.
> Pointers to good boot managers are also welcome, I picked up ``pboot'',
> but it sure doesn't work the way I'm setting up things.

Try OS-BS. I'm running 1.34 (can't get a reliable ftp connection from
australia to the .nl site to grab 1.35 :( - if someone could get it put on
the tools dir of agate or sun-lamp I'd be grateful :)


> If someone is successfully running more than two systems off the same disk I'd
> be interrested in that too, it happens that I run NT or even OS/2.

> -tom
> -- 
> Tom Lislegaard,  System Manager,  Chr. Michelsen Research a/s, Bergen, Norway


a couple of days ago I posted the soln to this (in a brief 'off the top
of my head and it's probably wrong' type post) and mentioned that I was
writing a doc on it. Here is that doc:

-- cut here: file: ~/unix/netbsd/coexist.doc --
		Getting NetBSD 0.8 to coexist with DOS.

	    Written 930510 by Luke Mewburn <zak@rmit.edu.au>


NetBSD can be made to happily co-exist with DOS if its install
program knows how to modify the partition table. This assumes
that you have access to a program which enables you to edit the
partition table of your hard drive (such as Norton Utilities, or
pfdisk).

When you partition your hard drive, you will probably have a large
partition in which you wish to place NetBSD. This has to have the
partition ID of 165d (or 0xA5). To change this, you can use the
'Partition Edit' section of Norton's, or you can use pfdisk.
This document will go into more detail on how to use pfdisk, as it's
freely available.

I'll use my personal drive specifications in the following example.
It is a 1001 cylinder, 15 trk/cyl, 17 sec/trk, 125MB drive. I
low-level formatted it, and used fdisk on a MS-DOS 5.0 boot disk to
create a primary partition '1' of 32MB, and an extended partition '2'
of 93MB.  I formatted the drive with format c: /s to give myself a
bootstrap for DOS (much faster than floppies :), but this isn't that
necessary. Now, the next stage...

Running pfdisk 0 (to access my first (and only :) HD) came up with
something like:

	For help, enter: '?'
	pfdisk>

At the prompt, enter 'l' to list partitions, giving (in my case),
something like:

	# Partition table on device: 0
	geometry 1000 15 17 (cyls heads sectors)
	#  ID  First(cyl)  Last(cyl)  Name  # start, length (sectors)
	1   4      0        256       DOS16 # 17, 65518
	2   0    257        999       unkno # 65535, 189465
	3   0      0          0       empty # 0, 0
	4   0      0          0       empty # 0, 0
	active: 0 (none)

(Note that there is 1 cylinder less - the last one is, I think,
for the ide controller to use when automapping dud sectors out.)

Now, we want to change the type of #2 (the prospective NetBSD
partition) to 165. You can obtain a list of known ID's by selecting
'I'. Depending on the version of pfdisk you have, 165 may or may not
be known. This doesn't matter too much either way. To get the NetBSD
install program to use the 2nd partition, I would enter:

	pfdisk> 2 165 257 999

Another 'l' to list partitions would show that the entry for
partition 2 will either look like one of the following (depending
on whether pfdisk knows about the 386bsd partition type or not):

	2 165    257        999       unkno # 65535, 189465
or
	2 165    257        999       386BS # 65535, 189465


You could set the active partition with 'a 2' if you want NetBSD
to always boot, but I personally recommend that you obtain a copy
of OS-BS 1.35 or BOOTEASY to save you the hassle of running fdisk
or pfdisk everytime you wish to swap system types.

To complete everything off, do 'w' to write out the info (once
you're sure it's correct! :), and 'q' to quit the program.


Well, I hope that is useful to someone. Comments can be directed
to the author (Email: <zak@rmit.edu.au>).

Luke.
-- ereh tuc --

That's the doc. pfdisk can be found on one of the linux sites in
the dos_tools directory. Maybe the netbsd archive sites can put a copy
(possibly suitably hacked to know about the 386bsd partition type) in the 
tools directory (with rawrite.exe, etc).

Luke.

--
Luke Mewburn [Zak], <zak@rmit.edu.au>
"Lawyers - the only group for which ignorance of the law is not a crime" - anon