# ubuntu 10.10 not booting up.



## sukesh1090 (Apr 30, 2011)

guys i am using Ubuntu 10.10 and windows 7 as dual os from two -three months.i have installed windows in "C" and Ubuntu in "H".i didn't touched Ubuntu from around 3-4 days.two days before i just merged two of my partitions using windows disk management tool.but i didn't changed any thing of drive h and also didn't changed its drive letter.and i also ran the disk check utility through tune up utilities yesterday.today when i booted in to Ubuntu it won't start at ll it just give black screen with something and file not found error and shows grub rescue command.when i booted through live CD i can see all the Ubuntu partitions i created like root,home etc..but still i am not able to boot.please guys help me to get my Ubuntu back. thank you.
here is the pic of the error-


----------



## krishnandu.sarkar (May 1, 2011)

Check these out *help.ubuntu.com/community/Grub2 and *help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

Just follow the tutorial and you'll be able to solve the problem easily.

Don't worry, about the title, I know you didn't reinstalled Windows. But perform the steps your Ubuntu will be back.


----------



## doomgiver (May 1, 2011)

why do you guys always post to the ubuntu grub2 page?
its hell to understand, even for me, and im in no way a noob, having used linux for over a year.

why dont you just condense the commands instead of pointing to a generic page?

op, please do the following :
1. post screenshots of gparted in live cd mode (if you are able to boot into the live cd)
2. run "sudo fdisk -l" command in console, and post the results here. 

if you have any questions, pm me.


----------



## krishnandu.sarkar (May 1, 2011)

I don't understand what's so tough in that page??

Just boot from Live CD, Open Terminal, and copy paste those commands with application of little bit brain.

That's it.

Don't take my words like that, but I guess if one is going to use Linux, he/she must have the patience to read the docs. Ask in any IRC or something they will suggest you to read the docs first. Everything is mentioned there clearly.

If one is looking for linux, he/she must not look for spoon feeding answers.

As I said, don't take my words otherwise, I don't mean it. But I think just copy pasting 3 commands will fix it. @OP just need to replace the media name/ID in eg with what he's having.


----------



## doomgiver (May 1, 2011)

its better to help newbs early on, so that they can learn for themselves.

and the grub page is quite confusing, not the other one.


----------



## krishnandu.sarkar (May 1, 2011)

Yup, you are right, my mistake. Sorry


----------



## doomgiver (May 1, 2011)

yeah, this is the no.1 reson newbs turn away from linux, lack of support.

give the noob a chance to prove himself. but if he repeats the mistake, then. by all means, flame him.


----------



## krishnandu.sarkar (May 1, 2011)

@OP
Boot from Live CD and mount your Ubuntu /boot partition, if you didn't created separate /boot then open the / partition.

Verify if your partition is correct.



> mount | tail -1



You should see output similar to this:



> /dev/sda2 on /media/0d104aff-ec8c-44c8-b811-92b993823444 type ext4 (rw,nosuid,nodev,uhelper=devkit)



Note the designation for the disk /dev/sda which you will be using later, and the directory in /media.

Use Tab Completion in Terminal to complete the path. Hitting the <TAB> key will automatically finish file names, directory locations, and other long or hard to type file names.

To make sure this is indeed the Ubuntu boot partition, run



> ls /media/0d104aff-ec8c-44c8-b811-92b993823444/boot



But substitute the example's UUID, 0d104aff-ec8c-44c8-b811-92b993823444, with your volume's UUID which you found earlier. If your boot partition was a separate partition which you mounted in a previous step, use this instead



> ls /media/0d104aff-ec8c-44c8-b811-92b993823444



In either case, the output should be something like this:



> config-2.6.18-3-686      initrd.img-2.6.18-3-686.bak  System.map-2.6.18-3-686
> grub                     lost+found                   vmlinuz-2.6.18-3-686
> initrd.img-2.6.18-3-686  memtest86+.bin



If what you have is not similar, unmount it and try another partition.

Now that everything is mounted, we just need to reinstall GRUB by specifying the correct directory and the correct drive name:



> sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda



If you get BIOS warnings try:



> sudo grub-install --root-directory=/media/0d104aff-ec8c-44c8-b811-92b993823444 /dev/sda --recheck



Replace /dev/sda with the location you want to install GRUB on.

If all went well, you should see something like this:



