GRUB rescue

Asked by hallenrm

I have both Windows NT and Ubuntu on a PC. I can access my file in the Windows partition when i boot with Karmic, but cannot do so, (even though I can see them in the filemanager) when i boot in Lucid Lynx which i installed only very recently using a LiveCD. I thought it must be because of limited disk apace after several partitions : Ubuntu 6.1 -- 3.5 GB; Windows NT---21 GB, Ubuntu 9.1-- 21 GB and now Ubuntu 10.04 -- 16 GB.

So, i tried to remove the 3.5 GB Patition using the Disk Utility. Now I just cannot Boot into the system, because on starting up, I get a prompt GRUB rescue. What is the most reliable and easy solution? Should i use BootUploader, after downloading it from http://ubuntuforums.org/showthread.php?t=1014708 or should i use GRUB-disk_0.97-59 all.deb ???

Hallenrm

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu pm-utils Edit question
Assignee:
No assignee Edit question
Solved by:
Tom
Solved:
Last query:
Last reply:
Revision history for this message
Tom (tom6) said :
#1

Hi :)

Neither!! Ubuntu 10.04 uses the very much newer & more sophisticated Grub2 which has a lot of advantages over previous boot-loaders. The problem is that we don't entirely understand it yet in this forum so the easiest answer at the moment is to just re-install the grub2

https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

it is not n elegant answer but it doesn't take long. I am sure there is a far more elegant way of doing this but we are still working on discovering it.

I can help guide you through that guide if you could just copy&paste into here the output of

sudo fdisk -l

where "-l" is a lower-case "-L".
Good luck and regards from
Tom :)

Revision history for this message
hallenrm (hallenrm-yahoo) said :
#2

That's indeed a link to a very very informative article. Thanks a lot. I will print it tomorrow morning and try to follow the instructions. The PC in question is in my office and i am at present at home!!

Cheers!

Rakesh

Revision history for this message
Tom (tom6) said :
#3

Ouch, or goood depending on which way you think about it ;)
I prefer using copy&paste when using those guides, just to make sure i get all the right spaces in & stuff. Perhaps not easy to get the page to your works machine tho.

Good luck and regards from
Tom :)

Revision history for this message
hallenrm (hallenrm-yahoo) said :
#4

Well, you were right, it is indeed very confusing!

So here are the details you sought:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x062c062b

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2550    20482843+   7  HPFS/NTFS
/dev/sda2            2551        7738    41672579+   f  W95 Ext'd (LBA)
/dev/sda3            7739        9729    15992707+  83  Linux
/dev/sda5            7650        7738      714861   82  Linux swap / Solaris
/dev/sda6            2943        5475    20339800+  83  Linux
/dev/sda7            7466        7649     1477948+  82  Linux swap / Solaris
/dev/sda8            5475        7376    15272960   83  Linux
/dev/sda9            7376        7465      716800   82  Linux swap / Solaris

Now, i will wait for your reply before attempting anything.

Thanks a lot!

Rakesh

--- On Thu, 22/4/10, Tom <email address hidden> wrote:

From: Tom <email address hidden>
Subject: Re: [Question #108015]: GRUB rescue
To: <email address hidden>
Date: Thursday, 22 April, 2010, 12:59 AM

Your question #108015 on pm-utils in ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/pm-utils/+question/108015

Tom posted a new comment:
Ouch, or goood depending on which way you think about it ;)
I prefer using copy&paste when using those guides, just to make sure i get all the right spaces in & stuff. Perhaps not easy to get the page to your works machine tho.

Good luck and regards from
Tom :)

--
You received this question notification because you are a direct
subscriber of the question.

Revision history for this message
Best Tom (tom6) said :
#5

Hi :)

If you have specific suggestions for improving the guides then that would be immensely helpful. Perhaps you could help us edit it after going through the process yourself?

Hopefully we should be able to get something working fairly quickly. So boot up a LiveCd of 9.10 or 10.04. Using the guide
https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD
see that we are already at step 4 :) So, into a command-line type (or copy&paste with the mouse would be better)

sudo mount /dev/sda9 /mnt

Note that there are 3 spaces in that line breaking it into 4 sections. The "/mnt" is a 'tag' & these are for telling the command exactly what to do or how to do it.The "/dev/sda9" is an 'address' of a place. We sometimes call this sort of thing a "pathname". The "mount" is the main command here. "Sudo" is a command to let you be the SuperUser to DO the command.

