LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-10-2016, 09:59 AM   #1
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386

Rep: Reputation: 43
Question Image will not boot


So I bought a 250GB SSD to replace a 8 year old 250GB HDD for one of my Ubuntu Linux servers. Turns out that the new SSD isn't actually 250GB, its actually 240GB and because of this Clonezilla will not clone my old HDD onto my new SSD (destination is smaller than source).

So I booted into GParted, created a MS-DOS partition table and shrank /dev/sda1 to slightly smaller than /dev/sdb1

Then I booted into Clonezilla and cloned /dev/sda1 to /dev/sdb1.

Finally, I disconnected the original drive so just the cloned SSD was attached.

My problem is this, the server won't boot with the cloned drive attached. It gets to a screen that says 'Loading Operating system' and just sits there forever.

So I must have missed some critical step to make the newly imaged SSD partition bootable. I did go back into GParted and set the boot flag on the first partition of the cloned drive but no luck still won't boot.

Does anyone know what I need to do in addition to cloning /dev/sda1 to /dev/sdb1 to make /sdb1 bootable? Again, I can't clone the entire disk from /dev/sda to /dev/sdb because /dev/sdb is slightly smaller than /dev/sda

Thanks in advance
 
Old 02-10-2016, 10:27 AM   #2
fmattheus
Member
 
Registered: Nov 2015
Posts: 104

Rep: Reputation: 38
Chances are you have the master boot record on the disk, not on the partition. You need to copy the MBR from your original drive to the new one.

Assuming the original drive is stil /dev/sda and the new one is /dev/sdb, here's the command.
Code:
dd if=/dev/sda of=/dev/sdb bs=512 count=1
It copies the first 512 bytes, which is where the MBR lives
 
1 members found this post helpful.
Old 02-10-2016, 12:20 PM   #3
thund3rstruck
Member
 
Registered: Nov 2005
Location: East Coast, USA
Distribution: Fedora 18, Slackware64 13.37, Windows 7/8
Posts: 386

Original Poster
Rep: Reputation: 43
Quote:
Originally Posted by fmattheus View Post
Chances are you have the master boot record on the disk, not on the partition. You need to copy the MBR from your original drive to the new one.

Assuming the original drive is stil /dev/sda and the new one is /dev/sdb, here's the command.
Code:
dd if=/dev/sda of=/dev/sdb bs=512 count=1
It copies the first 512 bytes, which is where the MBR lives
Thanks! I'm certain that was it; but before I had a chance to give it a try I booted to this OSS recovery CD and it reinstalled grub and fixed the problem
 
  


Reply

Tags
boot, clone, clonezilla, image, ssd


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] Creating a HDD boot image from a ISO boot image Basher52 Linux - Software 5 12-02-2011 04:01 PM
When I boot with PXE Boot into openSuse, error says 'invalid or corrupt kernel image' rfelsburg SUSE / openSUSE 0 05-13-2010 08:51 PM
Which boot disk image should I use to boot an external hard drive? dublinus Linux - Laptop and Netbook 8 09-29-2008 01:32 AM
Boot splash image with various boot loaders kumarkumar Linux - Software 4 06-10-2008 07:06 PM
Setting X boot image, and loading image untwisted Linux - General 2 03-09-2004 07:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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