Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

To make 386bsd coexist with DOS partitions??

5 views
Skip to first unread message

Holger Veit

unread,
Mar 31, 1992, 11:34:47 AM3/31/92
to
This is an idea and a question how to make 386BSD work with the
DOS partition system. Comments on whether this works or not, and additional
hints are welcome.

(Notice: 'partition' is used here as a synonym for the DOS representation
of the disk. There are four partitions, one of which shall contain the
eight BSD-partitions).

386BSD writes the disklabel to Sektor H=0,T=0,S=1, which is known as
the partition sektor of DOS/XENIX/etc. formatted disks. This label also
contains some code to read the following 15 (16?) sectors which contain
the loader that knows the UFS system does the finally loading of /vmunix.
What if one patches 'disklabel' to allocate the label elsewhere, e.g. in the
unused area after the partition sector, put another boot sector at a
partition boundary which loads the disk label from the known location and
replaces the boot loader code to get the next 15 consecutive sectors.
The disktab entry needs to be modified (oa-oh) to make 386bsd think that
only the area making up the dedicated partition is available (requires some
calculation depending on the location of the partition.
Apparently, the wd driver has to be patched to look for the label sector
elsewhere. Newfs (and bad144?) also requires knowledge of the label position.

Will this work?
Or are there other essential hacks that have to be done?
Is anyone already working on this subject?

Holger

--
| | / Holger Veit | INTERNET: ve...@du9ds3.uni-duisburg.de
|__| / University of Duisburg | BITNET: veit%du9ds3.uni-duisburg.de@UNIDO
| | / Dept. of Electr. Eng. | X.400: /S=veit /O=du9ds3 /P=uni-duisburg
| |/ Inst. f. Dataprocessing | /A=dbp /C=de

Per Lindqvist

unread,
Apr 2, 1992, 12:10:06 AM4/2/92
to
ve...@du9ds3.uni-duisburg.de (Holger Veit) writes:
: This is an idea and a question how to make 386BSD work with the

: DOS partition system. Comments on whether this works or not, and additional
: hints are welcome.
I think that you can do something simpler. At least on xenix, the
'disklabel' and 'boot block' sectors are unused. One way is to make
the BSD partition table match the DOS partition table. But that would
restrict BSD to 4 partitions. Another way is simply to coordinate the
DOS partition table and the BSD partition table in such a way that the
BSD partition table leaves the partitions allocated by DOS
unallocated. That is, the DOS partition table has one (or two or more)
BSD partitions. The BSD partition table only covers those partitions,
and not the rest of the hard-disk.

Both partition tables will happily co-exists on the hard-disk, without
interfering. I have not tried this, but I think it will work.

Xenix partitioning works differently, in that it subdivides each DOS
partition allocated to xenix further.
As for other 386 unixes, I don't know how they do.

The procedure is simply to make so that the program which sets up
the BSD partition table, also makes a DOS partition table, with all
parts allocated for BSD marked as allocated.
--
Per Lindqvist

Internet: p...@compuram.bbt.se Fidonet: Per Lindqvist @ 2:201/332

Thomas Wolfram

unread,
Apr 3, 1992, 11:07:59 AM4/3/92
to
In article <1992Apr2.0...@compuram.bbt.se>, p...@compuram.bbt.se (Per Lindqvist) writes:
[much stuff deleted]

> Xenix partitioning works differently, in that it subdivides each DOS
> partition allocated to xenix further.
> As for other 386 unixes, I don't know how they do.

I want to describe it for ISC 2.0 since I think it's a good solution even
if you want to use more than DOS and 386BSD on the disk (OS/2 or
whatever) and don't want to lose any data if you install a new OS.
For ISC 2.0: It only use that space on the harddisk defined
through an partition entry with id byte 0x63 in the master boot sector
partition table. (Like DOS, OS/2 and most PC Unixes). No sectors out of this
partition are used even not the unused remainder in track 0.
But this doesn't mean that you have no access to the other OS partitions.
DOS-32MB partitions are mountable since the disk driver is able to do it.
(Perhaps someone will write sometime code to mount a HPFS partition?)
For itself ISC has its own partition table with entrys for up to
16 partitions but inside the "global" fdisk-partition.

The boot strap starts with the usual master boot program in the master
boot sector which looks for the active id in the partition
table get the location of the first partition sector and try
to execute it as the second stage boot code of the respective OS.

/* I for myself wroted a new master boot programm wait 5 seconds or
so for pressing <Esc> than booting the user default OS. Otherwise it
displays a "boot menu".
(I know there are many similar programs but if someone is interested
you can get the source from me (but it's a DOS assembler source also
works for 8088/80286) */

I think it would be a good idea to do the same thing on 386BSD -
grab a unused id Byte and use it forever to identify itself (if boot
from floppy after crash or "upgrade" install) and prevent other
OS install routines to use the 386BSD partition. Than up to 4 OS can
co-exists on the disk without interfering. At the install time 386BSD
should look in the partition table to determine whether a partition
entry is free and enough space on the disk is available. A program
similar DOS- or ISC-fdisk would be a good feature.

I know there is quite a huge wish list to 386BSD but I think its
good to think it over at this time.

-- Thomas

+------------------------------------+------------------------------------+
| Thomas Wolfram | |
| Platz der Vereinten Nationen 6 | |
| 1017 Berlin | - empty - |
| Germany | |
| INTERNET: wolf...@cs.tu-berlin.de | |
+------------------------------------+------------------------------------+


Sean Goggin

unread,
Apr 4, 1992, 7:08:00 PM4/4/92
to
Xenix and ISC allocate there partitions inside a regular PC partition.
This permits accessing partitions of other operating systems as well.

>The boot strap starts with the usual master boot program in the master
>boot sector which looks for the active id in the partition
>table get the location of the first partition sector and try
>to execute it as the second stage boot code of the respective OS.

Linux and Minix often use the public domain bootstrap loader
called a shoelace which sounld be convert for use with 386BSD.

We must find a free Partition id for 386BSD

Know partition ids are

Partition Type Number
no partition 0x00
Dos 12 0x01
Xenix 0x02
Old Xenix 0x03
Dos 16 0x04
Dos Extended 0x05
Dos huge type 0x06
AIX 0x08
Opus 0x0A
Novell ? 0x51
CPM ? 0x52
386/IX 0x63
Novell 0x64
PCIX 0x75
Minix 0x81
Minix Old 0x80
CPM 0xDB
Bad Blocks 0xFF

please mail me if you can add to this partition list

se...@u36.kwnet.on.ca
se...@u36.uucp

unknown

Xinu
OS/2 HPFS
Mt Xinu MACH
GNU Hurd
Coherent
Windows NT
Solaris Fast
Solaris Sys 5
BSDI Fast
Linux VF
Linux Regular
--
Sean.Goggin....sean@u36.uucp.....................................U36.Research...

Michael Bryan

unread,
Apr 7, 1992, 4:40:33 AM4/7/92
to
In article <1992Apr7....@msus1.msus.edu> l00...@eeyore.stcloud.msus.edu (Networking Research) writes:
> I like the way that Mach 2.6 deals with this on the 386. You have
>only one Mach partition in the DOS partition table, but within that partition
>you have a standard BSD style disklabel with it's own partition table.

This would be my preference. This would allow, for instance, the creation
of a small DOS partition, and a large BSD partition (say 95% of a disk?),
so that you could boot either one by using an fdisk-like utility to change
which partition was active (bootable). This large BSD psuedo-disk could
then be split into standard BSD partitions.

Of course, for now I'm content to make my first drive a BSD drive, with
a second smaller drive for DOS, and boot DOS from a floppy when I want it.
That is, assuming 0.1 comes out and has a fix for the hang on the "pc0"
line.

--
Michael Bryan mic...@resonex.com
This offer law where prohibited by void.

Networking Research

unread,
Apr 7, 1992, 7:34:40 AM4/7/92
to
ve...@du9ds3.uni-duisburg.de (Holger Veit) writes:
> This is an idea and a question how to make 386BSD work with the
> DOS partition system. Comments on whether this works or not, and additional
> hints are welcome.

I like the way that Mach 2.6 deals with this on the 386. You have


only one Mach partition in the DOS partition table, but within that partition
you have a standard BSD style disklabel with it's own partition table. This

allows for leaving 3 DOS style partitions free, and having a fair number
(8?) of partitions available for Unix. This way, one could concievably have
multiple unixes stored on one disk too, each with it's own partition table.

-Mark Holden
l00...@eeyore.stcloud.msus.edu

Leendert van Doorn

unread,
Apr 7, 1992, 12:24:03 PM4/7/92
to
In case you're interested, this is my list.

Leendert
------------------------------------------------------------------------------

>From: leen...@cs.vu.nl (Leendert van Doorn)
Newsgroups: comp.sys.ibm.pc.misc,comp.os.minix,comp.unix.sysv{2,3}86
Subject: partition table - system indices revisited
Message-ID: <79...@star.cs.vu.nl>
Date: 18 Oct 90 10:55:12 GMT
Sender: ne...@cs.vu.nl
Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
Lines: 62

About two weeks ago I send out a request for partition table system
indices, and here are the responses. If there is enough interest, I
will maintain this table.

Mnemonic ID Description
----------------------------------------------------------
DOS-12 0x01 MS-DOS, 12-bit FAT
XENIX / 0x02 Xenix root
XENIX /usr 0x03 Xenix user
DOS-16 0x04 MS-DOS, 16-bit FAT
DOS-EXT 0x05 MS-DOS Extended
DOS-BIG 0x06 MS-DOS Large
HPFS 0x07 OS/2 High Performance File System
QNX 0x07 QNX
AX 0x07 Advanced Unix
AIX 0x08 A/IX
AIX boot 0x09 bootable A/IX partition
OPUS 0x10 Opus
VENIX/286 0x40 Venix 80286
NOVELL 0x51 possibly Novell
CP/M 0x52 CP/M
386/IX 0x63 386/IX
UPORT/386 0x63 Microport's V/386
NOVELL 0x64 Novell
PC/IX 0x75 PC/IX
MINIX-OLD 0x80 pre 1.4b Minix
MINIX 0x81 Minix partition
AMOEBA 0x93 Amoeba
BADBLK 0x94 Amoeba's bad block partition
CCP/M 0xDB Concurrent CP/M
DOS-SCND 0xF2 Second Dos partition, some 3.2 and all 3.3+
BADTRK 0xFF Bad track table

Having composed this list, I'm still stuck with the following questions:

The system index 0x07 seems to be very popular, at least three systems
are using it (OS/2, QNX, and AX). This seems weird, I would expect that
at least in these lower regions there would be some coordination.

If the system index 0x63 (386/IX and UPORT/386) actually a generic system
ID for V/386 ?

The DOS-SCND partition is odd, at least I've never seen it before. Could
somebody check this out, please ?

Does any body know the format of the bad track table (0xFF) ?

Thanks to g...@dutlru1.tudelft.nl, jo...@jwt.UUCP, mitc...@mdi.com,
ste...@beaver.cs.washington.edu, and t...@prosun.first.gmd.de.

Leendert


--
Leendert van Doorn <leen...@cs.vu.nl>
Vrije Universiteit / Dept. of Math. & Comp. Sci. +31 20 5484477
Amoeba project / De Boelelaan 1081A
1081 HV Amsterdam / The Netherlands

Andrew Scherpbier

unread,
Apr 8, 1992, 10:26:45 AM4/8/92
to
mic...@resonex.com (Michael Bryan) writes:

: In article <1992Apr7....@msus1.msus.edu> l00...@eeyore.stcloud.msus.edu (Networking Research) writes:
: > I like the way that Mach 2.6 deals with this on the 386. You have
: >only one Mach partition in the DOS partition table, but within that partition
: >you have a standard BSD style disklabel with it's own partition table.
:
: This would be my preference. This would allow, for instance, the creation
: of a small DOS partition, and a large BSD partition (say 95% of a disk?),
: so that you could boot either one by using an fdisk-like utility to change
: which partition was active (bootable). This large BSD psuedo-disk could
: then be split into standard BSD partitions.

I like this as well, however, this fdisk idea is sort of dumb. Why not change the
boot loader to behave similar to the one for SCO Xenix? It provides a boot prompt
at which point one can decide from which partition to boot, but also from which kernel.
I do a lot of kernel hacking and I have to boot off floppy quite often because I
screwed up /386bsd and I can't seem to boot from /386bsd.old (eventhough the bootfd
source claims you should be able to...)
This boot loader would then have a timeout and a default way of booting so that it will
boot correctly after a power failure (heaven forbid!!!) or panic (never!!!) when
nobody is around to manually boot it.

