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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-26-2005, 04:07 AM
|
#1
|
LQ Newbie
Registered: Oct 2004
Posts: 20
Rep:
|
Need to migrate data from old HDD
Hi all,
I had a file system error on an old hdd, i now have a new hdd in my server, however i want to migrate the data from my old hdd which is attatched, and i'm completely lost as what to do
The old drive is on the system as /dev/hdc
Can anyone give me a run through on what to do please?
TIA
Jake
|
|
|
08-26-2005, 05:04 AM
|
#2
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
you mount a partition at a mountpoint, access the hdd via the mountpoint and copy data out ont the new hdd...
for this you will only need max 4 commands (i assume)
sfdisk -l #that is a lowercase L
use this to find out which partition of hdc you need to mount
mount
use this to mount the old hdd at a mountpoint
cd
use this to access the mountpoint (the directory under which your old hdd is now accessable)
and finaly
cp
stands for copy :-)
if you need help for either of these commands use man:
man <commandname> ie: man mount
|
|
|
08-26-2005, 10:08 AM
|
#3
|
LQ Newbie
Registered: Oct 2004
Posts: 20
Original Poster
Rep:
|
Hi Nathanael,
Thanks for the reply.
I've mounted it: "mount" returns this for the hdd:
/dev/hdc on /tmp/foo type ext2 (rw)
However, i can't cd to it, it says it's not a directory
Jack
|
|
|
08-26-2005, 10:45 AM
|
#4
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
that is because /dev/hdc is your entire drive... but you need to mount a partition, that is why i mentioned "sfdisk -l" because this will give you a more precise overview of what partition you are looking for, example:
Code:
fdisk -l output:
Disk /dev/hda: 19485 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/hda1 * 0+ 61 62- 31216+ 83 Linux
/dev/hda2 62 1053 992 499968 82 Linux swap / Solaris
/dev/hda3 1054 19484 18431 9289224 83 Linux
/dev/hda4 0 - 0 0 0 Empty
so here you can see that we will not want to mount /dev/hda2 since this is the swap space, hda1 looks ok, but it is too small, and i know that this is my /boot partition so in this case i would want to have a look at hda3. this means i do following:
mount /dev/hda 3 /mnt/foo
|
|
|
08-26-2005, 10:49 AM
|
#5
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
mount to /mnt this directory is exactly for that purpose
mnt for mount
/tmp is only for temporary stuff...
tmp (short for temp) for temporary
:-)
|
|
|
08-26-2005, 10:50 AM
|
#6
|
LQ Newbie
Registered: Oct 2004
Posts: 20
Original Poster
Rep:
|
Hi,
Ok i've done that, now i've got /mnt/foo with just lost+found hehe.
Mounted ok, but sfdisk -l doesn't return a /dev/hdc option
fdisk -l returns it, but says
Disk /dev/hdc: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk /dev/hdc doesn't contain a valid partition table
Jake
|
|
|
08-26-2005, 11:09 AM
|
#7
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
what does fdisk -l give you?
or try using part /dev/hdc
hit p for the part. table
and hit q to exit
Last edited by Nathanael; 08-26-2005 at 11:10 AM.
|
|
|
08-26-2005, 09:22 PM
|
#8
|
LQ Newbie
Registered: Oct 2004
Posts: 20
Original Poster
Rep:
|
fdisk -l returns:
Code:
[root@*]# fdisk -l
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 144 1052257+ 82 Linux swap
/dev/hda3 145 9729 76991512+ 83 Linux
Disk /dev/hdc: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk /dev/hdc doesn't contain a valid partition table
Part doesn't do anything
Jake
|
|
|
08-27-2005, 05:22 AM
|
#9
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
Quote:
Disk /dev/hdc doesn't contain a valid partition table
|
you might be better off trying this the other way round... try booting up from you old hdd, if that should work you can mount the new hdd (you will want to mount /dev/hda3)
but unless you have a backup of you parition table, i currently assume you dont, you will not be able to retrieve any data at all! (that is waht i think)
another bet woult be to google for 'doesn't contain a valid partition table'
sorry about that.
|
|
|
08-28-2005, 04:23 PM
|
#10
|
LQ Newbie
Registered: Oct 2004
Posts: 20
Original Poster
Rep:
|
the old hdd isn't bootable unfortuantely.
Ah well, nevermind
THanks for your help though! much appreciated
Jack
|
|
|
All times are GMT -5. The time now is 06:28 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|