LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-10-2010, 11:32 PM   #1
telestrial
LQ Newbie
 
Registered: May 2008
Posts: 26

Rep: Reputation: 15
Grub2 - Error 15


Hello

As the title suggests, I upgraded to Grub2...probably foolishly so because now my computer will not boot. I get error 15 before the choices even come up. I searched around the forums and google and for the most part saw this solution. However, this does not work. All the commands input successfully, but it hasn't fixed the problem. I'm running 9.10 on a Sony-Vaio FW-139E.

Note: this is after I already did the "upgrade-from-legacy" thing. I boot each option successfully before doing this.

Thanks for any help you can give!

Last edited by telestrial; 03-10-2010 at 11:51 PM.
 
Old 03-11-2010, 12:48 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,053

Rep: Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971
Did you take note of the instruction to make a selection with the space bar ?.
 
Old 03-11-2010, 08:40 AM   #3
telestrial
LQ Newbie
 
Registered: May 2008
Posts: 26

Original Poster
Rep: Reputation: 15
The first thing that came up said something about a string it took from somewhere...but it was blank....so I just hit okay. Then it asked something else...and I left that default..and hit okay. Then it came up with the informational thing...again I hit okay. And then I selected "sda" as the target device.

Did I miss something?
 
Old 03-11-2010, 12:42 PM   #4
fair_is_fair
Member
 
Registered: May 2005
Posts: 511

Rep: Reputation: 51
You can boot up the live cd and run these commands via terminal.

