LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Moving linux partition from original hard drive to another, howto??? (http://www.linuxquestions.org/questions/linux-general-1/moving-linux-partition-from-original-hard-drive-to-another-howto-202713/)

Fear58 07-08-2004 03:32 PM

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.

vectordrake 07-08-2004 04:34 PM

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.

Fear58 07-08-2004 05:25 PM

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.

vectordrake 07-08-2004 06:53 PM

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.

jong357 07-08-2004 07:49 PM

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?

kj6loh 07-09-2004 09:13 AM

You can use dd.

dd if=/dev/hda of=/dev/hdb

Where /dev/hda is the source and /dev/hdb is the target.

sirra462 07-09-2004 10:44 AM

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.

wolfe2554 07-09-2004 12:08 PM

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

jong357 07-09-2004 02:01 PM

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.

vectordrake 07-09-2004 04:34 PM

Quote:

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.

jong357 07-09-2004 05:15 PM

Whats wrong with someone reading this thread and learning multiple ways on how to accomplish the same task? ;)

vectordrake 07-09-2004 05:54 PM

Nothing. Just pointing out there is a readable howto that covers every way mentioend already. :D (and most people don't wanna read a howto, thinking its gonna be dense and cryptic.like many man pages).

kj6loh 07-15-2004 04:04 PM

Quote:

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.

vectordrake 07-15-2004 06:28 PM

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.

320mb 07-15-2004 09:43 PM

Quote:

Originally posted by vectordrake
Nothing. Just pointing out there is a readable howto that covers every way mentioend already. :D (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


All times are GMT -5. The time now is 11:27 AM.