• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Mounting

katinka

n00b
Joined
Aug 10, 2005
Messages
10
Instead of mounting my windows partition every time I boot FreeBSD, can I put the mounting formula in a file of some kind?
 
Yes, you can.
The relevant file is /etc/fstab, and a line like this should work:
Code:
/dev/ad0s1    /mnt/windows    ntfs     ro    0    0

If it's FAT, use "msdosfs" instead of "ntfs". FAT will also support "rw" instead of "ro". (Read/Write vs ReadOnly.)
 
Could some tell me quickly what each "section" of this command "/dev/ad0s1 /mnt/windows ntfs ro 0 0" means? Might be a stupied question but i'm just trying to get into the linux scene.

steve




HHunt said:
Yes, you can.
The relevant file is /etc/fstab, and a line like this should work:
Code:
/dev/ad0s1    /mnt/windows    ntfs     ro    0    0

If it's FAT, use "msdosfs" instead of "ntfs". FAT will also support "rw" instead of "ro". (Read/Write vs ReadOnly.)
 
I'll just blindly assume that linux's fstab looks the same:
The first field is the device you want to mount. (ad0s1 is the BSD version of hda1, the first partition of the first HD.)
The second is the mount point. It should exist and be an empty directory.
(When the device is mounted, the contents will appear to be inside this folder.)
The third is the file system type: NTFS, FAT, ReiserFS, ext2/3, UFS, etc. Linux often supports "auto" as well.
The fourth is the options: I've explained rw and ro, but there's several others. The perhaps most useful other one is "noauto", which means "don't mount this at boot time". If add a line for your CD reader with "noauto" in the options, you can then mount it with "mount /mnt/cdrom" (or whatever you put as the mountpoint), which saves you some typing.

The last two fields are Dump and Pass: Leave them at 0 for non-essential lines.
Dump works with dump(8), a backup tool. Unless you use it, it's not important.
Pass determines when to fsck the device at boot (if neccesary). 1 for the root FS, 2 for the other important ones, 0 for the ones you don't want to (or can't) check, like NTFS partitions.

It looks like this is a rather stable format: The FreeBSD manpage for fstab was last updated in 1993. (And according to the History section of it, fstab first appeared in 4.0BSD, which is roughly 25 years old by now.)

edit: I checked, and the BSD manpage seems to agree with the Linux one, so the above applies equally well to both.
 
Thank you :)

Is there any chance I can do the same with the telnet I have to use to get internet access?
 
Should be doable. The exact steps depend on what exactly you do over that telnet link. If you just have to connect, or send a single piece of text, it should be fairly easy to script, while something with usename/password-dialogs and the like requires heavier tools.

As for getting that script to run at boot time, the correct solution would be to make a minimal BSD-style boot script, put it in /usr/local/etc/rc.d (and make it executable), and add the apropriate line in /etc/rc.conf . I'll have to try it for myself before I can give a more useful example.
 
Hm, it's the type with username and password. I guess I don't really need to get this done, but it would be quite fun :p
 
Back
Top