LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Cloning and booting a cloned drive (http://www.linuxquestions.org/questions/linux-server-73/cloning-and-booting-a-cloned-drive-4175468248/)

nicklay 07-02-2013 08:33 PM

Cloning and booting a cloned drive
 
Hi everybody, hope y'all going well. I'm here today with a question that is a bit complicated. First of all, I driving a server on a Dell Poweredge 1950 II. This one runs on Oracle Entreprise Linux and is installed on a 250gb SATA drive. Since I got a 146 15K.6 SAS drive, i'm trying to clone the OS on this new drive. I cloned (I hope with the right way) using
Code:

dd if=/dev/sda of=/dev/sdb
. The drive begin to boot but end to a kernel panic. I'm pretty sure there a way to rebuild the booting information to work with the new drive but that is over my knowledge

If some of you could explain how I could repair the boot information would be very nice.

Thanks a lot for your help

buttugly 07-02-2013 09:49 PM

can you mount the clone? are the drivers for the sas in the initfs? is the fstab correct for what it is?

What is this 146 15K.6 SAS drive? Are you saying it is a 146GB drive? the 15k.6 is whoopin my a##.

How can you clone 250GB to 146GB? Where did the other 104GB go?

I presume this new drive is something spiffy/special to make you want to make it the system drive, since this appears to be the case why not install from scratch. Spiffy os for a spiffy new drive.

Whats the last thing to wiz by before the panic?

nicklay 07-03-2013 10:40 PM

Sorry, I know the name of the HDD wasn't clear, first it's an SAS drive (Serial Attached SCSI). It's like adding kind of super sayan in a SATA drive ahah, the 15K.6 means that the drive spins at 15 600 rpm (which is fast as hell!) and it's a 146gb. The 250 is not full, it only have a maximum of 90-100gb data on it that's why. I'm cloning it because the SAS is REALLLLLY faster. Some dude says that I only have to reinstall grub on the drive and it should boot... But I'm not sure. The panic appears with nothing else in the screen with the red Oracle's progress bar

syg00 07-04-2013 03:17 AM

If you are getting a kernel panic, grub has done its job. We can't help without messages - either a log or a photo.
Using "dd" like that, your SAS drive may now only be 250 Gig. Boot the original disk (with the SAS installed) and from a terminal let's see the result of this as root/sudo
Code:

parted -l

jpollard 07-04-2013 05:32 AM

One possibility is that the initrd doesn't recognize the drive (missing default drivers).

But we can't tell without the error messages.

wstewart90 07-04-2013 07:58 AM

Like everybody said, error messages. For all we know, grub could be looking for the uuid of your old drive which is likely the case. If you can't get an error then boot to a live cd and mount the new drive. bind the /dev /proc and /sys directories, chroot in and rebuild your grub configuration. If that doesn't work then find an error message prior to the kernel panic.

nicklay 07-04-2013 12:01 PM

Here is the output of the sudo partes -l :
Code:

Modèle: ATA WDC WD2500JS-60N (scsi)
Disque /dev/sda : 250GB
Taille des secteurs (logiques/physiques): 512B/512B
Table de partitions : msdos

Numéro  Début  Fin    Taille  Type    Système de fichiers  Fanions
 1      1049kB  4195MB  4194MB  primary  linux-swap(v1)
 2      4195MB  250GB  246GB  primary  ext4                démarrage


Modèle: SEAGATE ST3146356SS (scsi)
Disque /dev/sdb : 147GB
Taille des secteurs (logiques/physiques): 512B/512B
Table de partitions : msdos

Numéro  Début  Fin    Taille  Type    Système de fichiers  Fanions
 1      32,3kB  147GB  147GB  primary  ext4


Erreur: Impossible d'ouvrir /dev/zram0 - étiquette de disque non reconnue.


jefro 07-04-2013 07:36 PM

I'd guess that grub points to devices or names or how it is attached to the system. When you clone it those same settings would need to be made generic or changed to specific for new drive.

propofol 07-06-2013 03:10 AM

I just want to check I understand correctly: you are using dd to clone from a 250Gb drive to a 146Gb drive?

If so the partition table on the new drive will be incorrect. You will either have to resize the partitions on the 250Gb drive to 146Gb (preferably after a backup), then use dd. Alternatively clone the root folder with tar or rsync.

Regards,
Stefan

nicklay 07-06-2013 08:57 AM

I dropped dd off and try using something else. First I found a great way here : http://bremford.org/tips/MigrateDiskInUbuntu.html

I did it all but I had problems running
Code:

grub-install --recheck /dev/sdc
So I exited the chrooted dir and try this instead
Code:

grub-install --root-directory=/mnt /dev/sdc
The process ended well, but haven't tried to boot on it, I'll try it tonight and get back with information

Thank you all for your help!


All times are GMT -5. The time now is 10:03 AM.