Unix Technical Forum

Backup system drive copy won't boot GRUB

This is a discussion on Backup system drive copy won't boot GRUB within the Debian Linux Users forum forums, part of the Debian Linux category; --> I'd be grateful for any help anyone can find time to give! I'm getting ready to upgrade my system ...


Go Back   Unix Technical Forum > Unix Operating Systems > Debian Linux > Debian Linux Users forum

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 09:29 PM
Brett Charbeneau
 
Posts: n/a
Default Backup system drive copy won't boot GRUB

I'd be grateful for any help anyone can find time to give!
I'm getting ready to upgrade my system from sarge to etch. I boot from
an IDE drive and keep /home and /var on SCSI disk. My sarge install is
presently using the 2.6.8-4-686-smp linux-image. Before I get into the actual
upgrade I wanted to make a backup of the system drive.
I've made the backup copy of the system drive using

(cd / && tar clf - .)|(cd /mnt/hde2 && tar xfp -)
(cd /boot && tar clf - .)|(cd /mnt/hde1 && tar xfp -)

the target hard drive being attached to a PCI IDE card which makes it
hde in this situation.
When I move this drive the primary master and try to boot
from this target drive the grub menu comes up and it starts but I get this a
pivot_root error:


pivot_root: No such file or directory
/sbin/init: 432: cannot open dev/console: No such file
Kernel panic: Attempted to kill init!


Things I've tried:

1. Checking to see if /dev/console exists and has the right permissions,
it does:

#ls -al /dev/console
crw------- 1 root tty 5, 1 Apr 14 14:59 /dev/console

2. Booting from a Debian 4 CD in rescue mode, mounting hda1 (/boot) and
hda2 (/) on /mnt, chrooting to this and trying

#grub-install /dev/hda
/dev/hda: Not found or not a block device

3. Same as two but with these additional commands:

#mount -o bind /dev /mnt/dev
#mount -o bind -t proc /proc /mnt/proc
#grub-install /dev/hda
/dev/ide/host0/bus0/target0/lun0/disc does not have and corresponding BIOS
drive.

4. Same as three but editing the (hd0) line in /boot/grub/device.map

(hd0) /dev/ide/host0/bus0/target0/lun0/disc

lots of grub output but ends in "Error 22: No such partition"

4. Same as three but going through the grub shell
grub
root (hd0,0)
setup (hd)

says it finishes successfully but a reboot results in the root_pivot
error again.

fstab and mtab are identical to the functioning drive. The only e2labels
on the backup drive are appropriately "/" and "/boot".
I'm stumped - can anyone suggest anything else?


--
************************************************** ******************
Brett Charbeneau, GSEC Gold, GCIH Gold
Network Administrator
Williamsburg Regional Library
7770 Croaker Road
Williamsburg, VA 23188-7064
(757)259-4044 www.wrl.org
(757)259-4079 (fax) brett@wrl.org
************************************************** ******************


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 09:29 PM
Pigeon
 
Posts: n/a
Default Re: Backup system drive copy won't boot GRUB

On Mon, Apr 14, 2008 at 05:54:34PM -0400, Brett Charbeneau wrote:
> I'd be grateful for any help anyone can find time to give!
> I'm getting ready to upgrade my system from sarge to etch. I boot
> from an IDE drive and keep /home and /var on SCSI disk. My sarge installis
> presently using the 2.6.8-4-686-smp linux-image. Before I get into the
> actual upgrade I wanted to make a backup of the system drive.
> I've made the backup copy of the system drive using
>
> (cd / && tar clf - .)|(cd /mnt/hde2 && tar xfp -)
> (cd /boot && tar clf - .)|(cd /mnt/hde1 && tar xfp -)
>
> the target hard drive being attached to a PCI IDE card which makes
> it hde in this situation.
> When I move this drive the primary master and try to boot
> from this target drive the grub menu comes up and it starts but I get this
> a pivot_root error:
>
>
> pivot_root: No such file or directory
> /sbin/init: 432: cannot open dev/console: No such file
> Kernel panic: Attempted to kill init!
>
>
> Things I've tried:
>
> 1. Checking to see if /dev/console exists and has the right
> permissions, it does:
>
> #ls -al /dev/console
> crw------- 1 root tty 5, 1 Apr 14 14:59 /dev/console
>
> 2. Booting from a Debian 4 CD in rescue mode, mounting hda1 (/boot)
> and hda2 (/) on /mnt, chrooting to this and trying
>
> #grub-install /dev/hda
> /dev/hda: Not found or not a block device
>
> 3. Same as two but with these additional commands:
>
> #mount -o bind /dev /mnt/dev
> #mount -o bind -t proc /proc /mnt/proc
> #grub-install /dev/hda
> /dev/ide/host0/bus0/target0/lun0/disc does not have and corresponding BIOS
> drive.
>
> 4. Same as three but editing the (hd0) line in /boot/grub/device.map
>
> (hd0) /dev/ide/host0/bus0/target0/lun0/disc
>
> lots of grub output but ends in "Error 22: No such partition"
>
> 4. Same as three but going through the grub shell
> grub
> root (hd0,0)
> setup (hd)
>
> says it finishes successfully but a reboot results in the root_pivot
> error again.
>
> fstab and mtab are identical to the functioning drive. The only
> e2labels on the backup drive are appropriately "/" and "/boot".
> I'm stumped - can anyone suggest anything else?


Boot in rescue mode, chroot to the backup drive and reinstall the
kernel...? I'm suspecting you need to update your initrd. I've had
similar problems and that was the missing link.

--
Pigeon

Be kind to pigeons
Pigeon's Nest - http://pigeonsnest.co.uk/
Lucy Pinder Television - http://www.lucy-pinder.tv/
GPG key: http://pgp.mit.edu:11371/pks/lookup?...rch=0x21C61F7F

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIBAUsUxADjyHGH38RAs6nAKCOZPnGaKuLsTG2IwGcId Q4Qon/ZwCfZN+6
kolxrjH04wRXHkOf5itJB9g=
=h9WQ
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:07 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com