LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-29-2003, 09:04 PM   #1
kurtsimons
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Rep: Reputation: 0
Mounting 2nd Hard Drive


My linux computer would no longer boot, so I bought a new hard drive and installed from scratch. (RedHat 9.0)

Now I want to add my old drive as my 2nd hard drive and see if I can copy some NEEDED files off of it.

My BIOS sees the new drive.

fdisk -l shows the drive as /dev/hdb

the "drive" I need is
/dev/hdb5 (a "linux" file type)

what do I do.

I added to /etc/mtab the follow line
/dev/hdb5 / ext2 rw 0 0

then it let me mount it
mount /dev/hdb5

now how do I see it? or am completly wrong?

thanks

- kurt
(programmer playing with hardware)


Last edited by kurtsimons; 08-29-2003 at 09:07 PM.
 
Old 08-30-2003, 01:34 AM   #2
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
Never, never, never edit /etc/mtab directly. That file is used by the OS to keep track of what is mounted at the time. Doing so can cause major damage. The file you want to edit is /etc/fstab. "mount" and "umount" use this file to know when, where and how to mount your partitions.

You should make an a directory for the old disk to mount to, e.g. /mnt/old_disk, and make the appropriate entry in /etc/fstab:
Code:
/dev/hda5    /mnt/old_disk     ext2    defaults, ro     0     0
Mount it readonly at first just in case. You might think about running e2fsck on it too. Check the man pages info on that.
 
Old 08-30-2003, 09:18 PM   #3
kurtsimons
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
never edit the mtab file ugh. Is that why i just spend the day reinstalling?

I'm still confused on what to do.

my 2nd drive is seen as /hdb but you said to mount /hda5
 
Old 08-30-2003, 09:55 PM   #4
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
Right, substitute for /dev/hda5 in the instructions above with whatever the drive has become. Try running

# fdisk -l /dev/hdb

That will give you a list of all the partitions.
 
  


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
mounting 2nd (sata) hard drive on 10.1 rob0t Slackware 6 08-15-2005 04:05 PM
2nd hard Drive grabro Linux - Hardware 1 02-05-2005 05:49 AM
mounting 2nd hard drive on ibm T41 with redhat 9.0 sefzik Linux - Laptop and Netbook 12 09-06-2004 09:56 PM
Problem mounting ext3 filesystem on 2nd Hard Disk judgedeath2 Linux - Hardware 2 08-16-2004 09:43 AM
2nd hard drive naflan Debian 4 02-22-2004 02:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:24 PM.

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