LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-03-2010, 01:03 AM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
Move centos to another hard disk?


Move centos to another hard disk?

My box is centos 5.4 x86 on one hrad disk.
Now I have a problem at this hard disk, so I want to ove centos to another hrad disk.

But backing up centos and restoring them another hard disk is not so easy and takes so much time.


I heard Partimage" can backup hrard disk and restoring it to another hard disk.

http://godotrue.egloos.com/3215537

My box has one LVM composed 3 partitions on one hard disk.

Can I move centos to another hard disk with partimage?
 
Old 06-03-2010, 02:03 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
You can just use 'dd' ... boot on a live cd then 'dd if=/dev/sda of=/dev/sdb bs=512' .. should do the trick as long as sda is your original disk - check the disks with 'fdisk -l' to confirm which is which, you don't want to zero your source disk accidently
 
1 members found this post helpful.
Old 06-03-2010, 03:19 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
After migration some server-based distros may not boot, unless you disable the selinux.

This thread may be of interest to you.
 
1 members found this post helpful.
Old 06-03-2010, 03:31 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
If its your hard drive that is fault and not CentOS, then you could possibly use CloneZilla to clone your drive to another.
 
1 members found this post helpful.
Old 06-03-2010, 03:45 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,848

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
Quote:
Originally Posted by saikee View Post
After migration some server-based distros may not boot, unless you disable the selinux.
Saikee, you should be able to bypass that by adding "enforcing=0" to the kernel parms. Should at least get you up if you hit that wall again.
 
1 members found this post helpful.
Old 06-03-2010, 07:18 AM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
syg00,

Think your suggestion is to boot to runlevel 0 as root. That I know and have tried but the user folders and GUI are out of bound. Disabling Selinux is what I needed to get back the Fedora and RHEL after I migrated them to different partitions.

I moved over 30 Linux to a different disk of different sized partitions. Only the Red Hat families distros gave me this trouble.

The problem does not exist if the whole of the hard disk is cloned thereby retaining the orginal settings assuming the source disk is removed when the target disk is operated.

Last edited by saikee; 06-03-2010 at 07:21 AM.
 
1 members found this post helpful.
Old 06-03-2010, 07:32 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,848

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
Nope - the enforcing is a SELinux level. I avoid SELinux like poison, but that should put you in permissive mode for the duration of that boot. Same as updating the config, but easier to get at in a dead(ish) system.
 
2 members found this post helpful.
Old 06-05-2010, 10:00 AM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
syg00,

Thanks for the advice.

I confirm that is the ticket in my recent movement of a Fedora 13 within its own partition /dev/sdb128. Basically I moved the distro to another disk, repartitioned the sdb128 in a different position of the hard disk and in a different size and copied the files back.

I edited the uuid changes but the Fedora only allows me back only after I add "enfocing=0" as a kernel parameter.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Move OS to Another Hard Disk k_oudom Linux - Software 22 10-10-2009 01:51 AM
how to clone centos to other hard disk? windstory Linux - Newbie 2 02-13-2009 09:43 PM
Hard Disk Failure: How do I move data to a new hard disk drive? spyros Linux - Software 2 10-31-2008 04:01 PM
move mbr to different hard disk taiwf Linux - Hardware 4 08-11-2005 10:58 PM
Move hard disk with OS te_conway Linux - General 1 03-12-2002 10:06 AM


All times are GMT -5. The time now is 02:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration