Re: mounting msdosfs

From: Jon Noack (noackjr_at_alumni.rice.edu)
Date: 04/18/04

  • Next message: Yamada Ken Takeshi: "Re: pango 1.4.0 works on -current?"
    Date: Sat, 17 Apr 2004 20:24:13 -0500
    To: Christer Solskogen <solskogen@carebears.mine.nu>
    
    

    On 4/17/2004 3:56 AM, Christer Solskogen wrote:
    > I got two msdosfs(fat32) partitions on my machine.
    > I can mount them without any problems, but fsck wont work.
    >
    > # fsck_msdosfs /dev/ad0s5
    > ** /dev/ad0s5
    > backup doesn't compare to primary bootblock
    >
    > I did a clean FreeBSD 5.2.1 install(not upgraded or anything)
    >
    > Since mounting them, and using them goes well I guess almost everything
    > is alright. Is there a way of spesifying to not fsck them at boot, but
    > mount them?
    >
    > Hm, i think i remember netbsd had a simular problem, but it got fixed.
    > But I`m not sure if it would work on FreeBSD.
    > http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=11134

    Assuming you can mount the partition without any complaints, set the
    sixth field in /etc/fstab to zero to avoid the fsck. Here's the section
    from fstab(5):
    The sixth field, (fs_passno), is used by the fsck(8) program to
    determine the order in which file system checks are done at reboot time.
    The root file system should be specified with a fs_passno of 1, and
    other file systems should have a fs_passno of 2. File systems within a
    drive will be checked sequentially, but file systems on different drives
    will be checked at the same time to utilize parallelism available in the
    hardware. If the sixth field is not present or is zero, a value of zero
    is returned and fsck(8) will assume that the file system does not need
    to be checked.

    An example entry (note the 'Pass#' is set to '0'):
    # Device Mountpoint FStype Options Dump Pass#
    /dev/ar0s5 /win98 msdos rw 0 0

    This appears to have been fixed in NetBSD (the bug says revision 1.9):
    http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/fsck_msdos/boot.c

    DOSBOOTBLOCKSIZE was replaced with 79? Oh well, at least the /*XXX*/ is
    self-documenting ;-).

    A diff of the current FreeBSD boot.c versus the NetBSD version shows one
    other change (made in revision 1.8). I know we're doing a Darwin merge
    of msdosfs stuff, but I didn't see fsck_msdosfs in a quick browse of the
    Darwin 7.3 source. Perhaps we should merge NetBSD's fsck_msdosfs...

    Jon Noack

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Yamada Ken Takeshi: "Re: pango 1.4.0 works on -current?"

    Relevant Pages

    • fstab entries for external USB hard drives led to fsck.ext3 failure on boot, bug?
      ... 'F!3@$%ing fsck! ... Please repair the file system manually. ... CONTROL-D will terminate this shell and resume system boot. ... were to allow me to quickly mount an external hard drive ...
      (Debian-User)
    • Re: Additional HardDisk
      ... Create partitions using fdisk ... Create file system using mkfs.ext3 ... mount partitions ...
      (RedHat)
    • Re: [SLE] system crash, 9.1--continued
      ... > I understand that you cannot fsck a mounted disk, ... > attempt to mount the disk. ... > what partitions are on the second drive, ...
      (SuSE)
    • Re: [opensuse] encrypted usb drives - fixed mount points
      ... but fails to find the partitions at boot time. ... seem to know about encryption and just says: ... mount: going to use the loop device /dev/loop0 ... the fsck digit is "0" so that it doesn't try to run fsck ...
      (SuSE)
    • Re: fsck errors on boot
      ... When you mount a partition or run fsck, the current system time is written to the partition's superblock. ... When Debian tries to mount the partitions, mount complains because the recorded time is too different from the current system time. ...
      (Debian-User)