Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Backup system drive copy won't boot GRUB (http://www.linux-archive.org/debian-user/69786-backup-system-drive-copy-wont-boot-grub.html)

Brett Charbeneau 04-14-2008 09:54 PM

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

Pigeon 04-15-2008 01:30 AM

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 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?

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?op=get&search=0x21C61F7F

Brett Charbeneau 04-15-2008 04:03 PM

Backup system drive copy won't boot GRUB
 
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.


Spot on!
Man, you likely saved me HOURS more work struggling with this - whew.
Thank you VERY much for your suggestion!



--
************************************************** ******************
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


All times are GMT. The time now is 05:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.