ls /media [This will show you the partitions. Pick the one where 9.10 is installed and input the volume number into the next command.

sudo grub-setup -d /volume number/sda5/boot/grub /dev/sda [specify your 9.10 partition number in sda5. This will reinstall grub2 to mbr.

sudo grub-setup /dev/sda

This should restore grub2 for you. Worked for me.
 
Old 03-11-2010, 03:54 PM   #5
telestrial
LQ Newbie
 
Registered: May 2008
Posts: 26

Original Poster
Rep: Reputation: 15
You meant that ls /media would show the volume number, right? That's how I interpreted it.

Anyway....this is what I got:

Code:
grub-setup: error: Cannot open `/boot/grub/device.map'
=\

Any suggestions?
 
Old 03-11-2010, 04:21 PM   #6
fair_is_fair
Member
 
Registered: May 2005
Posts: 511

Rep: Reputation: 51
Mount the partition 9.10 is on via "places" or "computer" in your task bar. I assume you are running the live cd. It will give you the volume number right at the top of the file browser. Try and run the commands again.

If you are getting the error after running the commands with the proper volume number then I'm lost.
 
Old 03-11-2010, 04:25 PM   #7
telestrial
LQ Newbie
 
Registered: May 2008
Posts: 26

Original Poster
Rep: Reputation: 15
Still nothing. I can even go through the file system and see device.map. It is there.

....so......?
 
Old 03-11-2010, 04:42 PM   #8
fair_is_fair
Member
 
Registered: May 2005
Posts: 511

Rep: Reputation: 51
Grub2 doesn't have a device.map. Are you sure you are dealing with grub2? Grub2 is the default bootloader for ubuntu 9.10 which I assumed you have installed.
 
Old 03-11-2010, 04:53 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,053

Rep: Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971Reputation: 971
Grub2 is only the default on Karmic for fresh installs - upgrades retain (legacy) grub.
I believe this to be the OPs situation.

For reasons that are becoming apparent in the wider user base I refuse to use grub2. Unfortunately I can't help with this.
 
1 members found this post helpful.
Old 03-11-2010, 05:02 PM   #10
fair_is_fair
Member
 
Registered: May 2005
Posts: 511

Rep: Reputation: 51
For legacy grub the commands would be:

sudo grub

> root (hd0,0)

> setup (hd0)

> exit

(hd0,0) would be the partition legacy grub files are on, hence your linux installation. If your linux install is on sda4 then you would use (hd0,3). Legacy grub always numbers the first partition 0.

(hd0) would signify the mbr of your drive sda.

find /boot/grub/stage1 is the command to find your grub installation if you are unsure.
 
Old 03-11-2010, 05:11 PM   #11
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,479

Rep: Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696Reputation: 696
Did you do a fresh install of Ubuntu 9.10?
The "upgrade from legacy thing" you refer to in your first post, was that update from Grub legacy?

How many hard drives do you have, one?
What operating systems do you have, only Ubuntu?
Open a terminal and run the command "sudo fdisk -l", without quotes, lower case Letter L in command and post the output here.
Do you have a menu.lst file in /boot/grub directory?
Do you have a grub.cfg file in /boot/grub directory?
 
Old 03-11-2010, 05:12 PM   #12
fair_is_fair
Member
 
Registered: May 2005
Posts: 511

Rep: Reputation: 51
Thanks syg. I was not aware of that. Thus lies the crux of the problem.

I've had to spend quite a bit of time with grub2 lately dealing with my own multiboot situations.
 
Old 03-11-2010, 05:53 PM   #13
telestrial
LQ Newbie
 
Registered: May 2008
Posts: 26

Original Poster
Rep: Reputation: 15
Hey guys. I figured it out! I guess when you have a midterm paper due the following day you get gutsy and experiment....

To explain my situation: I updated to 9.10 from whatever came before...so I still had original grub..BUT..I (of course) wanted the newest. I don't know why. I dual-boot Ubuntu and Vista. Vista has a recovery partition and a normal one, and ubuntu has its "/" and then swap. I downloaded the grub2 package...ran it...rebooted, and everything checked out. I booted into both Windows and Linux fine. SO...I did the "upgrade-from-legacy-grub" thing in terminal..and rebooted...error 15.

All that I needed to do apart from what you told me was chroot into the partition that had /boot/grub on it.

...I don't know why.

Thanks for the help, though. I wouldn't mind posting the entire process if need be. ...It is nothing magical.
 
Old 03-11-2010, 06:26 PM   #14
aus9
Guru
 
Registered: Oct 2003
Posts: 5,055

Rep: Reputation: Disabled
hi

in case ppl come here from a google search.....let me repeat that error 15 is a grub-legacy error messsage and not a grub2 error.

Therefore, your bootloader was either grub-legacy in mbr.....looking for a file.....and not finding it or (and rarely)
grub2 is in mbr....chainloads to grub-legacy.....grub-legacy looking for a file and not finding it.

2) In most cases.....a live cd....with chroot commands and running in root mode.....the command upgrade-from-grub-legacy will solve it

this command knows you are using grub-legacy and you select the correct drive.....eg /dev/sda....to install grub2 into the correct mbr.

3) It gets exciting when ppl are not sure which is their corrrect drive.....when they have multiple drives....and or they do things with their bios boot order.

4) grub2 has a device.map file FYI my contents is

(hd0) /dev/sda

5) Only for the technical purists....there is a way....normally using a live cd....to tell which grub is in mbr.....for each of your drives.....but you still need to check your bios boot order...............

...change sda for hda or sdb etc

Code:
dd if=/dev/sda bs=512 count=1 | strings
GRUB
ZRr=
1+0 records in
1+0 records out
`|f	
\|f1
GRUB 
512 bytes (512 B) copiedGeom
Hard Disk
Read
 Error
, 1.8806e-05 s, 27.2 MB/s
one of my older researching neatened up had this

Code:
legacy output
GRUB
ZRrK
D|f1
GRUB
Geom
Hard Disk
Read
 Error


grub2 output
GRUB
ZRr=
H|f
D|f1
GRUB
Geom
Hard Disk
Read
 Error
and its hard to tell sometimes so here is the cheat...grub2 (hopefully) should have a string of .......*|f

Last edited by aus9; 03-11-2010 at 06:31 PM. Reason: spelling
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error with grub2 mierdatuti Ubuntu 1 02-10-2010 10:36 AM
Booting Fedora 12 from Ubuntu's Grub2, ERROR: NOT AN ASSIGNEMENT mitchell7man Linux - Newbie 4 02-04-2010 02:17 AM
Grub2 (grub-1.96) ERROR: NOT AN ASSIGNMENT ssenuta Linux - General 7 09-02-2009 08:15 AM
GRUB2 error unknown command intrid niravshah Linux - Newbie 4 07-20-2009 01:30 PM
Error 18 when trying to boot with GRUB or GRUB2 DaneM Linux - Software 6 09-20-2005 02:45 PM


All times are GMT -5. The time now is 02:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration