LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-09-2005, 02:08 PM   #1
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Rep: Reputation: 15
Migrate OS to new disk


I have just got rid of my dual boot (never used the Windoze partion anyway...), but I want to migrate the OS the hda now - it currrently resides on hdb...

How easy is it to do this, and how do I do it?

Thanks!

Robin.
 
Old 05-09-2005, 03:27 PM   #2
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
Probably the easiest way is to go into the configuration files and fix any that the reference the partitions by their actual names: /etc/fstab and /etc/lilo.conf (or grub.conf) are the only ones that immediately come to mind, can anyone think of others? Don't run /sbin/lilo just yet, though.

Once that's done, shut down, physically swap the hard drives - make the one that's now slave (i.e. hdb) master, and vice versa.

Boot up again with a boot disk, and run /sbin/lilo (or grub) to make the boot process look at what is *now* the correct hard drive.

If all went well, you should be able to boot with your normal procedure, and shouldn't even notice the change!
 
Old 05-09-2005, 03:43 PM   #3
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
Should I re-partition hda and then copy the /boot directory to hda?

Then if I change Grub to look at HD0,0 then it should pick up the new copy of the OS, right? I am assuming I change fstab to point to /dev/hda1 as well to achieve this?

Thanks
 
Old 05-09-2005, 03:49 PM   #4
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
Ooh, boy...just moving one partition out of your whole system could work...maybe....although my gut reaction says it'll harm more than it'll help.

Really, I'd suggest leaving the system intact, and just moving the entire hard drive from slave to master (and updating the relevant configuration files) rather than just copying one partition. You'll give yourself much less headaches, and won't risk destroying your entire system's integrity.

Once the hard drive which is currently hda (and which I assume used to have windows on it) is safely in the slave position and is in no danger of being booted to, sure go ahead, fdisk, partition, format, go nuts
 
Old 05-09-2005, 03:54 PM   #5
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Original Poster
Rep: Reputation: 15
Well, I was hoping to leave hda in place, as it is only an 80GB hard drive, and move the boot partition to it to free up a 200GB hard drive. I want to have an Oracle Applications environment running ont he 200GB drive, but itmay be slow if both the OS and the database are vying for disk access simultaneously...

Any thoughts on this situation are welcome!
 
Old 05-09-2005, 05:20 PM   #6
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
I'm not sure I understand...moving just the boot partition isn't going to free up any space - your installation is still going to be sitting there on /dev/hdb.

If you're really wanting to physically copy the installation over, just go ahead and copy it. Boot to a boot disk, create exact copies of your partitions on the target hard drive, then mount & cp each partition. Fix the config files & grub before you try to boot up again, of course.
 
  


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
Cannot migrate LQ bookmarks UltimaGuy LQ Suggestions & Feedback 5 08-11-2005 04:50 AM
migrate it to Drupal.. dbQuery LQ Suggestions & Feedback 9 08-03-2005 10:34 PM
help to migrate mifan Linux - General 2 05-30-2005 03:06 PM
Migrate from AS to ES ? jarzan Linux - Enterprise 8 02-21-2005 12:02 AM
migrate to 2.6.0? carboncopy Slackware 2 01-05-2004 09:08 PM

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

All times are GMT -5. The time now is 07:53 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
Open Source Consulting | Domain Registration