Subject: Re: fsck weirdness?
To: None <current-users@NetBSD.org>
From: Chris Tribo <ctribo@dtcc.edu>
List: current-users
Date: 08/26/2006 14:57:48
David Laight wrote:
> On Sat, Aug 26, 2006 at 12:55:01PM +0200, Rhialto wrote:
>> On Sat 26 Aug 2006 at 12:02:18 +0200, Rhialto wrote:
>>> fsck seems to think my partition is msdos while it isn't??
>> It is probably because my fstab bas an msdos entry for USB stick memory,
>> which also will be sd0 (if it's the only USB mass storage that's
>> inserted). *ponders* Maybe fsck should look in disklabels instead of
>> fstab, if possible, since that is more probable to have correct
>> information...
>
> Actually fstab is more likely to be correct!
>
> Another option is to look at the partition contents, but that way lies
> madness since fsck could identify the partition as having the wrong
> type (due to state data from a previous format) and attempt to 'fix'
> something that really doesn't exist any more!
>
> Some systems have an fstype program that (attempts to) determine the
> file system type.
What about adding support for/using file system labels a la linux fstab?
LABEL=/boot /boot ext3 defaults 1 2
That would pretty much guarantee that you're operating on the intended
file system/device right? It would also allow you to move disks between
systems or busses without having to change the fstab. Like if you were
using a Firewire+USB drive cage, one case it might be wd0 and one it
might be sd0 or something even more bizzare depending on the setup.