Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Hey everyone, What do I put in my fstab (or BSD equivalent...sorry, I am a BSD newb) to mount at boot a fat32 partition with read/write access for all users? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619

    fat32 + fstab


    Hey everyone,

    What do I put in my fstab (or BSD equivalent...sorry, I am a BSD newb) to mount at boot a fat32 partition with read/write access for all users?

    Thanks in advance,
    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  2. #2
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    Ok, I used a few different variables the hdd and the mount point just to show that they are variables; however, if you want to moutn you must do something like this.
    Code:
    mount -t msdos /dev/wd0j /dos
    If you want to edit a line in /etc/fstab, you must make it look something like this for it to mount on boot
    Code:
    /dev/ad0s1 msdos rw 2 2
    there is also another variable, depending upon the distro and release that you use msdos might be msdosfs, so play around with mount and when you get it right you can edit your fstab...

    so there are three variables for you
    1)msdos or msdosfs
    2)hdd naming
    3)mount point
    Operating System: GNU Emacs

  3. #3
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Thanks for the reply,

    Unfourtunately, my fat32 partition does not seem to be recognized. I am using PC-BSD 0.7.8. Here is the output of mount:
    Code:
    /dev/ad0s2a on / (ufs, local)
    devfs on /dev (devfs, local)
    /dev/da0s1 on /mnt/usbflash0 (msdosfs, local, acls)
    I know the partition is still there cause I can see it under Windows. I believe it is device /dev/ad0s4.

    When I try to mount it manually, I get:
    Code:
    root@PCBSD# mount /dev/ad0s4 /mnt/ad0s4/
    mount: /dev/ad0s4 on /mnt/ad0s4: incorrect super block
    Any ideas?

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  4. #4
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    Ok, instead of this:
    Code:
    mount /dev/ad0s4 /mnt/ad0s4/
    Try one of the two below, sometimes specifying type helps, and make sure that you have already created the /mnt/ad0s4 directory first...
    Code:
    mount  -t msdos /dev/ad0s4 /mnt/ad0s4
    or
    Code:
    mount -t msdosfs /dev/ad0s4 /mnt/ad0s4
    Operating System: GNU Emacs

  5. #5
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Okay, I tried specifying type and that didn't work:
    Code:
    root@PCBSD# mount -t msdos /dev/ad0s4 /mnt/ad0s4/
    msdosfs: /dev/ad0s4: Invalid argument
    root@PCBSD# mount -t msdosfs /dev/ad0s4 /mnt/ad0s4/
    msdosfs: /dev/ad0s4: Invalid argument
    The /mnt/ad0s4 folder was created earlier. Also, is there a way to confirm that my fat partition is at /dev/ad0s4?

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  6. #6
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    it looks like you are using the wrong /dev/, just use fdisk or cfdisk and print the partition table
    Operating System: GNU Emacs

  7. #7
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Here is the result of fdisk:
    Code:
    root@PCBSD# fdisk
    ******* Working on device /dev/ad0 *******
    parameters extracted from in-core disklabel are:
    cylinders=116280 heads=16 sectors/track=63 (1008 blks/cyl)
    
    Figures below won't work with BIOS for partitions not in cyl 1
    parameters to be used for BIOS calculations are:
    cylinders=116280 heads=16 sectors/track=63 (1008 blks/cyl)
    
    Media sector size is 512
    Warning: BIOS sector numbering starts with sector 1
    Information from DOS bootblock is:
    The data for partition 1 is:
    sysid 7 (0x07),(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX)
        start 63, size 60904305 (29738 Meg), flag 0
            beg: cyl 0/ head 1/ sector 1;
            end: cyl 1023/ head 30/ sector 63
    The data for partition 2 is:
    sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
        start 60904368, size 54409824 (26567 Meg), flag 80 (active)
            beg: cyl 5/ head 0/ sector 1;
            end: cyl 734/ head 15/ sector 63
    The data for partition 3 is:
    <UNUSED>
    The data for partition 4 is&#58;
    sysid 5 &#40;0x05&#41;,&#40;Extended DOS&#41;
        start 115314570, size 1895670 &#40;925 Meg&#41;, flag 0
            beg&#58; cyl 1023/ head 255/ sector 63;
            end&#58; cyl 1023/ head 254/ sector 63
    It does appear that the fat32 partition is partition 4. Is that /dev/ad0s4?

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  8. #8
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    I found a site that said that this problem exists when dual-booting with Win2K, suggests scandisk to fix it.
    Operating System: GNU Emacs

  9. #9
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    It still unfourtunately doesn't work. Could it be possible that support for fat32 is not built into the kernel?

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  10. #10
    Linux Engineer
    Join Date
    Oct 2004
    Location
    Vancouver
    Posts
    1,366
    well you can always run a menuconfig and see if it is?
    Operating System: GNU Emacs

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •