Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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.
I have a 120GB IDE hdd on which there is a 2GB swap partition and other space is for linux / partition. This hdd was in use for years, not i became loud and i want to migrate to a never hdd.
So i bough a WD Raptor 74GB 10.000Rpm, on which i would like to put my system, offcourse same as on that IDE drive, so i would like just to copy it to new drive. Old one is bigger but there is only 30GB space used on the /. So 74GB new drive will be big enough.
I tried with dd, offcourse it did not work, because new drive not being the same. Tried paragon disk copy, it copied nicely all the data and made some kind of partition resizing. It did not boot, and when i done fcsk on / it worked for about 4 hours and then hangs as well, probably that program did not make as good job as i though he did.
Tried to do a quick install of open suse 10.2 and then just cp -R -f */new, where /new being the new os drive with basic opensuse install just so i got MBR and partitions. There is a problem with file ownership then, and MBR not working etc.
So what are my options,*or*better*said*what*is*the*recipe*to*get*this*working ?
1) I assume you know how to set jumpers on second drive.
2) my suggestion is run a live cd....the smallest one to d/load is RIP at around 80Megs....which has a application called gparted on it and an image app called partimage.
b) use live cd to create 4 primary partitions using gparted or fdisk or cfdisk etc on new drive
/.....(must be equal or larger in size than old drive)
/spare
/image (must be large enough for at least one image)
swap
gparted can format....I think suse is ext3
c) use live cd to image old partition and pretending your drives are master old/slave new
open a shell
su
mkdir /z
mount -t ext3 /dev/hdb3 /z
change hdb (slave) to hdc if new drive is master on second controller etc
then run partimage but you are saving partition 1 of old drive
file name to save
/z/image1.gz
will write an image to 3rd partition of new drive
d) turn off computer...use an antistatic wrist strap or ground the back of your hand on powersupply b4 removing old drive and resetting new drive to jumper as master
e) reboot with live cd
open a shell
su
mkdir /z
mount -t ext3 /dev/hda3 /z
hda is because new drive is now jumpered as master on first controller
mext run partimage but restore partition 1 using file
/z/image1.gz.000
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
I give you a quick summary of what to do. Details are everywhere on the Internet.
1. Partition the new drive in a way similar to the old one. You should have enough space for putting the contents of each old partition.
2. Tar each partition (tar -cvf hda7.tar <partition>) Put the root dir for a partition in place of <partition> Say /var is on its own partition, then do tar -cvf hda7.tar /var/ In case of doubt "man tar"
3. Copy each tar file to the new disk
4. Mount the partitions of the new disk so you can access them
4. Do an tar -xvf for each tar file, extracting files on the right partitions
5. chroot to the root partition on the new disk. Run grub install. Check the grub manual to be sure what parameters to pass, where to install the MBR
This is not the quickest way, but has always worked for me. It is less error prone than dd because you are really copying on file level. No games with byte-by-byte copying of partition tables etc. You should only be alert that you mount the new partitions and extract the tar files in the correct location.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.