As a normal user most of the time you just need simple access to do harmless stuff but occasionally you want to do things that could be bad for the system so it's important to be able to prevent those from being done carelessly. Windows allows programs to jump into SuperUser mode quite carelessly which is one of the main reasons why there are so many viruses & malware able to affect Windows so much. In linux we stay safe as normal user but make occasional use of SuperUser only when we really need to.

Anyway, on a linux command-line you can get a quick-guide cheat-sheet on how to use a particular command by adding the tag "-h" or sometimes "--help" after the command. It's usually enough to check that advice in forums is ok and not likely to wipe your entire system or blow up the world or something. So, try

sudo -h
mount -h

just to see examples of the cheat-sheets. These are really useful to save people from having to remember tiny detail and they are also good if functionality is increased. Try

totem -h

Ok, back to the guide for step 5

sudo grub-install --root-directory=/mnt/ /dev/sda

Again 3 spaces. The "/dev/sda" is the pathname. The "--root-directory=/mnt/" is the tag and the commands are in the same places as before. I am not quite sure why tags & pathnames are sometimes in a different grammatical order. My 2 current theories are that
1. Perhaps the order doesn't matter, or
2. All the commands (packages) are written by different people
Given the extreme care and arduous "standards" and alpha & beta testing that goes into each package i suspect that probably 1 is more likely than the chaos suggested by 2. However, i wouldn't test this theory just yet!!

Back to the guide for step 6 = Reboot the machine. The grub2 menu should contain all the different Operating Systems on your machine but it might only list Ubuntu (the 10.04 one) so boot into that and try this on a command-line to force it to recognise the others

sudo update-grub

Please let me know how this goes!
Good luck and regards from
Tom :)

Revision history for this message
hallenrm (hallenrm-yahoo) said :
#6

Well, it all went very well. and I can use my machine as before the disaster.

The two problems, however, persist.

1. I cannot open my Yahoo mail. The system stops halfway attempting to open the login page, giving no clues whatsoever why it cannot open the page!

2. I cannot access files in the Windows partition, though i can view them. It is perhaps because of little disk space for swap. While installing 10.04, i was perhaps given a clue while creating fresh partition.

Is there a way to solve them?

Thanks a lot and Cheers!

Rakesh

Revision history for this message
Tom (tom6) said :
#7

Hi :)

Yes, sorting out swap would be the best & easiest first step now. I don't think that's the problem but it should help smooth things out a bit for the cpu & ram. So, on a command-line try

sudo apt-get install gparted

gksu gparted

then right click on each of the swaps and do "SwapOff". Then right-click on them again to delete them. Finally Create a New partition, set to file-system type = "linux-swap". This should fill the whole space they used to occupy as they followed on from each other on the drive :) This should make a 3Gb swap which we can check by typing

free -m

on the command-line after you close gparted. Please let us know the output of the "free -m" command to check the size of swp compared to "Mem" (=Ram)
Good luck and regards from
Tom :)

Revision history for this message
hallenrm (hallenrm-yahoo) said :
#8

Sorry but it did not work as you expected! Here is how it proceeded:

sudo apt-get install gparted
[sudo] password for rakesh:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  xfsprogs reiserfsprogs reiser4progs jfsutils kpartx dmraid
The following NEW packages will be installed:
  gparted
0 upgraded, 1 newly installed, 0 to remove and 267 not upgraded.
Need to get 472kB of archives.
After this operation, 4,268kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ lucid/main gparted 0.5.1-1ubuntu2 [472kB]
Fetched 472kB in 5s (84.4kB/s)
Selecting previously deselected package gparted.
(Reading database ... 122157 files and directories currently installed.)
Unpacking gparted (from .../gparted_0.5.1-1ubuntu2_i386.deb) ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for python-gmenu ...
Rebuilding /usr/share/applications/desktop.en_IN.cache...
Processing triggers for python-support ...
Setting up gparted (0.5.1-1ubuntu2) ...

rakesh@rakesh-desktop:~$ gksu gparted
======================
libparted : 2.2
======================

** (gpartedbin:1719): CRITICAL **: murrine_style_draw_box: assertion `height >= -1' failed

** (gpartedbin:1719): CRITICAL **: murrine_style_draw_box: assertion `height >= -1' failed

