Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefsd.com!uhog.mit.edu!news.kei.com!ddsw1!not-for-mail From: chilton@MCS.COM (Christopher Hilton) Newsgroups: comp.os.386bsd.questions Subject: Re: FreeBSD 2.0 Fdisk hangs when writing MBR Date: 11 Jan 1995 11:52:42 -0600 Organization: /usr/lib/news/organi[sz]ation Lines: 88 Message-ID: <3f15ta$nht@Mars.mcs.com> References: <3f09lh$ov2@lastactionhero.rs.itd.umich.edu> <3f0c77$p1p@lastactionhero.rs.itd.umich.edu> NNTP-Posting-Host: mars.mcs.com Your 540 MB disk is a new Enhanced IDE type. What geometry have you programmed into the BIOS for this disk. Here's some tips. Firstly, I know all of this because I had to enhacen a unix driver to handle that type of disk, nonetheless all of my experiance with FreeBSD in this realm is still secondary. *You have been warned* First address the geometry problem. You will need to use the custom geometry drive type so that you can tell the BIOS the geometry of the drive. If you have an AMI BIOS this is drive type 47. I'm not sure what it is for other BIOS's. Your Northgate manual may tell you this. You need to use a translation mode that forces the BIOS to use CHS access. This means that the number of heads must be no more than 16. The maximum number of sectors cannot be more than 63 so set it to 63. Then divide the total number of sectors on the disk by 16 * 63. This will give you the number of cylinders to use. It should be more than 1024. Now to install DOS The PC's BIOS allocated 10 bits for the cylinder number for seeks, reads, and writes to the disk drive. This limits it to seeing the first 1024 cylinders of the drive and no more. DOS uses this BIOS exclusivly to access the disk so it inherits this limitation. FreeBSD uses the BIOS only to boot the O/S e.g. read the kernel into memory. After that an internal driver access the hard disk and that drive isn't limited to cylindets 0-1023. What this means to you is that dos must reside completely withing cylinders 0-1023 of your hard disk and FreeBSD must have it's kernel in cylinders 0-1023 also. One more thing, DOS can only boot from a primary partition on the first disk drive. With the geometry set up you can install DOS. If you want to give DOS the second disk drive you can but you have to remember that you must install a primary DOS partition on the first drive so you can boot. I would suggest that you give DOS about 10 or 20 MB of the first disk and install all of the basic DOS stuff there, then make an extended DOS partition out of the entire second drive and install your DOS applications and data there. Notes, warnings, other miscallany. I have heard that DOS' fdisk program chokes on disks with more than 1024 cylinders. If this your experiance you need to modify the BIOS disk parameters from step 1 and tell DOS that the drive only has 1024 cylinders. Just remember to set it back when you install FreeBSD so you can actually use the extra space on your drive. Onto FreeBSD... Since FreeBSD uses it's own driver to access the disk you can set it up on the cylinder beyond 1024. However when you it boots FreeBSD has to use the BIOS so you need to the filesystem with the kernel must be entirely below the 1024 cylinder mark. You have to watch for two things here: For performance reasons FreeBSD wants to use the actual geometry of the disk when it lays out the filesystem. Since you also have DOS in the system all the OS/s must agree on the geometry and there is no way that MS-DOS will be able to use the actual geometry. *You must override the geometry that FreeBSD finds when it queries the drive with the geometry that you put into the BIOS.* As I have said before three times. The bootstrap uses the BIOS to load the kernel so you have to guarantee that the filesystem that has the kernel lies below the 1024 cylinder mark or part/all of the kernel could become unavailable to the BIOS later in the life of the system. This is easy because the disklabel program recommends that you make a small (10-20MB) root partition. This is where the kernel goes so if you insure that this partition starts below and ends at or below cylinder 1024 then you will be fine. If you set things up this way you should end up with a DOS/FreeBSD system. One last note, make sure to make up an emergency boot floppy for DOS before you install FreeBSD. It will allow you to save some steps in case of an error in the process. Have fun: C. -- Christopher Sean Hilton E-mail: chilton@mcs.com ---------------------------------------------------------------------- ICBM address: | "Thus it is said if you know them and know 42 07 39 N/87 49 44 W | yourself, your victory will not be imperiled. For PGP key finger: | If you know Heaven and you know Earth, your chilton@mcs.com | victory will be complete." - Sun Tsu ----------------------------------------------------------------------