• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Copying hard drive

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

rogerdugans

Linux challenged Senior, not that it stops me...
Joined
Dec 28, 2001
Location
Corner of No and Where
I am moving stuff around in order to make a second LAN rig and have a slight problem-

One machine was built with a 15gb laptop drive and then had Gentoo installed; all went well and the machine is fine and ready to go as far as software configuration is concerned.

I have a 40gb desktop drive that I want to use for the rig. I did some research/planning prior to the install of Gentoo and used ext3 filesystem so I could resize afterwards and use the whole drive, but it isn't working right- "bad magic number error" and similar; simply put, my 40gb drive only has 15 usable gigs of space after copying the other drive.
I still have the laptop drive setup so all that data is fine.
I am running on the desktop drive just fine.

If anyone has a method of either
getting the desktop drive size correct so I have 40gb
or
copying the laptop drive install to the desktop drive and keeping the full size of the 40gb drive

I can do either.

At this point, I have tried everything I can google up and this is the closest I have been able to come to having it right.

I have a few other things to mess with on the rig, so it will be down for an hour or so today but other than that I can redo whatever is needed.

If I can't get this straightened out then I will be reinstalling Gentoo starting this evening. ;)
(Gotta be ready for the LAN next weekend.)
Not that big a deal, really, but I kinda like the idea of figuring out how in HECK to get this copy/resize done.

Any help is appreciated. :)
 
have you tried emerging qtpart and resizing using that? otherwise when i switched my 60 gig to an 80 gig i just formated and flat out copied everything plus permisions over to the new drive and it ran just fine. If i remember correctly i used dd but i could be mistaken on that since it was a while ago that i did it.
 
why not just mount another filesystem and call it data. you can then move all your data there and still be using the whole disk.
 
What I did with my fileserver a while back was this. I had a 6 GB old disk that I wanted to move off of and a 60 GB WD JB drive that I wanted to move everything to. So I booted Knoppix and partitioned out the drive as I wanted the end result (identical /boot and swap partitions and remainder of drive is / partition).

Old drive was mounted as /mnt/hda1 and /mnt/hda3. New drive was mounted as /mnt/hdk1 and /mnt/hdk3.

cd /mnt/hda1
cp -ax * ../hdk1

cd /mnt/hda3
cp -ax * ../hdk3


(cp -ax preserves file ownerships, timestamps and permissions)

From there, I mounted the partitions and bindmounted /proc so I could chroot in (according to the Gentoo install guide) and ran the grub install steps to ensure grub was correctly pointing to the new drive. After that you also have to update your /etc/fstab if your device names change. I think that was everything I did...

I still have the old drive in my system with grub installed on it - but that's because I discovered my RAID card wasn't bootable after the fact (and I wanted to run the drive on an ATA100-capable controller and not an ATA-33 controller).
 
I tried parted/qtparted but they both see the error as far as disk size (what it reported and what it IS) and refuse to touch it. ;)

engjohn said:
why not just mount another filesystem and call it data. you can then move all your data there and still be using the whole disk.

The rest of the hard drive space is not visible right now.
That was actually one of the things I thought I might be able to do, but it didn't work out that way. :(

Sickboy- your method is similar to one I tried while chatting with Sewerbeing. The syntax is slightly different though......
I'll try anything once .;)

I just installed my newly water cooled video card and installing UT2K4 (so I can test it) again since its crashing right now....

As soon as that is done I'll give that a shot. :)
 
Try the System Rescue CD.

It has qtparted on it and I've used it several times to resize partitions. The only bad experience I had was after resizing a ReiserFS filesystem, I had to run the most thorough disk check on it, which took a couple hours. The data was fine, of course, the OS just insisted on a disk check. I've resized lots of other partitions, lots of times, and never run into any problems. That time was just some kind of fluke, I guess.
 
Thanks for all the help, folks!

I am sad to report, howver, that I pulled a bonehead move last night while doing too many things at once:

I deleted the install I was trying to copy. :(

So it is a new install for me after all that anyway....
 
Back