Using DD to transfer one partition to another different size partition
Hi, i am newbie about this forum and i hope to stay with you for many time ;-)....... i have a problem, i think very common, but i am not able to find a right solution:
i have got an old computer with some partition and one have linux slackware installed; it is all included there (root and a swap file); its size is almost 4 gb. Now i have a new laptop and i do not really want to reinstall linux on it; simply i want to transfer all things from old on new computer. The size of new hd is almost 12 Gb and i want to use entire with linux slackware. I will recompile new kernel on old computer for the new. Now, i think to use dd to make one image, this follow command may be good, i think: "dd if=/dev/hda3 of=./linux_slackaware.img bs=4096 conv=noerror" I use zipslack on msdos partition (hda2) to run this command; it will make a 4 gb file image partition; Now i ask you: it is possible to transfer and to adapt this image partition on a different size image partition? The new is 12 gb size.........what are the right dd command parametres? |
Quote:
Quote:
You didn't say, so I'm assuming your filesystem is ext2/3/4; and I'm also assuming you have already partitioned the new laptop, and /dev/hda1 is the partition that is to receive the old filesystem. (If it's not hda, then it may be sda.) Then this would work. Code:
dd of=/dev/hda1 if=<correct_path_to>/linux_slackaware.img bs=4096 To remedy this and grow the filesystem out to the size of the partition use 'resize2fs' (again assuming ext2/3/4). Code:
resize2fs /dev/hda1 And don't forget that once your filesystem is moved to the new machine you will have to write a bootloader to the MBR. (Being Slackware I think that still means lilo, not Grub.) Good luck. p.s. I think most people would use 'tar' to perform this task. |
Thanks tommylovell
Quote:
Quote:
Quote:
Quote:
Quote:
|
Hello zemir,
you can also use the tar command to create an archive of the whole Linux-system. Then create a filesystem on the new Laptop and extract the archive there. I would do both with a live-CD or USB. Be aware that there you may expect difficulties with the hardware, for example the devicenodes in the /dev directory Actually a complete new Slackware-installation is done within 10 Minutes. Could you please provide more information about the hardware of the new laptop. Markus |
Quote:
However, thanks! |
Quote:
Markus |
Quote:
Thanks again! |
Solved with TAR........
|
All times are GMT -5. The time now is 04:48 PM. |