Which editor for fstab?
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. |
Quote:
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. |
/etc/fstab
Try mounting the new entry in fstab while the machine is running, also you can do a 'mount -a' to mount everything in the /etc/fstab but it is the safest to just sudo mount /new-entry you created so if you have a problem you can modify what you changed.
|
Quote:
Answer: any text editor--not a word processor. kate, kedit, gedit, nano, vim, emacs,....etc. etc. etc. |
Quote:
Also, thanks to whoever gave the tip to try out the new entry before I reboot to be sure everything is working ok. |
etc/fstab
Quote:
In other words, do I need to hit the Enter key after making an entry or does that matter? |
Quote:
|
Quote:
Just be sure to make the correct syntax so it will mount correctly. |
Quote:
Edit: I find nano the easiest to edit from a terminal, and kwrite is good if you need to copy text from another file. |
Given that vi has been the default editor on Unix for yrs and is often symlinked to vim these days, I'd be surprised if it wasn't there. Usually is on RH anything.
|
Quote:
I had never copied a 'livecd' to disk before and it turns out it is stripped down but you can customize your install leaving out a lot of unneeded items and get the latest packages without having to download 500M worth of updates. scott |
Quote:
Code:
#su |
Quote:
It's not on my Editors menu. All I see there are Kwrite, KEdit and Kate. |
vi won't be in the menu. It's a terminal editor. Same with anything that is strictly run from the CLI.
|
Quote:
They probably figure that since vi(m) is such an advanced editor that if people want it, they can go get it after installing the Live CD. |
All times are GMT -5. The time now is 05:44 PM. |