LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 07-08-2004, 03:32 PM   #1
Fear58
Member
 
Registered: Feb 2004
Location: Reno, Nevada
Distribution: Mandrake 9.2
Posts: 221

Rep: Reputation: 30
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.
 
Old 07-08-2004, 04:34 PM   #2
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
Old 07-08-2004, 05:25 PM   #3
Fear58
Member
 
Registered: Feb 2004
Location: Reno, Nevada
Distribution: Mandrake 9.2
Posts: 221

Original Poster
Rep: Reputation: 30
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.
 
Old 07-08-2004, 06:53 PM   #4
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
Old 07-08-2004, 07:49 PM   #5
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
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?
 
Old 07-09-2004, 09:13 AM   #6
kj6loh
Member
 
Registered: Jun 2004
Posts: 47

Rep: Reputation: 17
You can use dd.

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

Where /dev/hda is the source and /dev/hdb is the target.
 
Old 07-09-2004, 10:44 AM   #7
sirra462
Member
 
Registered: Nov 2003
Posts: 58

Rep: Reputation: 15
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.
 
Old 07-09-2004, 12:08 PM   #8
wolfe2554
Member
 
Registered: Apr 2003
Location: denver co
Distribution: redhat9
Posts: 156

Rep: Reputation: 30
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
 
Old 07-09-2004, 02:01 PM   #9
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
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.
 
Old 07-09-2004, 04:34 PM   #10
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
Old 07-09-2004, 05:15 PM   #11
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Whats wrong with someone reading this thread and learning multiple ways on how to accomplish the same task?
 
Old 07-09-2004, 05:54 PM   #12
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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).
 
Old 07-15-2004, 04:04 PM   #13
kj6loh
Member
 
Registered: Jun 2004
Posts: 47

Rep: Reputation: 17
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.
 
Old 07-15-2004, 06:28 PM   #14
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
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.
 
Old 07-15-2004, 09:43 PM   #15
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
Quote:
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition on Linux hard drive (after installition) PB0711 Linux - Newbie 4 09-01-2004 06:03 PM
Moving linux to second hard drive rjayaram Linux - General 10 09-11-2003 05:23 PM
moving to a new hard drive n1wil Linux - Software 4 05-21-2003 02:38 PM
moving my hard drive illtbagu Linux - General 2 02-08-2003 04:56 PM
Moving linux hard drive to primary slave flyboy320 Linux - General 4 01-23-2002 11:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration