LinuxQuestions.org
Review your favorite Linux distribution.
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 01-09-2013, 02:13 PM   #1
barneyw
LQ Newbie
 
Registered: Jan 2013
Posts: 1

Rep: Reputation: Disabled
Boot problem after cloning to new drive


Hi - and thanks in advance for any help!

I've been trying to clone my old 80Gb hard drive (which boots into Ubuntu) onto a partition in a larger 1Tb drive using dd.

I set up an 80Gb partition, marked it as 'bootable' and copied the entire device of the old drive to the new partition.
Code:
dd if=/dev/sda of=/dev/sdb1 bs=100M
It won't boot at all!

If I copy the 80Gb onto the 1Tb drive without partitioning first, the computer boots from the drive no problem.... but I don't then have the partitions i want.

My question is what else do I need to do to make my partition bootable? I have no experience with Grub or Lilo as I have not seemed to need them so far...

Regards,

Barneyw
 
Old 01-09-2013, 02:23 PM   #2
lykwydchykyn
Member
 
Registered: Mar 2006
Location: Tennessee, USA
Distribution: Debian, Ubuntu
Posts: 135

Rep: Reputation: 36
I'm not entirely sure, but I suspect the problem is that your "dd" command is copying a drive (including partition table and MBR) to a partition.

When I've done this sort of thing in the past, I've found it worked better to create the partition and then copy the contents of the old partition using rsync. If your fstab and bootloader config use UUIDs to point to the parititons, you'll need to either update those or trade them out for device or label notation instead.

Alternately, you could copy the drive first, then edit the partition table with gparted or somesuch after the fact.
 
Old 01-09-2013, 02:33 PM   #3
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debian
Posts: 2,195
Blog Entries: 1

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
Hi

You could get the drive to boot, your 2nd option then use gparted from a live cd to shrink the partition to what you want, 1 thought I have never done this on a big drive like that so not sure how long it will take

Sorry missed the last bit in previous post

Last edited by spiky0011; 01-09-2013 at 02:35 PM.
 
Old 01-09-2013, 05:18 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,279

Rep: Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380Reputation: 1380
Quote:
dd if=/dev/sda of=/dev/sdb1 bs=100M
If you copied to the partition, you didn't put the Grub2 in the master boot record. You could Grub2 to the mbr of sdb.
 
  


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
[SOLVED] Cloning a drive. 13_ Slackware 21 10-20-2012 08:03 AM
Selecting boot drive after cloning with dd patmicom Red Hat 8 09-08-2012 11:31 AM
Problem Cloning Linux Drive throck Linux - Newbie 8 01-05-2012 10:18 AM
Cloning dual-boot drive onto a smaller drive. Harju Linux - Newbie 4 05-29-2010 11:40 AM
Need help in cloning drive raddad51x Fedora 1 05-16-2006 01:31 AM

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

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