Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!wupost!udel!newsserv.cs.sunysb.edu!stark.UUCP!cs.sunysb.edu!newsserv!stark!gene From: newsserv!stark!gene@cs.sunysb.edu (Gene Stark) Newsgroups: comp.os.386bsd.questions Subject: Re: FreeBSD - sio (com) and DOS HD problems Date: 17 Sep 93 07:58:03 Organization: Gene Stark's home system Lines: 58 Distribution: world Message-ID: <NEWSSERV!STARK!GENE.93Sep17075803@stark.uucp> References: <1993Sep16.201358.26183@doug.cae.wisc.edu> Reply-To: stark@cs.sunysb.edu NNTP-Posting-Host: stark.uucp In-reply-to: tillemaj@cae.wisc.edu's message of 16 Sep 93 20:13:57 CDT In article <1993Sep16.201358.26183@doug.cae.wisc.edu> tillemaj@cae.wisc.edu (John Edward Tillema) writes: 2. Is it possible to get info from a DOS hard disk partition to FreeBSD? I tried creating a c device in mtools (2.0.7) but that didn't work, I also tried creating a disklabel (/dev/wd0h) for it (both are out of the FAQ), but again, that didn't work. The changes I made were never present when I would run disklabel again. It would say unused partition h of size xxxx when I quit, then prompt if I wanted to overwrite DOS parition table. Regardless of whether I answered y or n it didn't save the changes. This is for a Conner 340 Meg IDE drive. The partitioning scheme used in 386BSD/FreeBSD is bizarre, to say the least. To the best of my understanding, you will not be able to create a partition for your DOS area, and then see that area from within FreeBSD, unless that area lives on cylinders that are inside what has been declared to be the BSD c partition. If you try to create a partition outside this area, you will get the "unused partition" messages you describe. So, I believe that if you expand the range of cylinders declared for the BSD c partition, so that they cover the DOS area, you will then be able also to define a new partition in the BSD disklabel that will allow you access to the DOS area. But, this is not so easy as it might seem. The disklabel program has the hard-coded default idea that the disklabel should be written at the beginning of the "a" (root) partition of the BSD area. If the beginning of your "a" partition does not coincide with the beginning of your "c" area, then the disklabel will be written in the wrong spot and you will not be able to boot your system. I ran into this problem when I wanted to steal some cylinders from my DOS area that was first on my disk, and give them to a new partition to be included in the BSD area. The effect of this was to make a non-root partition be the first one in the BSD area, and disklabel was not at all happy. I eventually worked around the whole thing by using DOS fdisk to delete all partitions on the disk, making a new primary DOS partition of the size I wanted, booting the Tiny BSD install disk to get an initial disklabel for the BSD area, then installing the disklabel I really wanted after that. Once this was done, though, to redisklabel the BSD area required specifying the partition that was first in the BSD area (e.g. wd0f) rather than just using wd0 and letting the default (the "a" partition) get labeled. I managed not to destroy any of the data that was in the BSD area, so I was happy. So, the moral of the story is this: You can try adding cylinders to your BSD area ("c" partition) so that they include the area where the DOS partition is. If your DOS partition occurs *after* the BSD area, then this should be easy, and you should then be able to write a disklabel that contains a partition you can mount as a PCFS. If your DOS partition occurs *before* the BSD area, then you can probably do it too, but you have to be very careful, because for the reasons explained above you might end up not being able to boot your system. Make sure to keep around a fixit floppy with a copy of your original disklabel (so you can go back) and facilities for editing and writing new disklabels. - Gene Stark -- stark@cs.sunysb.edu