On Sun, 26 Apr 2015, Brian wrote:

> On Sun 26 Apr 2015 at 05:31:41 -0700, Ldten K wrote:
> 
> > Need some help making bootable HD with Grub.
> > 
> > I have two HDs of the same size:
> > 1. /dev/sda - my old and working HD which has grub properly
> > installed, the system boots and works properly. /dev/sda has the
> > following partitions:
> >    /dev/sda1  /boot
> >    /dev/sda2  /
> >    /dev/sda3  swap
> > 
> > 2. /dev/sdb, my new HD, it has the same structure as /dev/sda: sdb1
> > (/boot), sdb2 (/) and sdb3 (swap), though the size of the partitions
> > is slightly different. I want to transfer my data from sda to sdb
> > (that part was done) and make sdb bootable. sdb will then be the
> > only drive in the system.
> > 
> > I ran "grub-install /dev/sdb" and it said that it completed without
> > errors. The PC however fails to boot from the new drive, which was
> > the only HD in the system at that time. After some delay the boot
> > process drops me not even into the Grub CLI but into some "grub
> > rescue>" CLI where even "help" command does not work. "ls" does
> > rescue>work though.
> 
> You get the bare minimum with grub rescue>; not even TAB completion,
>  
> > Any ideas as to what needs to be done to make sdb bootable just like
> > sda is?

TO: Brian

Sorry for hijacking your reply.  The OP's original post ended up in the
SPAM folder, and when I moved it to my debian list folder, it
mysteriously disappeared.

TO:  OP

I did the same thing with this system a year or so ago. It's more
involved than simply copying files -- as you've discovered.

First word of advice:  STOP!  Don't resort to trial and error to get
the new drive/system to work.  You'll only make thing worse.  Search for
proper instructions on the 'Net, and once found, see whether you can
salvage what's already been done or have to start over.

Basically, here's the procedure as I remember it.  It was the first
time I had ever done such a transfer, and I thoroughly researched it --
a month's worth of searches and studying.

The below can all be done from the original system

Prepare the new drive as you've done.

Copy over all the files from the old drive -- I used rsync as it has
error checking.

Get UUIDs for the partitions on the new drive

Replace the old UUIDs in /etc/fstab on the new drive with the new UUIDs

Edit any other files on the new drive that reflect the old drive

chroot to the new drive.  This has to be done a certain way.  Why you
need detailed instructions for the transfer procedure.

Delete the old initrd.img on the new drive and create a new one.

Create a new grub.cfg, if needed.

Install the grub bootloader on the new drive.

Remove the chroot, transferring system control back to the old drive.

Shutdown system.

Remove old drive

Boot -- see if it works.

PLEASE NOTE: all the above is general.  You need detailed step-by-step
instructions or you'll screw everything up and the system won't work.

Good luck.

B


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150426114424.70dba...@debian7.boseck208.net

Reply via email to