Error: attempt to read or write outside of disk 'hd0'
Hi there, can you help?
I installed an update on by laptop last night and it asked me to restart so that the update could take place. On doing so I got the above message and the prompt "grub rescue>". Ubuntu was installed on the laptop by a friend of my son when he was visiting us in Wales after our Windows drive crashed. I have absolutely no idea what he did and it is enough for me to turn the machine on everyday. What I am getting at is that unless the help comes in the form of "type this prompt" and then the prompt rather than assuming I know any programming language (which of course I don't) I will not have a clue. Sorry to be so pathetic. Can anyone help? |
Windows probably did a 'fdisk c: /mbr' on the disk, overwriting the master boot record
/cure Provoke grub into reinstalling the mbr. I hesitate to be dogmatic but I think it's grub setup (hd0) where (hd0) is your disk location in grub speak. If not, info grub. /prevention The above is a Royal PITA. For these cases, I am inclined to run dd if=/dev/sda of=/boot/sdambr bs=512 count=1 dd if=/dev/sda1 of=/boot/sdambr1 bs=512 count=1 and have these undocumented backups lying there ready for the next time windows pulls that stunt. |
Thanks businesskid you do realise of course I have no idea what you are referring to. I know absolutely no programming language so what you have said is gobbledygook. :o
What do I need to type in? I typed in /cure, /prevention and the message is 'Unknown command' I typed in both "dd if=/dev/sda etc" and they came back as Unknown commaand 'dd' and Unknown command 'if=/dev/sda' I'm obviously missing something if what you said should work. Any clues? |
Boot your Ubuntu CD, wait until you are connected to the internet, go to the website at the link below and review the page. Open a terminal windows on your computer by holding down the Ctrl+Alt+t keys simultaneously. On the site below, go to the section 2nd Option and copy and paste the first line beginning with 'sudo' (grey box) in your terminal and hit the Enter key. After that completes, repeat the process for the second line. When that completes, scroll down to using Boot-Repair at the site below and follow the instructions. This will download and install the Boot-Repair software and you should be able to repair your bootloader. If this fails, make not of any messages you see on screen and post back.
https://help.ubuntu.com/community/Boot-Repair |
Thanks yancek. One problem though I don't have a copy of the Ubuntu CD my son's friend downloaded an on-line copy (my bad?). Is there anything I can do from the prompt "grub rescue>". Incidentally, in layman's terms what is grub?
|
I followed your link and eventually got to someone who had the same problem. It was suggested to them that they type "ls /" which I did and this is what I got:
Quote:
|
Do you now have a working Live CD?
|
Quote:
You obviously have access to a computer. You could download and burn Ubuntu to a CD and boot it. |
Yes I do have a CD, I've tried loading it in but I get the same message
|
Quote:
|
Sorry, I didn't lay my answer out very well. Let me try again. If you think you want to, try the suggested commands in boxes. The /cure and /prevention were for you, not for the pc :-/.
/cure Provoke grub into reinstalling the mbr. I hesitate to be dogmatic but I think it's Quote:
Quote:
The above is a Royal PITA. For these cases, once things are right, I am inclined to run Quote:
Keep these undocumented backups lying there ready for the next time windows pulls that stunt. |
Thanks again businesskid. I typed in "grub setup (hd0)" as suggested and it came back as Unknown command 'grub'. The other command came back as Unknown command 'info'. :-(
|
Yancek, first the good news! I booted the Ubuntu CD and when it asked whether I wanted to "Try" or "Install" Ubuntu I went for "Try" as I had some files on the PC and I didn't want to lose them. Next the bad news, I checked the files I had and they have all gone. Is there anyway I can recover them? If not is there anyway I can prevent this from happening again otherwise the PC is useless if I can't rely on the machine to keep safe files from one day to the next? I fee like it's 1 step forward and 2 back, urrgggh!
|
I'm not really sure what you did. If you booted the Ubuntu CD and created files on it and rebooted, they will be gone as the Live CD is read-only. Nothing is saved on reboot. If you are referring to files/directories you had on the computer with the installed Ubuntu previously, that is another matter.
Boot the Ubuntu CD, open a terminal by holding down the Ctrl+Alt+t keys simultaneously. Type in: sudo fdisk -l(Lower Case Letter L in the command) and post the output here. That should provide information on your drives/partitions so if you still have partitions on the drive they will show any someone will then be able to explain how you can mount the filesystems to access the data. |
Yes Yancek I had already had Ubuntu before and it was on this that I had the files. As regards the CD when I turned on the machine I pressed F12 which took me to the Boot Option Menu. Of the 3 options 1) IDE 0: WDC WD3200BEVT-22ZCT0, 2) IDE 1: Slimtype DVD A DS8A4SH and 3) Network Boot: Atheros Boot Agent I chose option 2, simply because it said DVD and I didn't know what the others stood for.
After a few minutes the Ubuntu "Welcome" screen came up. As I said before rather than re-installing Ubuntu I pressed "Try Ubuntu". When the main screen came up I typed the command you suggested and got this prompt: ubuntu@ubuntu:~$ I then typed in the command and got: Quote:
Should I be re-installing ubuntu rather than pressing "Try" If I do install will I see the files on my original copy. I'm assuming not as I'm sure it will over-right the lot so... If I can't get the files back will re-installing the disk mean that I don't have to keep going through the same rigmarole to start up. Sorry to take up so much of your time. I just didn't realise it would be so complicated. |
All times are GMT -5. The time now is 09:36 PM. |