![]() |
Please help me
I am trying to add a script to mount my hd without having to go through root everytime. I have been using thoughfix's scripts, but I cannot figure out how to add the lines to /etc/sudoers. Also, I am not sure what to do with the scripts that start with "echo". I have VIM installed, but not sure what to do. Please help me out.
|
Re: Please help me
If you don't know how to use vim (and really, no one would blame you) I suggest installing nano (apt-get install nano). then just become root and run:
Code:
nano /etc/sudoersGood luck! -John |
Re: Please help me
Ok I figured out how to add the lines. But what do I do with the "echo" lines?
|
Re: Please help me
You want to add a line to /etc/fstab that includes the users keyword so that a normal user can mount the drive. The syntax of the line is six fields separated by whitespace (spaces or tabs and it doesn't matter how many) The fields are:
A few examples: On my linux box there is a line in /etc/fstab like this /dev/sdb3 /mnt/fat1 vfat auto,users,rw,exec,umask=000 0 0 which mounts the third partition on my second harddrive to the /mnt/fat1 directory. On my 770, the mmc card has several partitions. The first one is a FAT32 partition and is automatically mounted at boottime with this line in /etc/fstab: /dev/mmcblk0p1 /media/mmc1 vfat rw,noauto,nodev,nosuid,utf8,uid=29999 0 0 More info on the fstab file and the mount command can be found by Googling for their manpages. Once you have the proper line in /etc/fstab, you can mount the device by referring to the mountpoint i.e. "mount /mnt/fat1" |
Re: Please help me
So if I add a line to the fstab like this it should work?
/dev/sda1 /media/mmc1/hd vfat rw,auto I am not sure what the nodev and the nosuid are or should be. I would like it to automount on boot, if that is possible. I had read posts earlier about not being able to auto detect unlike the mc. Thanks for the help so far. |
Re: Please help me
Ok I was just doing some more reading, if I use this line will it work
/dev/sda1 /media/mmc1/hd vfat rw,auto 0 0 the hd is sda1 it will be mounted at media/mmc1/hd and I want it to auto mount on boot. |
Re: Please help me
If you don't know how to use vim (and really, no one would blame you)
Wanna bet? ;-) I took the bait and climbed the learning curve to learn vim and I've never been able to find an editor that I like better since. I write code, articles, email, you name it... all in vim. A few times a year I try whatever is new, but find myself wanting, no *yearning*, for my modal editor, my super-helpful, ultra-fast, very productive, vim. Those who press ESC in a web text box or hjkl or $ or ESC shift a before realizing that they don't have the power of vi(m) at hand ... well, you know what I mean. More seriously though, a basic understanding of vi(m) is useful; you can edit on any *nix box regardless of what might/might not be installed, vi almost always is. You don't have to drink all the koolaid to be productive enough for the odd task that comes along. |
Re: Please help me
I would use /media/hd instead of /media/mmc1/hd because your mmc card gets mounted at mmc1. But it might work. Also add users to the option list to allow non-root users to mount the device. As far as auto mounting at boot time, that depends on whether or not the usb host mode stuff is up and running before the mount -a happens. If it doesn't automount, just run mount -a.
/dev/sda1 /media/hd vfat rw,auto,users 0 0 should work. |
Re: Please help me
Thanks alot, I will try that and let you know. Do I have to do anything else to view the hd after it boots?
|
Re: Please help me
when I type mount -a it tells me that it failed:invalid argument
|
Re: Please help me
Does the mountpoint exist?
|
Re: Please help me
yes the directory is there.
|
Re: Please help me
ok I changed from auto to noauto and the invalid argument when away but it still does not mount the drive
|
Re: Please help me
try mount /media/hd
|
| All times are GMT. The time now is 21:22. |
vBulletin® Version 3.8.8