LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2004, 03:42 PM   #1
rajivb
Member
 
Registered: Sep 2004
Location: Bangalore, India
Distribution: Fedora, Ubuntu, WinXP
Posts: 39

Rep: Reputation: 15
copying files in RH9 from 1 internal harddisk to another in same system


hi friends,
i have a problem with Red hat9(shrike).Few days back ,i got a power problem with my motherboard,so i replaced it.From then onwards ,my linux does not boot.It cant recognize my swap partition.So i got another hard disk and installed Red hat9 on it too.

Now can anyone tell me how can i mount my old hard disk partition booting with the new one and new HDD as master and old one as slave?

Last edited by rajivb; 09-22-2004 at 03:43 PM.
 
Old 09-22-2004, 03:51 PM   #2
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
Hi rajivb and Welcome to LinuxQuestions

If you only want to mount it once too get your files and move them to the new harddisk, do as follows. I assume that your new and old harddisk are connected as master/slave on the same IDE channel (same cable). Then your new disk is called /dev/hda and the old one is /dev/hdb

First become root:
su

Take a look at what partitions are on your disks:
/sbin/fdisk -l (This is a lowercase L)
You will (hopefully) see a number of partitions on hda and hdb.

Make a mountpoint (an empty directory):
mkdir /mnt/olddisk

Now, you will have to guess which of the partitions on hdb to mount to find your files:
mount -t ext2 /dev/hdb1 /mnt/olddisk/

Look around at the files in /mnt/olddisk. If this was the right partition, copy the files you need. Otherwise unmount it and try another:
umount /dev/hdb1
mount -t ext2 /dev/hdb2 /mnt/olddisk/
and so on.

Is this enough information?

Good luck!
Martin
 
Old 09-22-2004, 04:14 PM   #3
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
h there below is an extract from a tutorial which i had written for my LUG hope it helps

Mounting Drives


Update /etc/fstab file
This file needs to be updated for if you do not want to mount other partions (e.g. windows partitions)
Every time you start up.
First of all you need to see which partition you want to mount
YOU can see that by running the following command at bash# prompt


#fdisk /dev/hda

If your hard disk is use

Primary master hda
Primary slave hdb
Secondary master hdc
Secondary slave hdd

If you use wrong device then you may get error message such as
"Cannot open device hdc"
If command is successful you get

[root@gaurav qmail]# fdisk /dev/hda

The number of cylinders for this disk is set to 4865.
There is nothing wrong with that, but this is larger than 1024,
And could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):


At this prompt run p single character to see your partition table

Here is the result of my partition table


Command (m for help): p

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 561 4506201 b Win95 FAT32
/dev/hda2 562 3939 27133785 f Win95 Ext'd (LBA)
/dev/hda3 3940 4385 3582495 a5 FreeBSD
/dev/hda4 4386 4865 3855600 83 Linux
/dev/hda5 562 1096 4297356 7 HPFS/NTFS
/dev/hda6 1097 1606 4096543+ b Win95 FAT32
/dev/hda7 1607 3008 11261533+ b Win95 FAT32
/dev/hda8 3009 3872 6940048+ b Win95 FAT32
/dev/hda9 3873 3939 538146 b Win95 FAT32


You can easily recognize which drive you want to mount
Here I have my windows partitions as

devices Windows Partitions

/dev/hda1 C
/dev/hda5 D
/dev/hda6 E
/dev/hda7 F
/dev/hda8 G
/dev/hda9 H


Do not confuse with /dev/hda2
It is my extended partition you cannot mount that whole partition but you can only mount the logical drives in this partition

Here say if I want mount my E drive in Linux
I need to have an empty folder somewhere to mount.
We can make a folder anywhere but as going by the convention we make all the folders and mount them in
/mnt folder
So, go to the mnt folder under root directory
Make a new folder in mnt directory say win_e

If you want to mount it temporarily (till the system is running)
You can mount it by the following command

#mount /dev/hda6 /mnt/win_e


regards
 
Old 10-08-2004, 01:21 PM   #4
rajivb
Member
 
Registered: Sep 2004
Location: Bangalore, India
Distribution: Fedora, Ubuntu, WinXP
Posts: 39

Original Poster
Rep: Reputation: 15
thank u masand and MartinN .It worked.Can u tell me a way if u could the mounting of linux partitions from windows?
 
Old 10-08-2004, 02:21 PM   #5
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

try explore2fs from

http://uranus.it.swin.edu.au/~jn/linux/

regards
 
Old 11-04-2004, 09:23 PM   #6
rajivb
Member
 
Registered: Sep 2004
Location: Bangalore, India
Distribution: Fedora, Ubuntu, WinXP
Posts: 39

Original Poster
Rep: Reputation: 15
thanks masand
 
Old 02-20-2005, 03:12 AM   #7
rajivb
Member
 
Registered: Sep 2004
Location: Bangalore, India
Distribution: Fedora, Ubuntu, WinXP
Posts: 39

Original Poster
Rep: Reputation: 15
hi moderators.i think this discussion won't go further.how can i stop posts from being posted and sametime keep for viewing?
 
Old 02-20-2005, 03:30 AM   #8
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

u need not stop posts coming since anyone might have better idea and he would like to help so he would put his posts here

also someone else might have problem and instaed of starting new posts he would like to follow up here

regards
 
Old 03-09-2005, 11:24 AM   #9
rajivb
Member
 
Registered: Sep 2004
Location: Bangalore, India
Distribution: Fedora, Ubuntu, WinXP
Posts: 39

Original Poster
Rep: Reputation: 15
yes, i understand that.fine thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Installing RedHat 8.0 on Win98 Intel system reboots computer before copying files. livatlantis Linux - Newbie 10 08-15-2004 03:25 PM
RH9 install - incorrect harddisk size detected qsg1049 Red Hat 0 03-05-2004 04:19 PM
RH9.0 Ide harddisk errors dxt Linux - Hardware 1 11-18-2003 05:50 AM
USRobotics internal modem in RH9 daemon_14 Linux - Networking 0 08-06-2003 01:59 PM
RH9 support flash IDE harddisk? captainstorm Linux - Newbie 1 08-04-2003 09:57 AM


All times are GMT -5. The time now is 02:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration