LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 01-22-2008, 06:36 PM   #1
PAB
Member
 
Registered: Jun 2003
Posts: 44

Rep: Reputation: 15
moving to larger hard drive - having problems


i'm using fedora 5. i've purchased a new hard drive (160GB) and want to move the contents of the old drive (40GB) to the new one. i've read a number of posts and information on this, but i'm still new to this and am having problems.

i did g4u first, and that worked excellent. however, as noted in a number of posts, the new hard drive partitions only used up 40GB of the 160GB. if i could understand how to resize the partitions afterwards, i would do that. however, i couldn't, so i started from scratch.

i used qtparted to make the new hard drive EXT3 for the boot section, followed by EXT3 for the majority of the size, followed by a swap of 1GB. the old drive had EXT3 for the boot section, followed by about 39 GB for the data, listed as LVM (or 8e in Fdisk).

i then mounted it as "new-disk" on the old drive, and used the following commands to move it over (in single user mode):

cp -a /boot /bin /etc /dev (all other folders) /new-disk

i created /new-disk/proc

i went into qtparted and set the first partition as active.

then, i shut down, unplugged the old hard drive, put the new on in its place, and then restarted.

i get a screen that says "GRUB" and that's it.

i can see the grub folder in the /boot section of the new hard drive.

am i missing something here? i'm assuming quite a bit, but maybe it is something small.

if someone could help me out a little, that would be great. i feel that it might be something to do with how i've partitioned everything. i realize that i have to get everything the same on both disks.

is the /boot partition the only partition that needs to be in the first section of the hard drive?

any suggestions are appreciated. Thanks!

PAB
 
Old 01-22-2008, 07:09 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Ok with your setup I would do the following. Mirror the drive with Ghost 4 Linux as you did. Then you you need to boot with install cd and type ' linux rescue '. Let it mount the partition and type this command once system is mounted ' chroot /mnt/sysimage '. Now type the command ' grub-install /dev/hda ' for IDE since using fc5. Exit and reboot without the cd install.

Normally /boot is its own ext3 partition if you let the system do the partitioning for you. Then the rest is a LVM partition. Now the 40gig LVM cannot be change in size with any tools from gparted that I know of. But what you can do is create a new LVM with the remaining space and then merge the two into one. I have not mess with LVM much because of issue I see if certain things go wrong. I only use real partitions.

Brian
 
Old 01-22-2008, 08:56 PM   #3
PAB
Member
 
Registered: Jun 2003
Posts: 44

Original Poster
Rep: Reputation: 15
thanks brian for your response. when i used g4u, i didn't have a problem with grub or anything else, except that i didn't have access to about 120 gb of my drive. that's why i did what i did with the cp command, which then created the problem with grub.

just so i'm clear, are you suggesting
1. using G4U, then making the remaining 120GB of my drive as an LVM partition, and then merging? or;

2. using the HD that i have now (with the Grub error) and using the install CD to install Grub on it?

i can try either, but am just checking.

btw, i did try to make the 120GB into an LVM using Fdisk after using G4U (which is why i knew it is partition type 8e), but was getting an error message (i wished I wrote it down).

are there any tutorials on how to do this that anyone can suggest?

thanks!

pab
 
Old 01-23-2008, 05:07 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
I myself don't like LVM but you have to use the LVM tools to do the creation and Logical volumes. For the whole 120mb partition I guess fdisk can create and you assign it the type it is. Or you can use a gparted live cd to do the making of the partition. For the grub issue I would do the boot into rescue mode and do as I mention.

Brian
 
Old 01-23-2008, 08:25 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,959

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Go back and use g4u if it worked. Then either use the LVM tools to expand the pv, or create a new partition and add that as a new pv. Then grow the vg/lv, then resize the filesystem.
tldp.org has a good LVM guide, and redhat used to have some good articles as well (note I'm also not a LVM user).
 
Old 01-24-2008, 11:55 AM   #6
PAB
Member
 
Registered: Jun 2003
Posts: 44

Original Poster
Rep: Reputation: 15
thanks both of you for your replies. i tried using the LVM tools and got an error message with lvextend. upon searching, i found that there is a an old bug in lvm. so, i'm upgrading to fedora 8, which seems to have caused another problem, which i'm going to post in a new thread.

pab
 
Old 01-24-2008, 04:35 PM   #7
PAB
Member
 
Registered: Jun 2003
Posts: 44

Original Poster
Rep: Reputation: 15
well, i've gone back to the cloned system and have been able to work around the error to keep my system as is (as I was having problems with the upgrade/install of FC8). i've been able to get the system to recognize the added space.

here is what i've done (as best as i can remember).

-installed new disk as a slave
-used g4u. used command "copydisk wd0 wd1" after using command "disks" to verify that wd0 is old and wd1 is the new one. waited for the transfer to finish (about 30 minutes for 40GB)
-installed the new disk as the master and removed the old disk.
-went into terminal as root. "fdisk /dev/hda"
-created a new partition for the free space that wasn't recognized (used the commmand "n"). primary partition, with the next highest number (used fdisk -l to figure that out). rest of the values were the default values.
-next command was "t". then entered the partition number that i just created. then used hex code of "8e" which is LVM.
-then "w". i did get an error message (error 16 - system busy) but it still worked out.
-then used the gui to alter the LVM. you get there by typing, in terminal, "system-config-lvm".
-in the gui, you see on the left hand side a section that i believe said "uninitiated". click on that and then click on the partition just created. then click on the button on the bottom that states "initialize" or something like that.
-then that partition is moved up to a section that i believe is "unallocated". click on that, and then the partition again. then click on the button to add it to the volume group.
-close out of the gui.
-back in the terminal, i did "vgdisplay". looked at the "VGsize" part and noted that it was 140.91gb.
-typed "lvextend -L140.91G /dev/VolGroup00/LogVol00". this is where i got the error messages that kept me from continuing. it stated that there was insufficient space. so, i just decreased the size from 140.91 to 140, and it worked.
-typed "ext2online /dev/VolGroup00/LogVol00". waited for a bit. then it completed. i was able to see that i had access to the full drive now.

hope this helps. as i'm new to this, i don't understand it well myself but thought that, since i see a lot of LVM posts ending without help or beginning with "i don't use LVM myself but...", i thought that this might help someone else who's having a problem.

pab
 
Old 01-24-2008, 06:16 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,959

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Nice - now everyone can stop asking ...
Easy ....
 
Old 01-26-2008, 11:28 AM   #9
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Very nice to post a fix for others to use if they have the same issues.

Brian
 
  


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
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 10:19 AM
Moving LVM partition to larger hard drive blainehilton Fedora 2 11-20-2007 03:36 PM
Migrating to larger hard drive SlowCoder Linux - General 7 05-20-2007 05:08 AM
Moving to a larger drive eric_marsh Linux - General 6 12-07-2006 11:32 PM
Migrating FC5 Default Install to Larger Hard Drive GadgetWiz Fedora 4 10-03-2006 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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