Linux - HardwareThis 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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Obviously the new drive is about 140GB larger than the old drive.
If any partition contained just files I would simply copy the files.
If I was attempting to recreate an OS I would first run "cfdisk -Ps /dev/hda". I would create partitions on the new drive (again with cfdisk, which I prefer) slightly larger than on the old drive (just to be sure).
I would use the "dd" command on each partition. "dd if=/dev/hda1 of=/dev/hdb1" or such.
This should recreate each partition and leave you with the extra space on the new drive which is probably what you want to do.
EDIT: You would want to be sure you had an alternate boot method for at the very least one of the operating systems to be able to create the boot manager options you want.
EDIT2: You should not need to get too involved with a swap partition.
Last edited by 2damncommon; 11-22-2005 at 12:50 AM.
Originally posted by 2damncommon Obviously the new drive is about 140GB larger than the old drive.
If any partition contained just files I would simply copy the files.
If I was attempting to recreate an OS I would first run "cfdisk -Ps /dev/hda". I would create partitions on the new drive (again with cfdisk, which I prefer) slightly larger than on the old drive (just to be sure).
I would use the "dd" command on each partition. "dd if=/dev/hda1 of=/dev/hdb1" or such.
This should recreate each partition and leave you with the extra space on the new drive which is probably what you want to do.
EDIT: You would want to be sure you had an alternate boot method for at the very least one of the operating systems to be able to create the boot manager options you want.
EDIT2: You should not need to get too involved with a swap partition.
How about adding a SATA card and hard drive, that would be an easier option!!!
How about adding a SATA card and hard drive, that would be an easier option!!!
Zero SATA experience here.
My understanding is that attempting to use SATA with any operating system stands to make things more complicated.
Why "easier"?
The utility dd should never be use to make a copy of the smaller drive. Just use cfdisk or fdisk to create partitions on the 200 GB hard drive. Then use hdparm to re-read the partition table on the 200 GB to skip the reboot process. Next format the partitions and then copy files for each partition using the cp utility. Finally run boot loader to setup the MBR and edit fstab file if need to.
If you were to just use dd you would end up with the wrong drive geometry settings and your free space would probrably be reported incorrectly. And lets not forget what the journal will have to suffer through now. If fact, the only way to properly copy a harddrive to another different sized harddrive using dd is a real pain in the ass. Definitely easier to use the above user's suggestion.
Last edited by slantoflight; 11-24-2005 at 07:28 AM.
The utility dd should never be use to make a copy of the smaller drive.
Quote:
If you were to just use dd you would end up with the wrong drive geometry settings
You are correct.
IF you were COPYING THE ENTIRE SMALLER DRIVE TO A LARGER DRIVE.
Copying a partition would have no effect on the MBR and geometry previously created.
"cp" will work IF you use the correct options.
Is there any danger in using the "cp" command on a live multi-user system? Could you do a preliminary cp-ax for each partition live, then boot to single user mode (or disable all services) and issue a cp -aux to freshen any recently changed files, swap drives, and reboot? Trying to figure out a way to minimize downtime for such a drive switch (in the case of a primary drive starting to exhibit signs of failure).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.