> Installation finished. No error reported.
> This is the contents of the device map /boot/grub/device.map.
> Check if this is correct or not. If any of the lines is incorrect,
> fix it and re-run the script `grub-install'.
> ...



Reboot, making sure to boot to your hard drive and not to the live CD. Grub should be installed and both Ubuntu and Windows should have been automatically detected and listed in the menu. 

Copy pasted from *help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


----------



## doomgiver (May 1, 2011)

if op can provide a screenshot of gparted, its going to be even easier


----------



## sukesh1090 (May 1, 2011)

here is the screen shot.


----------



## sukesh1090 (May 1, 2011)

@krishnandu.sarkar
i tried your method everything went well until installing grub.when i tell in to install grub in to 500mb system file it gives some warning.here is the screen shot-


----------



## krishnandu.sarkar (May 1, 2011)

sukesh1090 said:


> @krishnandu.sarkar
> i tried your method everything went well until installing grub.when i tell in to install grub in to 500mb system file it gives some warning.here is the screen shot-



Ya no no not /dev/sda9 it'll be /dev/sda becuase, you are writing it in MBR.

See the error already says you, "Attempting to install GRUB on a partition instead of MBR. It's a bad idea".

So just replace /dev/sda9 with simply /dev/sda.

And 





> Replace /dev/sda with the location you want to install GRUB on


 it meant the drive not the parition, means /dev/sda /dev/sdb /dev/sdc etc.


----------



## sukesh1090 (May 1, 2011)

k now i just have to enter dev/sda nothing else like sdb,sdc.....btw i have another question should i upgrade to 11.04?is it good?and if i upgrade will i loose all my installed programs and customization i have done?thank you.


----------



## krishnandu.sarkar (May 1, 2011)

sukesh1090 said:


> k now i just have to enter dev/sda nothing else like sdb,sdc.....btw i have another question should i upgrade to 11.04?is it good?and if i upgrade will i loose all my installed programs and customization i have done?thank you.



Yes in place of that /dev/sda9, enter /dev/sda

This installs bootloader in MBR, which is far better than installing it in some partition. There is also way for it. That procedure is for installing in MBR.

Well, no if you upgrade to 11.04 you won't loose your programs. But can't suggest about how is it or should you upgrade or not.

Coz I didn't upgraded mine yet, I like to wait for 1 or 2 weeks and will watch the inputs from users who have already upgraded. If anything is broken or something like that. After that I'll upgrade. As this is my primary OS I don't want it to broke down.


----------



## sukesh1090 (May 1, 2011)

i read the discussion here-
*www.thinkdigit.com/forum/technolog...11-04-natty-narwhal-released.html#post1384862
most of them are complaining about the unity interface though it can be replaced with gnome.

i installed the grub and it showed it is successfully installed and no errors found but when i restarted the system it shows a black screen with some grub command and some details like minimal bash command can be entered ...tab commnd can be used....something like this.now even i can't boot in to windows.what should i do now?

please anyone reply me guys i can't boot in to both os


----------



## krishnandu.sarkar (May 1, 2011)

Can you post a screenshot??

Hey BTW did you run sudo update-grub2 after all the steps??


----------



## sukesh1090 (May 1, 2011)

nope i didn't done that.i will try it now.here when i tried the sudo update grub i got this error,


----------



## krishnandu.sarkar (May 1, 2011)

Nope, my mistake, you don't need to run update-grub2, so what happens when you reboot??


----------



## sukesh1090 (May 1, 2011)

it shows a black screen wit grub version detail at the top and later some info like using tab and minimal bash commands are ........and later grub> when i edit boot and hit enter it says kernel not loaded.so what should i do next?
is there a way to tell grub to dual boot?so that i can atleast boot windows.i don't have repair disc to repair the windows boot file.


----------



## krishnandu.sarkar (May 1, 2011)

If it says 





> Installation finished. No error reported.


 it should solved the problem. No idea why is it behaving like this.

Well, 





> If the menu is not normally displayed during boot, hold down the SHIFT key as the computer attempts to boot to display the GRUB 2 menu.


----------



## sukesh1090 (May 1, 2011)

here is the screen shot of the screen during boot(sorry for th low quality).holding shift key won't work.
 btw where should i find the menu.lst file to add windows 7 entry in to it for dual boot.


----------



## krishnandu.sarkar (May 1, 2011)

No no wait, grub2 doesn't have menu.lst, it's depriciated.

From what you have posted avobe for fdisk -l screenshot it looks like /boot doesn't have bootable flag, that could also be a problem.

So boot from Live CD. Go to Terminal. Run

sudo fdisk /dev/sda

and it'll ask for command, press "a" and it'll ask for partition number, so provide the partition number for /boot (which in your case I guess is /dev/sda9 so press 9), and then press "w", and reboot and post the result.

I wish this solves your problem.

Once you get your ubuntu back just boot into it and run sudo update-grub2 and it'll automatically add windows to the list.


----------



## Faun (May 1, 2011)

/boot/grub/menu.lst

Btw your grub versions is 1.98 ?


----------



## sukesh1090 (May 1, 2011)

don't know it shows like that and in software center also it shows like that only.


----------



## sukesh1090 (May 1, 2011)

i tried what you told but when i restart i will get the same screen as before.here is the screenshot what i entered in terminal,


----------



## krishnandu.sarkar (May 1, 2011)

Well, I've no idea now...

You can try this Boot Problems Open Source Tools | Super Grub Disk, Super Grub2 Disk and Rescatux

Once I used it to fix mine.

Give it a try.


----------



## sukesh1090 (May 1, 2011)

can you tell me how to use grub disk usb image to fix my windows mbr


----------



## krishnandu.sarkar (May 1, 2011)

No idea about USB Image, I downloaded CD Image, it restored Ubuntu. And after booting into ubuntu I ran sudo update-grub2 and it updated grub with Windows. So basically I got both.


----------



## sukesh1090 (May 1, 2011)

which one you used among the three of them?


----------



## doomgiver (May 2, 2011)

try this :
*www.thinkdigit.com/forum/1375666-post2.html


----------



## Anish (May 4, 2011)

doomgiver said:


> try this :
> *www.thinkdigit.com/forum/1375666-post2.html



^^ thats great post man.. it is well explained..


----------



## doomgiver (May 4, 2011)

thanks


----------

