Moving linux partition from original hard drive to another, howto???
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Moving linux partition from original hard drive to another, howto???
Ok, so I want to move my 25GB linux partition to a free 40GB hard drive I have. This will make my 80GB hard drive free for windows, this one drive for windows, and one drive for linux, in my computer. Basically, i just want to move my linux partition to another hard drive. Is there an easy way to do this, or does it get complicated? Thanks.
I just did that for the first time by following the directions from this hard disk upgrade HOWTO. If everything's on one partition, you're gonna be surprised at how easy it was. I have a seperate /boot and it went like a breeze.
wow.... I sure like my, gui style programs. not used to the command line at all. Is there.. a program like diskdrake to copy a partition over to another drive? Sorry, but i really am not used to using commands at all.
I don't know of any GUI programs that can copy drives. Even Norton's Ghost is run from a floppy, in a dos shell. You can partition with disksdrake if you want and transfer the files after that. Or, you could use Qtparted. But, you'll spend less time reading the man page for fdisk and doing it acccording the the TLDP how-to. It seems intimidating, but it'll be faster and more correct. Can't hurt to learn a few commands. Some things are faster without the mouse. Give it a try. Less work. I did it in about 15 minutes.
It's really easy. If you give me the entire low down on what partitions/hard drives you want to move from/to and what filesystem you want to use along with posting your /etc/fstab, I'll even go so far as to write a script that will do everything for you.... Just put the script, say... named "transfer" into /usr/bin and then run "transfer" in a terminal window... That easy.... Don't be scared of the Command Line. It's just as easy as a GUI.... Often times it can be quicker depending on the GUI program as well.... Up to you. That or do a search. I've answered 2 of these posts in the past 3 days.... The basic outline of the script is going to be the same as the one I posted on the other two threads..... And you might even learn a thing or two in the process..... Thats not such a bad thing is it?
Use dd as stated above it is the best thing for this type of copy. It copies everything bit by bit so on the new drive you can simply boot up and all will work as it did before. Real easy.
I had to move my / from one partition to another and I just cp -A the whole thing then edited my fstab and lilo.conf and ran lilo. worked so well I was really suprised.
wolfe
Thats not a bad idea with 'dd'.... Altho whenever I try to copy /proc it hangs forever on kmesg or something like that. Another file in /proc does the same thing to me so I just wrote a script that does everything folder by folder but yet skips over proc.... I suppose booting to a live CD and doing it there would work well..... But then if you did that, you could just use cp -Rav /mnt/target /mnt/target2. Multiple ways for everything I suppose.
Originally posted by wolfe2554 I had to move my / from one partition to another and I just cp -A the whole thing then edited my fstab and lilo.conf and ran lilo. worked so well I was really suprised.
wolfe
This is the recommended step it the howto at tldp. The instructions are clear. What's wrong with a howto? It ain't a man page. It'd take longer to read this thread than to copy a drive following the instructions. I just did it.
Nothing. Just pointing out there is a readable howto that covers every way mentioend already. (and most people don't wanna read a howto, thinking its gonna be dense and cryptic.like many man pages).
Originally posted by jong357 Thats not a bad idea with 'dd'.... Altho whenever I try to copy /proc it hangs forever on kmesg or something like that. Another file in /proc does the same thing to me so I just wrote a script that does everything folder by folder but yet skips over proc.... I suppose booting to a live CD and doing it there would work well..... But then if you did that, you could just use cp -Rav /mnt/target /mnt/target2. Multiple ways for everything I suppose.
Just guessing here, but it may be because proc is a virtual file system and not a real file system.
That's the shortfall of the direct copy method. You are correct. /proc is a virtual filesystem, so its always changing on each bootup. All you have to do is make the /proc directory. The first boot will fill it with all the goodies.
Originally posted by vectordrake Nothing. Just pointing out there is a readable howto that covers every way mentioend already. (and most people don't wanna read a howto, thinking its gonna be dense and cryptic.like many man pages).
Hey I for one Love reading the $MAN pages..........
they can get the ole brain juices flowing..........
but Remember Vector, most new linux users have been used to windows, IE........windows and reading just
don't go together......LOL
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.