LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 02-09-2004, 01:36 PM   #1
mimsmall
Member
 
Registered: Dec 2003
Location: FL
Distribution: Fedora
Posts: 79

Rep: Reputation: 15
/etc/fstab


When I view RedHat, System Tools, Disk Management my second HD, hdb, doesn't show up. Can I edit my /etc/fstab file to make this happen. This process was not included in my Red Hat Linux, The Complete Reference, $49 retail book. What I want to be able to do is get files from one distro, edit them in RH8 and send the back.

Here is my /etc/fstab file.

LABEL=/1 / ext3 defaults 1 1
LABEL=/boot1 /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/hdb3 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
 
Old 02-09-2004, 01:46 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
yup, just add your drive like:

file system dir type options dump pass

for example,

/dev/hdb /mnt/hdb vfat user,noauto 0 0

that's harddisk B, mounted to /mnt/hdb (which must exist! so create it) using vfat-filesystem (windows; for linux, put ext2/3/what it is). user means that user can mount/unmount it (not only root) and noauto that it's not automatically mounted (you may leave it off)

EDIT:

for the options etc. you might want to look fstab's man-page (in terminal, type "man fstab" without quotes). there is everything you need to know...the line you add is the type the one above, just put in your own paths and options..when you've edited, reboot your machine and fstab is read and you can use your new disc. if it's hdb you need, then /dev/hdb should be the device. just create a directory called hdb (or whatever) in /mnt/ and put it into your fstab (like above), then tell fstab the filesystem of the disc (windows uses vfat usually) and give options. usually user,noauto,owner is enough...and dump/pass can be given as a 0 0.

if some error happens or you mistype something, nothing gets destroyed...it's just that usually you get an error message while booting, telling about this, and that the disc cannot be read/written from your linux until you fix fstab. everything else works

btw. if the disc isn't automounted at boot (you tell fstab not to automount it), you can mount it manually in terminal:

Code:
mount /dev/hdb /mnt/hdb
still you need an entry in fstab to get this work. I guess leaving the noauto-option off makes your linux mount it automatically..then just set the permissions for users/groups so that they can access the drive as you wish and it's there... here's quite a lot of text but the thing is easy to do sorry I over-guided a bit...got excited...

Last edited by b0uncer; 02-09-2004 at 01:56 PM.
 
Old 02-09-2004, 03:22 PM   #3
mimsmall
Member
 
Registered: Dec 2003
Location: FL
Distribution: Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
Thanks, the drive shows up in Disk Management. I'm working on getting the files from hdb to hda.
 
Old 02-10-2004, 10:19 AM   #4
mimsmall
Member
 
Registered: Dec 2003
Location: FL
Distribution: Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
Thanks everyone for helping. I put what worked for me in the newbies forum.
 
Old 02-10-2004, 03:39 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
/dev/hdb /mnt/hdb vfat user,noauto 0 0

wow, that's quite quite wrong.... you can't mount an entire drive, you can only mount partitions, e.g. /dev/hdb2
 
Old 02-10-2004, 03:40 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
and mimsmall, please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php
 
Old 02-13-2004, 09:03 AM   #7
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
acid_kewpie, yes that's true...it was meant to be an example sorry I wrote it in quite a hurry...but I guess mimsmall figured it out if he read the manpage related to mount or fstab..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
newbie vs fstab. fstab wins :( blop Linux - Newbie 3 01-07-2005 05:54 AM
What is fstab? sceadu Linux - Newbie 2 11-02-2004 07:25 PM
(version 5.1 chapter 08 fstab) vs (man fstab) rgiggs Linux From Scratch 2 06-03-2004 05:55 PM
Help with /etc/fstab wawosz Linux - General 3 04-24-2003 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration