Solved How to mount a large fat32 drive HDD with Fstab?

Hi all,
I have a 250Gb external hard disk (it is a dock with two slots for two hard disks) connected by the USB port, I am using just one disk. I can mount it perfectly well from the terminal with:

Code:
mount -t msdosfs -o large /dev/da0 /mnt/discdur/

And now, How could I configure /etc/fstab in order to mount this disc automatically from boot?

I tried many times, but I did always in the wrong way.
 

Attachments

  • external-hard-disc-fstab-freebsd.jpg
    external-hard-disc-fstab-freebsd.jpg
    156.1 KB · Views: 671
I would love to say yes, but it's not working with this at all.
In fact, the boot crashes and now I have to recover the image from the MicroSD card and delete this line from the fstab file.

I don't know why, but it is not working just with these line :-(
 
In fact, the boot crashes ...
I'm sorry, but I can't debug "it crashes". You need to give me details. Exactly what does it do? Does the mount just silently not happen? Or do you get error messages? Did you test it when booting, or afterwards (/etc/fstab can be used at boot time, and also when you say mount -a). Did the OS crash? What exactly were the messages? What exact commands did you use to test it?

A picture of the cabling (which looks about as well-organized as the cabling on my work bench) doesn't help; a picture of the console messages might have helped.

There is one other suspicious thing: These days, most OSes format disk drives with partition tables, but the mount line /dev/da0 indicates that the MS-DOS file system is on the whole disk. That *could* be right, but it's a bit unusual.

and now I have to recover the image from the MicroSD card and delete this line from the fstab file.
That's very bizarre. How did failing to mount an external disk manage to destroy the image on disk? That makes very little sense.
 
Most likely the disk is not ready at boot time, late option may halep:
Code:
/dev/da0   /mnt/discdur   msdosfs   [b]late[/b],rw,large   0   0
the mount line /dev/da0 indicates that the MS-DOS file system is on the whole disk. That *could* be right, but it's a bit unusual.
I've seen many flash drives formatted that way. But that's not problem at all, if that was wrong, it couldn't crash the system, would simply spit out an error and proceed forward.
 
Sorry, my explanation was poor.

After configuring /etc/fstab as you said, my Raspberry Pi starts, I see the first ten seconds of the normal boot loader, but suddenly it doesn't continue and doesn't get an IP address from my router and also the prompt never appears. Very bizarre, yes.

Now, I take out the MicroSD from the Raspberry Pi, I mounted on my Lenovo PC with FreeBSD 10.3 and I deleted the line from the /etc/fstab and connected again into the Raspberry, and the Raspberry is working again well.
I'm thinking to format the hard disk SATA with using UFS2 filesystem, and maybe it will be easier to do this.
 
I add more information:

I'm trying to test /etc/fstab without rebooting, by the command "# mount -a" and is not working :-(

So, something must be wrong still. I start to consider the UFS2 filesystem for this SATA disc, and forget the FAT32.
 
[SOLVED]

I delete the information and partitions of the 250GB SATA disk.
I create a UFS format.
I configured my /etc/fstab to mount this external SATA disk and now everything is working like a charm.

Here is what I did:

Code:
# dd if=/dev/zero of=/dev/da0 bs=1m count=128
Code:
# newfs -L discodurUSB -O2 -U -m 6 /dev/da0
Code:
# mount /dev/ufs/discodurUSB /mnt/discdur1/

And in my /etc/fstab I added:

/dev/ufs/discodurUSB /mnt/discdur1 ufs rw 1 1

Thanks for reading and helping me.
 
I'm trying to test /etc/fstab without rebooting, by the command "# mount -a" and is not working :-(
If you want to avoid automounting a filesystem at boot time, just add another option noauto on the corresponding line:
Code:
/dev/ufs/discodurUSB /mnt/discdur1 ufs noauto,late,rw 0 1
I'd recommend to keep late anyway, since the USB-SATA adapter most likely slow in cold start.
 
I'm trying to test /etc/fstab without rebooting, by the command mount -a and is not working
Please note, for the next time you have a problem, "it doesn't work" doesn't tell us anything. Please provide the exact errors messages or, if there are no errors, state there are no errors. "It doesn't work" could mean just about anything and in order to be able to help you we need to know exactly what you are doing and the results (or lack thereof) you're getting.
 
Back
Top