I have been looking at the xxboot and bootxx code to see how easy/hard this would be,
but right now I am working on a new console driver. So if someone else wants to take
on the task of writing a new boot loader, we should exchange some ideas.

____________________________________________________________________________
Andrew "Race Turtle" Scherpbier, SysMgr
College of Sciences
San Diego State University
WORK: tur...@sciences.sdsu.edu
HOME: tur...@kiwi.sdsu.edu

Mark Lanett

unread,
Apr 8, 1992, 11:08:18 AM4/8/92
to
tur...@newshub.sdsu.edu (Andrew Scherpbier) writes:

>I like this as well, however, this fdisk idea is sort of dumb. Why not change the
>boot loader to behave similar to the one for SCO Xenix? It provides a boot prompt
>at which point one can decide from which partition to boot, but also from which kernel.
>I do a lot of kernel hacking and I have to boot off floppy quite often because I
>screwed up /386bsd and I can't seem to boot from /386bsd.old (eventhough the bootfd
>source claims you should be able to...)
>This boot loader would then have a timeout and a default way of booting so that it will
>boot correctly after a power failure (heaven forbid!!!) or panic (never!!!) when
>nobody is around to manually boot it.

An RT running AOS does all that, and I don't even need it because I'm not hacking the
kernal. Maybe soon, though...
--
Mark Lanett, Software Tools Group, NCSA mla...@uiuc.edu or NCSA.STG
"People wander in and out of virtual rooms in virtual settings with virtual
characters and virtual money and virtual armor and virtual weapons, which is
virtually a good way to spend time, but not quite." -- Usenet Oracle
--
Mark Lanett, Software Tools Group, NCSA mla...@uiuc.edu or NCSA.STG
"People wander in and out of virtual rooms in virtual settings with virtual
characters and virtual money and virtual armor and virtual weapons, which is
virtually a good way to spend time, but not quite." -- Usenet Oracle

Chip Salzenberg

unread,
Apr 8, 1992, 2:59:06 PM4/8/92
to
According to l00...@eeyore.stcloud.msus.edu (Networking Research):

> I like the way that Mach 2.6 deals with this on the 386. You have
>only one Mach partition in the DOS partition table, but within that
>partition you have a standard BSD style disklabel...

SCO's scheme is similar, and I like it.
--
Chip Salzenberg at Teltronics/TCT <ch...@tct.com>, <7371...@compuserve.com>
"Informix 4GL is not a 4G, and it's barely an L." -- John Tombs

Julian Elischer

unread,
Apr 8, 1992, 4:23:49 PM4/8/92
to

To add to the list MACH uses 99 (0x63).

julian

We are running the MACH disk drivers in the net2 release.
They work fine after a little cleanup. (the scsi driver anyhow)
the MACH disk format with the DOS compatible feature mentioned earlier
works well.

The utilities SHOULD work directly under net2 as they ar just BSD4.3
and do nothing really fancy, just ioctls

basically there is one program called diskutil
which has 4 names

diskutil, fdisk,vtoc and badblock.

it sets up all the badblock tables and partition tables.

as the previous writer said,
they have a dos compatible partition
which they then divide up into unix partitions

I think all the stuff to do it is under CMU license and
should therefor be available.

julian


Keith Ericson

unread,
Apr 8, 1992, 6:51:18 PM4/8/92
to
In article <1992Apr8.1...@newshub.sdsu.edu> tur...@newshub.sdsu.edu (Andrew Scherpbier) writes:

>I have been looking at the xxboot and bootxx code to see how easy/hard this
>would be, but right now I am working on a new console driver. So if someone
>else wants to take on the task of writing a new boot loader, we should
>exchange some ideas.

Look on the SIMTEL20 archive machine (or a mirror) in the sysutl directory
for a file called bootany.zip. It contains a complete system to re-groove
the boot record as you describe (hit a Function key to select the partition
you want to boot from), and source is included...

(help *) KEITHE()
Keith Ericson @ TekLabs
kei...@sail.labs.tek.com

Gary A Browning

unread,
Apr 8, 1992, 7:08:01 PM4/8/92
to
In article <1992Apr8.1...@newshub.sdsu.edu>,

tur...@newshub.sdsu.edu (Andrew Scherpbier) writes:
> Why not change the boot loader to behave similar to the one for SCO
Xenix?
> It provides a boot prompt at which point one can decide from which
partition
> to boot, but also from which kernel. I do a lot of kernel hacking and
I have
> to boot off floppy quite often because I screwed up /386bsd and I
can't seem
> to boot from /386bsd.old (eventhough the bootfd source claims you
should be
> able to...). This boot loader would then have a timeout and a default

way of
> booting so that it will boot correctly after a power failure (heaven
> forbid!!!) or panic (never!!!) when nobody is around to manually boot
it.
>
> I have been looking at the xxboot and bootxx code to see how easy/hard
this
> would be, but right now I am working on a new console driver. So if
someone
> else wants to take on the task of writing a new boot loader, we
should
> exchange some ideas.

