[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unable to boot after moving partition
From: |
Simon Hobson |
Subject: |
Re: Unable to boot after moving partition |
Date: |
Fri, 18 Oct 2013 16:56:38 +0100 |
Chris Jones wrote:
>I had to move a partion using gparted to make room for something else
>and I am no longer able to boot that system.
>
>I get the following error messages:
>
>| error no such device c07cc7e9-1c06-47fe-99b6-16c5145fbc4f
>| error HD1 cannot get C/H/S values
>| error you need to load the kernel first
I'm no expert, just an admin with plenty of scars from this sort of thing
biting me in the backside !
My *guess* is that Grub does some operations by blocklist - so if the files
move then Grub can no longer load parts of stuff it needs. Part of the software
may be written in the gap between partition table and the start of the first
partition which could well have been mangled while you were moving stuff, or it
may be in a small partition set aside for this, the rest will be in your boot
partition, which you've moved.
What I generally do in these situations is boot the system from a live CD - the
closer in software terms to the system the better. For Debian, current
installers include a live option which means you're booting from somthing very
similar which makes life simpler.
If you cannot see the issue, then you can repair Grub from the Live CD with
something like this (I take no credit for this, it was advice given to me in a
different forum IIRC) :
mkdir /sysroot
mount /dev/your-root-dev /sysroot
mount /dev/your-boot-dev /sysroot/boot
mount --bind /dev /sysroot/dev
mount --bind /sys /sysroot/sys
mount --bind /proc /sysroot/proc
mount --bind /run /sysroot/run (recommended if you are using systemd)
chroot /sysroot
grub-install /dev/your-grub-boot-device (may be grub2-install on some distro)
Alternatively, it can be helpful to learn the basics of Grub command line.
Going from fuzzy memory, if you get to the command line at boot time, then you
can manually set root and load a kernel. Once you get the system booted once,
you can then do a grub-install. I've had this before while swapping disks out -
and failed to correctly set some option or other (though I usually use the
"Edit" option at the Grub menu rather than teh Grub command line).