Quote:
Originally Posted by 9nine9
I installed Fedora 8 from a Live CD so it doesn't look like I have too many editors. Kate and KEdit.
Can I edit etc/fstab with either of these editors without worrying about them inserting characters I don't want?
And do the columns have to be lined up perfectly in fstab?
Do you separate each column with a tab, a space or what?
What I'm trying to do is make mount entries for my floppy drive and my CDROM. Neither of these entries was created during my installation.
|
You can use 'vi' or I personally like 'vim' I had never used vim editor before I went to take my RHCT course in November of this year and PASSED!
I would try using 'vim' because it highlights the text color and you can find typo errors easier than just plain vi.
If vim is not installed yum install vim and it will find all of the dependencies for you.
The fstab was a difficult subject for me to, the spacing does not have to be perfect for example lets say if you wanted to use fdisk to create a new entry for /data. Remember you have to 'as root or sudo' mkdir /data in order for the ability to mount the actual partition on the system.
[scottg@DELLF8 ~]$ sudo vim /etc/fstab
then you can use the keyboard keys or arrows to go to the last line and type a '
o' alphabet and it will start you on a new line.
The columns do not have to line up perfectly it is more of a nicer way to view it, so if a column is not perfectly in line with the one above or vise versa it will not affect the system. Remember to try mounting this after you save your changes always or you may get into a machine that will not boot up.
mount /data (like the example I used about mounted the test /data partion I created that was 100M in size)...
[scottg@DELLF8 ~]$ sudo cat /etc/fstab
LABEL=/1 / ext3 defaults 1 1
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/var /var ext3 defaults 1 2
LABEL=/home /home ext3 defaults 1 2
LABEL=/usr1 /usr ext3 defaults 1 2
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=SWAP-sda8 swap swap defaults 0 0
LABEL=/data /data ext3 defaults 0 0
[scottg@DELLF8 ~]$
The formatting is more for neatness just use tab and try to get it close to the original but it will not be affect it ability to mount the cd or a new parition/logical volume.
Also by the way you can sudo yum -y install autofs (it is the automounter and it i will automount cd's or other items as a NFS or anything else you can add to the /etc/fstab...
Hope this helps.