How to mount partitions msdos (beginner level)

B

BSDAppentic3

Guest
Well, let's start:
First, I based my tutorial on this: https://forums.freebsd.org/threads/10-0-rc3-fuse-ntfsfs-not-mounting.43260/#post-244454
But, even when I can understand very well this language, I found this, which is in another language. If you can speak Spanish, you can visit it. Or, if you want, tell me, and I'll translate it for you ;)
https://docs.freebsd.org/doc/5.1-RELEASE/usr/share/doc/es/books/handbook/x1002.html
So, let's going to the point!
First, if you have a partition of FAT32, you must be sure that it is really of this filesystem. To do that, simply open a terminal (of course, as root) and type:
Code:
 gpart show
If you want an example, here you have one:
Code:
root@hostfbsd:~ # gpart show
=>        63  1953525105  ada0  MBR  (932G)
          63           1        - free -  (512B)
          64  1153433600     1  freebsd  [active]  (550G)
  1153433664   800091504        - free -  (382G)

=>         0  1153433600  ada0s1  BSD  (550G)
           0  1145044992       1  freebsd-ufs  (546G)
  1145044992     8388607       2  freebsd-swap  (4.0G)
  1153433599           1          - free -  (512B)

=>      63  15138753  da1  MBR  (7.2G)
        63      1985       - free -  (993K)
      2048   4450304    1  linux-data  (2.1G)
   4452352   6133760    2  fat32  (2.9G)
  10586112   4552704    3  linux-data  (2.2G)
Pay SPECIAL attention to this line:
Code:
 4452352   6133760    2  fat32  (2.9G)
Here, the output is telling that *the partition number 2* it's effectively of FAT32.
That's what we need to know.
Now, we follow with
Code:
 file -s /dev/da1
You want to see how it's in my case? Here's the output:
Code:
root@hostfbsd:~ # file -s /dev/da1
/dev/da1: DOS/MBR boot sector; partition 1 : ID=0x83, start-CHS (0x0,32,33), end-CHS (0x115,37,16), startsector 2048, 4450304 sectors; partition 2 : ID=0xb, start-CHS (0x115,37,17), end-CHS (0x292,243,33), startsector 4452352, 6133760 sectors; partition 3 : ID=0x83, start-CHS (0x292,243,34), end-CHS (0x3ae,88,42), startsector 10586112, 4552704 sectors
I know that here are a lot of info, but I must post it because of your understanding.
Now, again, pay special attention to this:
Code:
partition 2 : ID=0xb, start-CHS (0x115,37,17), end-CHS (0x292,243,33), startsector 4452352, 6133760 sectors
And this:
Code:
/dev/da1
So, if you have a basic idea (or not) of how FreeBSD works with the partitions, you'll know that they're called "slices". How we can identify a "slice" or partition, in a disc which have two or more? because of this:
Code:
 /dev
This means "device" (as far as I know). So, if we enter to "/dev", we'll see the devices on a computer. Now, backing to the outputs of
Code:
 file -s /dev/da1
and
Code:
 gpart show
we can infer that
Code:
 /dev/da1s2
IT'S the partition that we need to mount.
But now, we need to mount it.
So, in this case, the command comes to be:
Code:
 mount -t msdosfs /dev/da1s2 /media
Let explain this: "mount" it's the command used for mount a device; "-t" it's the option that we must write before to the type fylesystem; "msdosfs" it's the filesystem of msdos, which it's where comes FAT (sorry, but my knowing in this point it's very basic); "/dev/da1s2" comes to be the device, and the partition, called slice (remember that this was in my case); "/media" it's were we going to mount the partition: it could be any "mountpoint" (which basically it's the point where we mount the partition or device), but I strongly recommend to you that you use a mountpoint free, because if not, then the new slice will overwrite the mountpoint, and the previous partition or slice that you have mounted previously there, could be unmounted.
So this was the procedure that I did.
Hope this can help you in this trouble. ;)
 
Back
Top