I believe this has been mentioned before but there are a variety of boot
loaders
already out on the net that, I think, do what you want. I use one to
manage my
DOS and ISC Unix partitions on my system. It displays the partition
table and an optional comment line next to each partition. You then
type '1', '2', '3' or
'4' to boot from that partition. Another flavor will automatically
select the
currently active partition and boot if a response is not given within a
certain time interval. This can be setup to automatically boot the unix
partition. The program I am using is called 'bootmenu'.

I have not used 386BSD yet because I have only SCSI drives but on ISC, the
bootstrap will assume /unix (I think this is the name). If this is not what
you want (i.e. the new kernel is broken) you can hit the space bar during the
ISC bootstrap and it will ask you which kernel file you want to load. The
386BSD bootstrap must do something similar to this (or at least could be made
to work this way with a relatively simple hack if you wanted).

I think that the two of these will do what you want with little or no 386BSD
code changes (except you may have to debug 'bootfd').
--
Gary Browning INET: ga...@griffin.cd.amdahl.com
Amdahl Corporation
1250 East Arques, Sunnyvale, CA 94088

David J. Hughes

unread,
Apr 8, 1992, 9:26:00 PM4/8/92
to
kei...@sail.LABS.TEK.COM (Keith Ericson) writes:

>Look on the SIMTEL20 archive machine (or a mirror) in the sysutl directory
>for a file called bootany.zip. It contains a complete system to re-groove
>the boot record as you describe (hit a Function key to select the partition
>you want to boot from), and source is included...

I beat up the sources of bootany a whle back to handle a public access
lab management problem we had and it works well. You still have
problems of the restricted size ( and bootany's habit of wanting to fire
up ROM basic :-) but it'll do the job well with a bit of work.

As for the selection of a particular kernel from which to boot, how
about a 2 level boot strap to cover this. Bootany (or whatever) allows
you to select the partition from which to boot. It then loads what it
thinks is the loader and executes it. That loader could be made aware
of multiple kernels with a lot less problems than adding that function
to bootany.

I admit that I haven't checked out the source to the BSD boot code but I
can't see it as being a problem.


bambi
___ David J. Hughes ba...@bu.oz.au
/ \ / / /
/ __/ __ __ ____/ / / __ Senior Network Programmer
/ \ / \ / \ / / / / / \ / Comms Development & Operation
\____/ \__// / \__/ \___/ / / / AUSTRALIA (+61 75 951450)

Thomas Wolfram

unread,
Apr 10, 1992, 9:22:39 AM4/10/92
to
In article <X8X...@mailgzrz.tu-berlin.de>, wolf...@cs.tu-berlin.de (Thomas Wolfram) writes:
> /* I for myself wroted a new master boot programm wait 5 seconds or
> so for pressing <Esc> than booting the user default OS. Otherwise it
> displays a "boot menu".
> (I know there are many similar programs but if someone is interested
> you can get the source from me (but it's a DOS assembler source also
> works for 8088/80286) */
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>
> I think it would be a good idea to do the same thing on 386BSD -
> grab a unused id Byte and use it forever to identify itself (if boot
> from floppy after crash or "upgrade" install) and prevent other
> OS install routines to use the 386BSD partition. Than up to 4 OS can
> co-exists on the disk without interfering. At the install time 386BSD
> should look in the partition table to determine whether a partition
> entry is free and enough space on the disk is available. A program
> similar DOS- or ISC-fdisk would be a good feature.
>

This is followup to my own article. Because of the C like comment
some netters thought that was quoted and asked me where to get the
source but its my own program. Since I don't think that this is the
best master boot program in the northern galaxy look also around in
the net and compare. But nevertheless everyone who's interested
can get the source (or the DOS binary) from me. But actually I translate
all messages and the source comments from german to english.

Some informations:
There is no SAA desktop or something, no included fdisk (of course
it would be nice). Its a simple program but it comes with a installation
routine that backups the original master boot sector to a file. Than it
reads the partition table and displays it (which OS - a lot of id bytes
are known to the program - and whether the partition is bootable).
You can choose which OS is the default (also other than active partition).
Than you can create your own boot menu (with your OS names) from the
bootable partitions like:

MS-DOS............1
OS/2..............2
386BSD............3 (would be really nice)

or

dos 5.0..........1
os/2 2.0..........2
386bsd............3

How do you like it. You must not add all partitions to the menu.
An "uninstall" feature is included.
But: Actually you cannot change the boot timeout.


-- Thomas

PS: There were three or four netters who want to try the program. Your
addresses are lost! Please mail again.

0 new messages