** (gpartedbin:1719): CRITICAL **: murrine_style_draw_box: assertion `height >= -1' failed

** (gpartedbin:1719): CRITICAL **: murrine_style_draw_box: assertion `height >= -1' failed

** (gpartedbin:1719): CRITICAL **: murrine_style_draw_box: assertion `height >= -1' failed

After the first swapoff, i was not permitted to do any other or delete any other swap

What do you suggest now?

Rakesh

--- On Thu, 22/4/10, Tom <email address hidden> wrote:

From: Tom <email address hidden>
Subject: Re: [Question #108015]: GRUB rescue
To: <email address hidden>
Date: Thursday, 22 April, 2010, 10:30 PM

Your question #108015 on pm-utils in ubuntu changed:
https://answers.launchpad.net/ubuntu/+source/pm-utils/+question/108015

Tom posted a new comment:
Hi :)

Yes, sorting out swap would be the best & easiest first step now. I
don't think that's the problem but it should help smooth things out a
bit for the cpu & ram. So, on a command-line try

sudo apt-get install gparted

gksu gparted

then right click on each of the swaps and do "SwapOff". Then right-click
on them again to delete them. Finally Create a New partition, set to
file-system type = "linux-swap". This should fill the whole space they
used to occupy as they followed on from each other on the drive :) This
should make a 3Gb swap which we can check by typing

free -m

on the command-line after you close gparted. Please let us know the output of the "free -m" command to check the size of swp compared to "Mem" (=Ram)
Good luck and regards from
Tom :)

--
You received this question notification because you are a direct
subscriber of the question.

Revision history for this message
Tom (tom6) said :
#9

Hi :)

The clue is "and 267 not upgraded". In linux systems it is much more relevant to keep the system updated.

In a Windows system almost all the updates are "Security update"s because they have a very low priority on making sure their systems are robust, stable and lack vulnerabilities. However they do rush to produce functionality. Security tries to get bolted on afterwards. Even the security patches only get tested on a small range of real machines with most of the testing being done on virtualised environments.

Linux places security first & functionality lower down. So almost all the updates are about increasing functionality. Even the added functionality has been written with security as top priority and gets rigorously bug-tested on a vast range of real-world machines before official release.

Also Windows updates are only aimed at the core operating system. Each program has to sort itself out some other way. Contrast that with linux where all packages right across the system are carefully maintained and upgraded centrally through the package managers.

So, open Synaptic Package Manager, click on "Mark all updates" and click on "Apply". Hopefully you should then find that both gparted & yahoo work just fine :)

Please let us know how this goes!
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#10

Hi again :)

Please try to avoid just replying to the emails. Please try to click on the links to navigate into your thread here at Launchpad. Alternatively when you click on reply please immediately delete all the bit that we sent you (CtrlA & then delete). At the moment i see all my replies posted at least twice and it's getting very confusing and quite difficult to keep scrolling up to try to find the bit that is your reply.

Don't worry, we all did something similar when we first started using Launchpad as each forum works slightly differently. I should have said something earlier.

Errr, ahh yes, Synaptic is, from the top taskbar

System - Administration - Synaptic

Good luck and regards from
Tom :)

Revision history for this message
hallenrm (hallenrm-yahoo) said :
#11

Sorry, for replying so late; but my Internet connection at work was very slow for about a weak (it was reportedly due to damaged inter-continental cable link), so i could not update! Now that i have updated, i can now view files in the Windows partition from my Ubuntu 10.04 log in. But I still cannot open the login window of Yahoo mail. Any fresh idea?

Cheers!

Rakesh

Revision history for this message
Tom (tom6) said :
#12

Hi :))

Welcome back :) Yeh, these things happen sometimes, don't worry. It might be best to re-post this as a new question
https://answers.launchpad.net/ubuntu/+source/pm-utils/+addquestion
because Launchpad can't really handle questions very well if they are more than a couple of days old.

However is still think we have a few things we can try out in this thread while the new thread starts. Firstly please can you try to re-install gparted?

sudo apt-get install gparted

and also give us the output of these 2 commands? Note this is all about general tidy-up still because i can't see a good reason why i can get Yahoo mail and you can't, except that i am very fussy about my system sometimes. So the output of these 2 command's might help show some problem

free -m

sudo fdisk -l

where "-l" is a lower-case "-L". I think you have already gone through the Medibuntu worksheet on this install. It doesn't really hurt to go through it again but i don't think you need to.

Good luck and regards from
Tom :)