How to mount a filesystem after boot

How would I go about mounting a filesystem after boot up has finished?

If I add it to fstab booting stops because it finds a problem with the filesystem. This problem does not prevent me mounting it after booting up.
 
Order is important in fstab. If you have, for example, /usr/ and /usr/local/ you need to make sure /usr/ is mounted first.
 
Maybe I didn't make my requirement clear.... I have FreeBSD installed on /dev/ada0s3a and /dev/da0s1a.
I boot from the first device and want to mount /dev/da0s1a once the system has booted. There some filesystem errors regarding missing superblocks which I am unable to resolve on this partition. If I add it to fstab the boot process stops. However I am able to mount it with problems after booting up. I would like to mount it automatically after bootup but don't know how.
 
There some filesystem errors regarding missing superblocks which I am unable to resolve on this partition.
I think you're going about it the wrong way. Fix the errors, then it'll mount normally. It's probably failing due to these errors.
 
I have no idea what is causing these errors or how to fix them. The errors do not prevent me mounting the partition after boot up.

fsck tells me that a number of disk sectors could not be read. I am not aware of where to find an alternative superblock, which apparently I need to fix the problem.
 
In that case it's probably best to backup the data, wipe the disk, reformat and restore the data. Continuing to use a filesystem that has errors is destined to cause more errors until the point you won't be able to read anything at all.
 
I have no idea what is causing these errors or how to fix them. The errors do not prevent me mounting the partition after boot up.
Are you seriously saying that the same mount (same device, same mount point, same location) that fails at boot time, later succeeds? And that it is not a mount order problem at boot time (the mount point exists when the file system wants to be mounted)?

That's very surprising. Are you sure that the mount (the manual one done after booting) really succeeded? Does the output of mount and df really show that?
 
It fails at boot time because there is a fsck error. If I mount after booting, it just mounts. Presumable no fsck is done then.

I have reformatted now as suggested by SirDice. My suspicion is that that some Linux distro has messed up the partition... I'm using the drive for testing various Linux ISO distros using Grub. Those ISO's are on a seperate FAT32 partition.
 
Back
Top