LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 10-12-2004, 12:04 PM   #1
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Rep: Reputation: 31
Moving an entire Linux installation ...


I'd like to move my entire Linux installation to another hard drive. On my current drive, I have Linux (Slackware) on hda3 and the swap partition on hda2. Hda1 is a Windows installation.

The structure of the existing drive and the new drive is not the same. On the new hard drive, this Linux installation will need to reside in hda4, with the swap partition at hda3 (hda2 is occupied by a Fedora installation that I need to leave alone; hda1 is a current WinXP installation).

Also, the size of the new partition will be larger than the partition where it is now.

Can I just copy over everything on existing drive's hda3 partition to new drive's hda4? Are there system files that might not copy without special attention (you can tell I'm coming from a Windows background). Then just edit the bootloader, (I think it's grub) that's already installed on the new hard drive, so that the kernel on hda4 will boot?

Is there anything else I'm overlooking? Or is there a better way? If any of you systematic types could jot down the steps, that would probably help. I have a lot of PC experience, but I find that, with things like this that I do only occasionally, it's easy to overlook a critical step.

I had been planning to simply reinstall Slackware on the new drive, but I spent so much time getting it just right that I hate to do that (kernel upgrade and recompile, lots of tweaking elsewhere).

Thanks!

Last edited by dhave; 10-12-2004 at 12:24 PM.
 
Old 10-14-2004, 01:12 AM   #2
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Original Poster
Rep: Reputation: 31
[bump]
 
Old 10-14-2004, 04:01 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
it's not fun, but certainly possible. there are a fair few approaches, but this is what i do:

http://www.linuxquestions.org/questi...threadid=88106

doing straight copies is never fun. you have symbolic links and things that are more than likely to come a cropper somewhere. you're confusing the hell outta me my calling both hard drives hdaX, the second hard drive will be hdb, not hda.

but as everything is within one partition (not desirable in the grand scheme but...) it should be a lot easier to spread things into a partition mounted in /mnt or such like. you could also add a home partition on the new drive, mount that as /mnt/home (i.e. within the new root dir) and during the single copy command you need your home will magically end up with it's own partition.
 
Old 10-14-2004, 07:43 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
try this link, it covers just about everything, and zaipher is also running slack.

Link: http://www.linuxquestions.org/questi...hreadid=224324
 
Old 10-15-2004, 01:42 PM   #5
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Original Poster
Rep: Reputation: 31
Thank you both for your help. It was an education just reading your instructions.

I tried some basic copying from partition to partition and found that the permissions were going goofy, so I finally decided to just reinstall Slack on the new drive. I had spent hours getting everything ticking on my previous installation, which is why I wanted to just move it in one go. But the second installation went well, and I remembered all the tweaks and adjustments to get Slack humming along. I went ahead and upgraded the kernel and adding better USB support in the process.

All in all, it was fun to reinstall, so I'm glad I got scared off of the copying deal. Some other time I might try it.

I was calling both drives "hda" because I was thinking of them from the perspective of the installation. I'm working in a single-hd laptop, using an external hard drive to copy off my stuff to be restored. Since only one internal drive is installed at a time, it's always "hda" -- on my setup, anyway. But thanks for pointing out the confusion.
 
Old 10-15-2004, 05:33 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,038

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
clawhead,

As you have discovered, just copying will not work as it will not handle the file permissions in the way that you want: that is why you need to move the files using tar (while running as root). This method preserves the file ownerships, permissions and whatnot.

Anyway, you have got to be where you wanted to be, and this is perhaps one of the beauties of linux - there are lots of different ways to achieve what you need. Some methods more 'elegant' than others, but all most of us care about is the end result!

Well done.
 
Old 10-19-2004, 03:40 PM   #7
drirr
LQ Newbie
 
Registered: Oct 2004
Location: Sweden
Distribution: Arch Linux
Posts: 5

Rep: Reputation: 0
Here's a guide I found: http://p-two.net/hard-drive/hard-drive.html, it might help you.
 
Old 10-19-2004, 03:52 PM   #8
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by drirr
Here's a guide I found: http://p-two.net/hard-drive/hard-drive.html, it might help you.
Very good resource that I've bookmarked for the next time I try this (November, at this rate ...). Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Moving Ubuntu installation to another drive qjimbo Linux - General 5 04-04-2011 12:50 PM
moving /subtrees to their own partitions on new installation John Velman Slackware - Installation 3 08-26-2005 05:39 PM
Moving old Thunderbird to new Installation? slacker9876 Linux - Software 3 06-30-2005 06:46 PM
Movin entire installation cabrilo Linux - Software 1 11-13-2004 07:33 PM
i need to delete my entire HD but linux wont let me? aaronluke Linux - General 6 10-25-2002 09:50 PM


All times are GMT -5. The time now is 11:38 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration