Window hard drive failed, but Ubuntu hard drive still work! but need help

Asked by EthanH on 2009-03-22

Hi,
Before i get into this problem, i give you a background of my computer. I install 2 hard drive in my computer. One for window, and one for ubuntu. I install Window XP first, then I install Ubuntu hardy. We all should know the Grub is inside the Window hard drive. Ok, now here the problem. My Window drive failed on me. I heard clicks on the hard drive, then i totally died on me. Lucky when i notice it, I hop on the ubuntu and save all the works, backup from the window before it died on me. But here the problem is. Without the Grub on Window hard drive, i cannot boot up the ubuntu from my computer. I still have my live CD and yes, i can see my ubuntu on it. Im just wondering how i can get the ubuntu boot up by itself.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
EthanH
Solved:
2009-03-22
Last query:
2009-03-22
Last reply:
2009-03-22
Andre Mangan (kyphi) said : #1

Sorry to read that one of your hard drives failed. It happens. "We all should know the Grub is inside the Window hard drive" - that is not so, GRUB merely puts an annotation on the Windows MBR.

You can use your live CD to boot, go into "Rescue Mode" and follow the instructions.

You can also (from the live CD) in a terminal restore GRUB:

sudo grub
find /vmlinuz ( this will return a value that looks like this (hd0,4)) - that is a value from my computer.
root (hd0,4) - substitute your values
setup (hd0)
type:quit
Reboot.

It is always a good idea to have a rescue disc such as "Super Grub Boot Disc" in your toolkit. Get it from:

http://users.bigpond.net.au/hermanzone/SuperGrubDiskPage.html

peter b (b1pete) said : #2

....'I heard clicks on the hard drive, then i totally died on me'....

hd0 IS the HDD where MBR resides - if it is defective then replace it with a new HD and reinstall windows on it first.

what's the idea of having setup grub on a defective hd0/MBR ?

peter b

EthanH (buggyboy79) said : #3

Sry, im still learning how the ubuntu works still. Since my window drive failed, i cannot get my computer to boot up to ubuntu. I just follow the instruction about restoring Grub. I did it sucessfully but when ever i try to put up the linux, it gave me Error 21: Selected disk does not exist. I only have linux hard drive in right. Im not planning to reinstall windows for a while.

EthanH (buggyboy79) said : #4

Oh by the way, sry about my bad grammer.

EthanH (buggyboy79) said : #5

Ok, i found out what the problem is but i need your help how to make the changes. Im looking into my menu.lst on my ubuntu. It is said that Linux is set to (hd1,0). But since the window drive is gone, i need to set it back to (hd0,0). can anyone help me with it? Here is my Grub look like.

# 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 use 'savedefault' 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 10

## 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=UUID=4476c335-b4c6-482f-bfb9-efc73b87b4ba ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,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

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) 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

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 8.04.2, kernel 2.6.24-23-generic
root (hd1,0)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4476c335-b4c6-482f-bfb9-efc73b87b4ba ro quiet splash
initrd /boot/initrd.img-2.6.24-23-generic
quiet

title Ubuntu 8.04.2, kernel 2.6.24-23-generic (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4476c335-b4c6-482f-bfb9-efc73b87b4ba ro single
initrd /boot/initrd.img-2.6.24-23-generic

title Ubuntu 8.04.2, memtest86+
root (hd1,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1

EthanH (buggyboy79) said : #6

Actaully, im just changed my mind and decided to get a new hard drive and reinstalled window. After installing my windows back, i just follow this intruction to get my ubuntu back. https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

Andre Mangan (kyphi) said : #7

@ peter b - "what's the idea of having setup grub on a defective hd0/MBR ?"

Common sense dictates that you discard the defective drive and, if no replacement drive is installed, that you change the Master/Slave jumpers (in the case of PATA drives) before restoring GRUB.

peter b (b1pete) said : #8

....'Common sense dictates that you discard the defective drive'.. it is YOUR Common sense dictating YOU do that, it can not dictate it to the user.

Andre, you should have made known to the user what's in your terms ...'Common sense dictates ...' BEFORE making statements like

....'You can use your live CD to boot, go into "Rescue Mode" and follow the instructions.

You can also (from the live CD) in a terminal restore GRUB:

sudo grub
find /vmlinuz ( this will return a value that looks like this (hd0,4)) - that is a value from my computer.
root (hd0,4) - substitute your values
setup (hd0)
type:quit
Reboot.'....

regards,
peter b

Andre Mangan (kyphi) said : #9

The failed hard drive had failed to function and therefore may be deemed not to exist since it cannot be accessed by the system. It follows that the second hard drive will have to accommodate GRUB.

If I have missed something here, I would value your tutelage (without shouting please).
Without replacing the drive, how would you have made Ubuntu bootable?

peter b (b1pete) said : #10

 just to to be clear

- personal omissions when brought up on any writing hurt ; the authors in almost every case justify them by throwing with no reason at all sweet netiquette catch all words like yours ...'without shouting please'....; you can use them in any context you please/wish BUT (oops! I trespassed again the netiquette) the fact remains unaltered and bare, netiquette or not, that the omission was there like it or not and ..... again, like it or not, you (netiquette or not) were the author. but because netiquette applies whether one is right or not ...'without shouting please'... is ok to be used in any circumstance, mudding the waters.

- about .....'I would value your tutelage'.... it is very far from me (it is nowhere in my books) to assume such function; I hope you're a grown up and understand what's the meaning on any writing of capital letters especially in this context.

- I just wanted to let you know (specifically bring it to your att'n because it was proven that somehow there were some jars mixed up by somebody - read below) or, to be to the point, your (to fully comply with your netiquette ...'without shouting please'...) assumptions .....'function and therefore may be deemed not to exist since it cannot be accessed by the system. It follows that the second hard drive will have to accommodate GRUB.'..... and previous .....'Common sense dictates'.... were never made known to the user in need of assistance yet a detailed solution was advanced.

- if you make the effort you can see above that with ....'what's the idea of having setup grub on a defective hd0/MBR ?'....I tried v gently to prompt you to clarify to the user on what basis your given detailed solution can be implemented, but there was never any clarification (none to the user) only much later and, guess to whom did you clarify your solution ? to ME (I skipped again the netiquette - hope you don't use again ...'without shouting please'...this time is me) with the famous .....'Common sense dictates'.... and, on a new post, you again clarify to ME ....'The failed hard drive had failed to function and therefore may be deemed not to exist since it cannot be accessed by the system. It follows that the second hard drive will have to accommodate GRUB.'.....

I'm sorry Andre, I did not ask or need your help on this matter - it was the user that asked and needed help. I just helped him/offered him in one short sentence just one of the solutions to get him out of his bind (only post on this thread) solution which he apparently embraced.

again sorry Andre, I had nothing to learn from your netiquette - mine is different than yours - and thanks God I know to whom to respond when asked and. most importantly, I openly spell out the facts by giving the user all assumptions in implementing the solution proposed. as said, ones 'common sense dictates ....' and not made known to the user can not 'dictate'.

I hope you noticed above ....'just one of the solutions to get him out of his bind'..... I'll leave it up to you to make whatever you want out of it.

regards,
peter b

ps. one last word, I 'appreciate' your netiquette deeply by not using your name at the end of the last 2 posts addressed to me not to mention the lack of at least a .......