*BSD News Article 59727


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!EU.net!sun4nl!fwi.uva.nl!not-for-mail
From: frank@fwi.uva.nl (Frank van der Linden)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Re: Problem mounting msdos patition
Date: 16 Jan 1996 11:12:11 +0100
Organization: FWI, University of Amsterdam
Lines: 50
Distribution: world
Message-ID: <4dftlr$3of@atlas.fwi.uva.nl>
References: <4dfrrm$obn@tribune.usask.ca>
NNTP-Posting-Host: atlas.fwi.uva.nl

gregory@skatter.usask.ca (gregory brady) writes:

>I can not get my ms-dos partitions to mount properly.  NetBSD 1.1 reside
>s in a partition on my second (wd1) hard drive.  I decided that the first
>step would be to get it to mount the dos partition on wd0.  The command I 
>thought should work is
>	mount -t msdos /dev/wd0d /dosdrv0

/dev/wd0d traditionally stands for 'all of wd disk 0' You should add an extra
entry to the disklabel, partition 'e' in this case, and then use /dev/wd0e.
The line you add using 'disklabel -e -r wd0' would look something like

e:   <size in sectors> <offset in sectors>    MSDOS        0     0   

Also, don't forget to increment the number in 'X partitions' displayed
above the table by 1.

>Now, if I can get the drive that NetBSD isn't sharing with dos mounted, I 
>want to try and get the drive that dos and NetBSD share mounted.  This is 
>my second hard drive (wd1), and dos occupies two partitions from cylinder 
>0 to 126 and from cylinder 127 to 381.  NetBSD has the parition from 
>cylinder 382 to 617.  I haven't started trying to solve this problem yet, 
>but any ideas on how to do this would be appreciated.

Use disklabel again.. but be careful, and note that MSDOS partitions don't
start at offset 0, but at offset <one track worth of sectors>. You should
create a disklabel with partition 'a' as the NetBSD partition, 'b'
empty (or just the whole disk too) 'c' and 'd' the whole disk, and 'e'
your DOS partition again.

If you want to be safe: save the disklabels before editing, so you can
restore them with 'disklabel -R' if you mess up.

>Reading the man pages for mount and mount_msdos I see that NetBSD is only 
>supposed to work reliably with dos 3.3 files systems and below.  Would it 
>be worth my while to download a Linux kernel and steal the msdos file 
>system code from that?  Is it any better?  I plan on looking at the 
>Linux kernels sometime anyway so I can get my CD-Rom drive up and running 
>(no need doing work that's already been done).

Hmm, if that's in the man page, then the manpage is outdated. I have been
using MSDOS mounts (read and write) on DOS 5.x and 6.x, and had no problems.
In NetBSD-current, the msdosfs code even supports Windows95 long filenames..

- Frank
-- 
                  Frank van der Linden, frank@fwi.uva.nl
	       Use NetBSD, it's Unix, it's free and works on:
    i386+, Mac, Amiga, HP300, Sun3, Sun4c, PC532, DEC Alpha, DEC MIPS, Atari
              Work in progress: Vax, Sun4m and a host of others