LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 08-17-2015, 06:49 PM   #31
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513

Cloning a disk and leaving the clone plugged into the system during a reboot will nearly always cause problems.

1. Cloning a disk duplicates the UUID/volumn name/... This causes confusion when the system attempts to boot (root= always finds two targets)
2. Duplicates volume information for LVM (causes failures during a boot as well).

And the same failures happen with swap partitions.

If you take the cloned disk out you should have no problems (take either the original OR the clone out).
 
Old 08-17-2015, 09:17 PM   #32
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Gparted is a file by file method.

dd is a bit by bit.

Generally one would want to copy or clone a system file by file.

LVM has little to do with number of drives. It may be a benefit to create a lvm to begin with in order to add later in fact.

XFS is a really old filesystem. It is being updated and promoted by RH. Not a lot of people have really played with it for decades like other filesystems. I've run it under Irix but never messed with it.

There are a number of ways to clone systems. One is to look at how the distro suggests to do it. One might use kickstart on a RH based system.

In some systems you simply use a base install and then copy specific user data.

No real one stop shopping on clones.

Last edited by jefro; 08-17-2015 at 09:20 PM.
 
Old 08-18-2015, 06:18 AM   #33
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
As I said, REMOVE THE DISK AFTER CLONING.

dd copies duplicate EVERYTHING. disk identification, filesystem identification, volume labels, UUIDs... everything needed to boot is replicated.

And the system cannot identify what to use during boot (since there are two of them).
 
Old 08-18-2015, 08:27 AM   #34
hamprop
LQ Newbie
 
Registered: Aug 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
As I said, REMOVE THE DISK AFTER CLONING.

dd copies duplicate EVERYTHING. disk identification, filesystem identification, volume labels, UUIDs... everything needed to boot is replicated.

And the system cannot identify what to use during boot (since there are two of them).
There was never a time when both drives were in/plugged into the system at the same time during boot. The main drive was in the system, I booted up gparted live from an external USB key, threw the disk I wanted to clone to into a dock, plugged that in, fired it up, did the cloning, powered down, switched out the main drive with the clone drive, and fired up the system.

So there was never an issue of both drives being on while the main system was booted.

Quote:
Originally Posted by jefro View Post
Gparted is a file by file method.

dd is a bit by bit.

Generally one would want to copy or clone a system file by file.

LVM has little to do with number of drives. It may be a benefit to create a lvm to begin with in order to add later in fact.

XFS is a really old filesystem. It is being updated and promoted by RH. Not a lot of people have really played with it for decades like other filesystems. I've run it under Irix but never messed with it.

There are a number of ways to clone systems. One is to look at how the distro suggests to do it. One might use kickstart on a RH based system.

In some systems you simply use a base install and then copy specific user data.

No real one stop shopping on clones.
You weren't kidding about the ugly side of cloning.

I initially attempted to clone via gparted's copy method, but for some reason was unable to copy the main partition over; I made sure everything was unmounted, the lvm was unlocked, the drive had enough space, I was able to copy to the drive I was cloning to, everything seemed fine, but when I went to select the partition, right clicked, copy was grayed out. Couldn't figure out why, so I resorted to the dd method instead. And now here I am.

I may try a fresh install and simply move files over, but now I worry about the filesystem choice, and if I were to use something other than XFS would I run into issues.
 
Old 08-18-2015, 08:59 AM   #35
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Then the original drive should boot.

The clone will have some corruption due to the mount/in-use filesystems. In your case, swap (at a minimum) may have been active and gotten corrupted (though not sure how, it should have been treated as a crashed system).

dd has always worked for me when I used it (though only on smaller disks. The largest was a 32GB sd card, all other times dd takes far longer than necessary).
 
Old 08-18-2015, 09:04 AM   #36
hamprop
LQ Newbie
 
Registered: Aug 2015
Posts: 13

Original Poster
Rep: Reputation: Disabled
The original drive boots perfectly fine, it's the cloned one that doesn't.

I don't understand how the clone could have been corrupted, though. I booted up gparted live on a usb, and used that to clone. I also ensured everything was unmounted first.
 
Old 08-18-2015, 02:42 PM   #37
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Gparted tells you there is a mount issue if it's wrong. You shouldn't need to do anything other than find correct drive. You would have to copy loader.

Most people don't have this issue.


I guess you could have some memory issue or drive issue or bad cable or bad drive controller too. Maybe live cd is setting wrong drive parameters.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS 7 "Failed to load SELinux policy. Freezing" = no boot butchrappe Linux - General 4 05-20-2015 07:50 PM
Centos Server Failed @ Bootup: Missing "/sbin/blkid" & "fsck" command not found beagle7 Linux - Newbie 4 08-24-2012 01:33 AM
"Difference between centos and slackware" and "also how to install scratch on centos" vijayendra.uppalapati Slackware 4 07-12-2012 11:10 PM
"Difference between centos and slackware" and "also how to install scratch on centos" vijayendra.uppalapati Slackware 2 01-23-2011 03:14 AM
Debian Boot Up Problem - stuck at "BR" & "I" jc70417 Debian 2 08-30-2005 04:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:44 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