Sponsored Content
Full Discussion: Effects of /etc/fstab file!
Operating Systems Linux Red Hat Effects of /etc/fstab file! Post 302666019 by Corona688 on Tuesday 3rd of July 2012 02:08:23 PM
Old 07-03-2012
Unlike your registry however, it can be rewritten from scratch by hand in a reasonable amount of time. Use things like fdisk and such to find all your partitions, mount them in a restore disk to figure out which is which, and write entries into your fstab like so:

Code:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1               /boot           ext2            noatime         1 2
/dev/sda3               /               ext3            noatime         0 1
/dev/sda5               /var            ext3            noatime         0 1
/dev/sda6               /usr            ext3            noatime         0 1
/dev/sdb1               /home           ext4            noatime         0 1
/dev/sda2               none            swap            sw              0 0

/dev/cdrw               /mnt/cdrom      iso9660         noauto,ro,user  0 0
/dev/fd0                /mnt/floppy     auto            noauto,user     0 0

# NOTE: The next line is critical for boot!
proc                    /proc           proc            defaults        0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm                     /dev/shm        tmpfs           nodev,nosuid,noexec    0 0

Of course, yours won't be exactly the same. The partition types, device names, and numbers will all differ, not to mention you won't have the same layout either. But that's how it works.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Effects of grep -o when it's not available

I'm on a Solaris box that doesn't have -o as an option for grep (trying to return match only). Is there any way to get this functionality without the -o option? I've tried both sed and awk doing something like: echo "this is a test" | awk '/test/' or echo "this is a test | sed '/test/p'... (8 Replies)
Discussion started by: earnstaf
8 Replies

2. Red Hat

edit/write the /etc/fstab file

Hi, I comment out some vol group in fstab accidentally. I also comment the swap space in /etc/fstab But I cannot edit /remove it back by using vi /etc/fstab again in init 1 and init 6 . The file system /etc/fstab is read -only . I cannot chmod ..... What can I do in order to recover it ... (2 Replies)
Discussion started by: chuikingman
2 Replies

3. Red Hat

3D effects on RHEL6 OC

Hello, I just installed RHEL6 OC on my T61p. It's great! Just for fun I'd like to use some fancy cool Desktop effects. I tried to enable 3D Desktop effects from OC Welcome Center but it gave me error message: Accelerated 3D graphics is not available. Desktop effects require hardware 3D support.... (7 Replies)
Discussion started by: susja
7 Replies

4. Red Hat

3d effects in rhel6

I installed rhel 6.0 in my laptop but it is not upporting 3d graphics of rhel6 and i am getting an error message "Accelerated 3d graphics not available Desktop effects require hardware 3D support." my laptop is dll studio 1558 and my graphic card is ATI Radeon 5470 with 1 gb dedicated ram. (6 Replies)
Discussion started by: nileshgupta
6 Replies

5. IP Networking

effects of bin file stored in nfs & run as daemon

Hi, Good Day, I had this question in my mind.Hope someone can give me his/her thought about it. Question: I had a binary files stored in the nfs system and mounted several workstation locally and running as deamon. Is there in effect to the networks or any problem me arise regarding network... (3 Replies)
Discussion started by: jao_madn
3 Replies

6. Ubuntu

Ubuntu encryption and its effects

How will Full Disk encryption effect how open-source software is compiled and run using ubuntu 14.04. Are there alternatives that are recommended? Thank you :). (0 Replies)
Discussion started by: cmccabe
0 Replies

7. Shell Programming and Scripting

How to replace value in fstab file?

Hi, I am looking to replace value (fifth and sixth ) column to "0 0" in /etc/fstab file by scripting. can any one please help me. /dev/VolGroup00/tmp /tmp ext3 defaults 1 1 (2 Replies)
Discussion started by: yash_message
2 Replies

8. Ubuntu

Create zip file from root owned fstab

I want to zip up my fstab file for backup purposes. This does not work because of permission issues. cd /etc/ zip -u fstab.zip fstab Can I use this with zip? echo xxx | sudo -S or change fstab owner to me? (3 Replies)
Discussion started by: drew77
3 Replies
GETFSENT(3)						     Library Functions Manual						       GETFSENT(3)

NAME
getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent - get file system descriptor file entry SYNOPSIS
#include <fstab.h> struct fstab *getfsent() struct fstab *getfsspec(spec) char *spec; struct fstab *getfsfile(file) char *file; struct fstab *getfstype(type) char *type; int setfsent() int endfsent() DESCRIPTION
Getfsent, getfsspec, getfstype, and getfsfile each return a pointer to an object with the following structure containing the broken-out fields of a line in the file system description file, <fstab.h>. struct fstab { char *fs_spec; char *fs_file; char *fs_type; int fs_freq; int fs_passno; }; The fields have meanings described in fstab(5). Getfsent reads the next line of the file, opening the file if necessary. Setfsent opens and rewinds the file. Endfsent closes the file. Getfsspec and getfsfile sequentially search from the beginning of the file until a matching special file name or file system file name is found, or until EOF is encountered. Getfstype does likewise, matching on the file system type field. FILES
/etc/fstab SEE ALSO
fstab(5) DIAGNOSTICS
Null pointer (0) returned on EOF or error. BUGS
All information is contained in a static area so it must be copied if it is to be saved. 4th Berkeley Distribution May 12, 1986 GETFSENT(3)
All times are GMT -4. The time now is 04:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy