Return to BSD News archive
Newsgroups: comp.os.386bsd.questions Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!usc!cs.utexas.edu!uunet!noc.near.net!analog.com!analog.com!nwd2sun2.analog.com!Mike.Long From: Mike.Long@analog.com (Michael W. Long) Subject: Re: DOS coexisting with NetBSD-0.9 In-Reply-To: marty@TC.Cornell.EDU's message of 18 Oct 1993 23:20:58 -0400 Message-ID: <MIKE.LONG.93Oct19193614@cthulhu.analog.com> Lines: 72 Sender: usenet@analog.com Reply-To: Mike Long <Mike.Long@Analog.com> Organization: Analog Devices Inc, Norwood MA, USA References: <29vmeq$mg9@theory.TC.Cornell.EDU> Date: Tue, 19 Oct 1993 23:36:14 GMT I think the FAQ covers this to some extent, but it may not be clear, so I'll demonstrate how I set up my system. I have a single Western Digital WDAC2420. It is a 420 MB IDE drive in salesman's megabytes, which is ~405 MB in real megabytes. According to my CMOS setup, it has 989 cylinders, 15 heads (tracks/cylinder), and 56 sectors. This information is *vital*, copy down your disk's equivalent parameters on a handy sheet of paper. The software you need in addition to your NetBSD install disks is the DOS FDISK program, and a partition editor. I used PFDISKTC.ZIP, which you can find using Archie. You will also want a boot selector; I used OS-BS135.EXE. Create a MSDOS bootable floppy and copy FDISK, PFDISK.EXE, and OS-BS.COM onto it. If your setup is like mine was before I installed NetBSD, you have one large DOS partition taking up your whole disk. If you have anything you want to keep on your hard drive, BACK IT UP *NOW*. Re-partitioning your disk will erase everything on it. You Have Been Warned. Boot your machine with the floppy, and start up FDISK. Tell FDISK to delete your existing DOS partition; FDISK is menu-driven, so this should be easy to do. Your disk is now empty and ready to be re-partitioned; you did back up your data, didn't you? Decide how much of your disk you want DOS to use, and create a primary DOS partition of that size; I gave DOS 125 MB, which is 305 cylinders on my drive. Fill the rest of the disk with an Extended DOS partition; on my disk this was 280 megabytes, or 684 cylinders. The Extended DOS partition will become your NetBSD partition. You can define logical drives in it if you want, but if you do they'll just be overwritten by the NetBSD installation process anyway. Finally, tell FDISK to mark your Primary DOS partition active, and exit FDISK. FDISK will reboot your machine; leave the floppy in the drive and you will end up in DOS again. If you are installing NetBSD on your boot drive (like I was), start up PFDISK with "PFDISK 0". Use PFDISK according to its directions (you read them, didn't you?) to change the ID of your extended DOS partition from 5 to 165. Write the partition table back to disk and exit PFDISK. You are now ready to install NetBSD. You will want to take note of what PFDISK gives as the start and length in sectors of what used to be your Extended DOS partition; this information will be needed during the NetBSD install process. In my case, the Extended DOS partition began 256144 sectors from the beginning of the disk, and was 574560 sectors long. Replace your DOS boot floppy with your NetBSD kernel-copy floppy and reboot your machine. Give the install script the type (IDE), number of cylinders (989), number of heads (15), and the number of sectors (56) as you wrote them down before repartitioning your disk. When it asks you for the offset from the beginning of the disk and size of your NetBSD partition, give it the numbers PFDISK gave you (256144 and 574560 in my case). From this point you can follow the installation notes to divide up the UNIX portion of your disk. When you are done installing NetBSD, replace any floppy you may have in your drive with your DOS boot floppy. Use the UNIX "reboot" command to reboot your machine into DOS again. Run OS-BS.COM to install the OS-BS boot selector. You can use the partition IDs (6 for DOS, 165 for NetBSD) to tell which partitions go with which operating system. Don't worry about the fact that you only see one partition for NetBSD, all of the partitions you created during the NetBSD install process are contained within it. Mark one of the two partitions active, preferably the one that OS-BS boots by default. I found that the NetBSD install process left my disk with no partitions marked active, which is why the boot floppy is necessary. You should now have a disk that is shared by DOS and NetBSD. I used the directions given in the FAQ to make my DOS partition accessible from NetBSD by adding an f: partition to my disklabel, and I've also managed to install mtools so that it can access my DOS partition. But this post is already too long... -- Mike Long Mike.Long@Analog.com VLSI Design Engineer voice: (617)461-4030 Analog Devices, SPD Div. FAX: (617)461-3010 Norwood, MA 02062 *this = !opinion(Analog);