LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-13-2005, 11:23 PM   #1
theFez
LQ Newbie
 
Registered: May 2005
Posts: 1

Rep: Reputation: 0
copied hard drive install not completely recognized


so, i have a linux system that has a couple drives in it, one was a 30 Gb data drive mounted under /opt. The other is 80Gb and has the os installed on it. (FC2 if it matters) At one point i had slack and redhat installed on the system so i got in the habit of keeping data on /opt so i could share it between the two os.

I filled up the 30Gb and just got a 300Gb drive to replace it.

I put a knoppix disc into the cd rom, pulled the 80Gb drive, installed the 300Gb drive in it's place and rebooted. so i had the 300 on hda and the 30 on hdb.

Knoppix fired up, I used Qtparted to partition the new 300Gb drive, setting /opt to hda1.
then used dd to copy the data from the 30 drive to the 300.
Code:
dd i=/dev/hdb1 o=/dev/hda1
an hour or so later it finished up. Looking at the drives under QtParted it showed the 300Gb dirive with 30 gb of data on it, looked good. fdisk was recognizing the full 300 Gb.

so i shut down the computer, pulled the 30 Gb drive, put the 300 in it's place, replaced the 80 GB drive and booted up. I was proud as hell when it booted right up and the data was all there. I started transferring some data that was stored on the 80 Gb drive over and got an error that the drive was full. du shows it only has about 30 Gb on it and fdisk shows a 300 Gb drive, but I can't put any more than 30 on it.

here is the output from fdisk
Code:
[marc@moonlight ~]$ sudo fdisk -l /dev/hdb

Disk /dev/hdb: 300.0 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1       36481   293033601   83  Linux
Anyone have any idea what I did wrong? I'm guessing that the FC2 OS doesnt know the disk is any differnt, but I'm not sure why or what to do about it.

Thanks!
~marc
 
Old 05-13-2005, 11:36 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Re: copied hard drive install not completely recognized

Quote:
Originally posted by theFez

Anyone have any idea what I did wrong? I'm guessing that the FC2 OS doesnt know the disk is any differnt, but I'm not sure why or what to do about it.

Thanks!
~marc
Yes dd makes an exact copy of the entire structure so in effect you made a 300gb drive into a 30gb. Try this (c)fdisk the 300gb drive and partition it again, then format with the file system you want on it. Now with your Knoppix disk at the console/in console window.

Code:
sudo mount /dev/hda? /mnt/hda?
sudo mount /dev/hdb1 /mnt/hdb1
sudo cp -Rp /mnt/hdb1/* /mnt/hda?/
And that should copy the data with the correct permissions to the partition you created on the /dev/hda?, replace ? with the partition number you created. You may want to make sure that the DMA is turned on for your hard drive(s) check with hdparm /dev/hd? if not then hdparm -d1 /dev/hd? to set again replace the ? with the letter you need.

Last edited by HappyTux; 05-13-2005 at 11:39 PM.
 
Old 05-14-2005, 10:41 AM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,141
Blog Entries: 6

Rep: Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828Reputation: 1828
Here's quite a bit of detail.

http://www.rajeevnet.com/hacks_hints...s_cloning.html
 
  


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
How to completely reset the hard drive Systemsy Debian 19 10-07-2005 11:43 PM
Completely copy hard drive... markw8500 Linux - Software 3 08-21-2005 04:42 AM
Can LFS be copied from 1 hard drive to another after the build? rblythe Linux From Scratch 3 06-18-2005 11:40 AM
file get renamed when copied to external hard drive pgajeski21 Linux - Hardware 11 04-15-2004 10:33 AM
Hard drive not recognized te_conway Linux - Hardware 7 02-03-2003 04:23 PM

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

All times are GMT -5. The time now is 01:12 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