All pastes #751557 Raw Edit

Anonymous

public text v1 · immutable
#751557 ·published 2007-10-27 15:04 UTC
rendered paste body
Backup Procedure Failure  (Grub loading error 21)

In the interest of trying to backup the drive, I installed a second drive for backup.  This is a removable drive in a plugin tray.  In order to format the second drive identical to the first drive, I removed the cable from the first drive, and installed emc2.1.0 on the second drive using the live cd.  Then I plugged the 1st drive (hda) in and as boot began, a menu came up giving me the option of booting from either drive.  I found I could boot up successfully from either, however unless I intervened and made a choice the default boot came from the 2nd hd.  Because I didn’t want to have to intervene to select the 1st hd, I deleted all files on the second hd and now I find I can no longer boot from the original drive.  Apparently the menu of options must have been on the 2nd hd and without that I can’t get the 1st hd booted.

I then reinstalled emc2 on the second hd (hdc)and booted on it.  Now running emc2 on the 2nd (hdc) I  am able to mount the first disk and all the files seem to be there.
 
Is there any way to recover from this boot failure? I probably have to reinstall the MBR on the original drive, but don’t know how to do this or if it is possible.

Incidently, it took many weeks to get the original live cd installation working due to latency in my motherboard.  I dread going through that procedure again because I do not know Linux sufficiently well and would have to rely on the generosity of someone willing to help.  I also had many hoops to jump through to get the modem working on dial-up.  I would have to redownload all the emc updates also.

I have delved into several files that hopefully would provide sufficient information to enable one to figure out what must be done.

When I try to boot from the original hda1 I almost immediately get the following:

Grub loading stage 1.5.
Grub loading please wait ...
Error 21

If I boot  on the 2nd drive and look at the first drive -
dmesg is no help because it doesn’t get far enough along in the boot process for that to start.

fdisk provides the following info:

jack@jack-desktop:/$ sudo fdisk -l
Password:

Disk /dev/hda: 4223 MB, 4223729664 bytes
255 heads, 63 sectors/track, 513 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         488     3919828+  83  Linux
/dev/hda2             489         513      200812+   5  Extended
/dev/hda5             489         513      200781   82  Linux swap / Solaris

Disk /dev/hdc: 8455 MB, 8455200768 bytes
255 heads, 63 sectors/track, 1027 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1         981     7879851   83  Linux
/dev/hdc2             982        1027      369495    5  Extended
/dev/hdc5             982        1027      369463+  82  Linux swap / Solaris


I am providing the contents of the following files on hda1 and hopefully they may give a knowlegable person sufficient insight into what is needed to fix this boot  problem:

/mnt/disk1/boot/grub/fstab
/mnt/disk1/boot/grub/device.map
/mnt/disk1/boot/grub/menu.lst

/mnt/disk1/boot/grub/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>         <options>                    <dump>  <pass>
proc                        /proc            proc              defaults                               0       0
/dev/hda1               /                    ext3         defaults,errors=remount-ro     0       1
/dev/hda5               none            swap                sw                                     0       0
/dev/hdc        /media/cdrom0   udf,iso9660   user,noauto                           0       0



/mnt/disk1/boot/grub/device.map
(hd0)	/dev/hda
(hd1)	/dev/hdb
(hd2)	/dev/sda



/mnt/disk1/boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/hda1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title		Ubuntu, kernel 2.6.15-magma
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-magma root=/dev/hda1 ro quiet splash
initrd		/boot/initrd.img-2.6.15-magma
savedefault
boot

title		Ubuntu, kernel 2.6.15-magma (recovery mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-magma root=/dev/hda1 ro single
initrd		/boot/initrd.img-2.6.15-magma
boot

title		Ubuntu, memtest86+
root		(hd0,0)
kernel		/boot/memtest86+.bin 
boot
### END DEBIAN AUTOMAGIC KERNELS LIST