Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub2 will not boot, syntax error in line 16-18
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Mon Dec 21, 2009 10:23 pm    Post subject: Grub2 will not boot, syntax error in line 16-18 Reply with quote

I've been following a guide in the Documentation, tips, and tricks section of the forums here...

I've sucessfully installed grub2 and everything is working nicely except for two things:

1. The system does not boot automatically. It says "syntax error in lines 16-18. Hit any key to continue." Then it loads to the grub command line prompt. There I am able to manually load the kernel and then it boots fine.

2. There is none of the fancy boot stuff as talked about in the thread. Its just plain text as it normally is.

Here is my /boot/grub/grub.cfg:

Code:
set default=1
set timeout=10

insmod terminal
insmod 915resolution
insmod gfxterm
insmod vbe
insmod font
insmod jpeg

915resolution 5c 1024 600
font /boot/grub/unifont.pff
set gfxmode=1024x600
terminal gfxterm

set menu_color_normal=white/black
set menu_color_highlight=white/dark-gray
background_image (hd0,1)/boot/grub/bluelines.jpg

menuentry "Gentoo Linux (lean setup)" {
        set root=(hd0,1)
        linux /boot/kernel-2.6.32-rc8-zen1 root=/dev/sda3 video=vesafb:mode=1024x600-32 vga=604 \
                splash=verbose,theme:eeepc quiet console=tty1 fbcon=scrollback:64K softlevel=nonetwork

        # The "video=vesafb:mode=1024x600-32" is possibly not required, but vga=604 is important.
        # vga=604 corresponds to the video mode 0x25c, which we overwrote with 915resolution before.
}

menuentry "Gentoo Linux (full power)" {
        set root=(hd0,1)
        linux /boot/kernel-2.6.32-rc8-zen1 root=/dev/sda3 video=vesafb:mode=1024x600-32 vga=604 \
                splash=verbose,theme:eeepc quiet console=tty1 fbcon=scrollback:64K
}
# vim:ft=conf:

menuentry "Microsoft Windows XP" {
        set root=(hd0,4)
        devicemap -s hd0 hd1
        chainloader +1
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Dec 22, 2009 1:16 am    Post subject: Reply with quote

Hi, you don't have the last } at the end of the file.

Also, did you try without all that stuff :

Code:

915resolution 5c 1024 600
font /boot/grub/unifont.pff
set gfxmode=1024x600
terminal gfxterm

set menu_color_normal=white/black
set menu_color_highlight=white/dark-gray
background_image (hd0,1)/boot/grub/bluelines.jpg
Back to top
View user's profile Send private message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Tue Dec 22, 2009 2:47 am    Post subject: Reply with quote

Hey thanks for the reply.

I've tried commenting that out and that did not help. After I did that, it said that there was a syntax error in lines 9-11.

The main reason that I migrated to grub2 was that I wanted a fancy boot screen... not just text, and that guide seemed promising. And I'm sure it is, I must have something wrong.

One thing that is in question is that I put grub.cfg in /boot and in /boot/grub. Was it only supposed to go in /boot?

I did add the } at the end of the file, but that did not change anything.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Dec 22, 2009 3:18 am    Post subject: Reply with quote

Did you read this one : http://en.gentoo-wiki.com/wiki/Grub2

Code:

# /sbin/grub-mkconfig -o /boot/grub/grub.cfg
# nano /etc/grub.d/11_Other_OS
# chmod a+x /etc/grub.d/11_Other_OS
# nano /etc/default/grub


It seems that you don't edit at all grub.cfg but you use /etc/grub.d to configure your things and /etc/default/grub too.
Back to top
View user's profile Send private message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Tue Dec 22, 2009 4:08 am    Post subject: Reply with quote

Hmm... maybe that is my answer.

I find it very odd, however, that this was not discussed in the howto.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Dec 22, 2009 12:44 pm    Post subject: Reply with quote

Grub2 is pretty new and as far as I know, we will need to double check how grub2 really works, because right now, we cannot use Grub2 like we used to use /boot/grub/grub.conf.

We need to run some script to get the job done.
Back to top
View user's profile Send private message
shgadwa
Guru
Guru


Joined: 12 Mar 2009
Posts: 327

PostPosted: Tue Dec 22, 2009 4:36 pm    Post subject: Reply with quote

d2_racing wrote:
Grub2 is pretty new and as far as I know, we will need to double check how grub2 really works, because right now, we cannot use Grub2 like we used to use /boot/grub/grub.conf.

We need to run some script to get the job done.


Sooooo, all I really wanted to do was to get rid of a the text at bootup and show a nice theme of some sort that shows some kind of a logo and a status thing that shows you how far along the boot process is. I thought that the howto was the best way for me to do what I wanted to do, and now I think maybe it wasn't.

So, how stable is grub2? I'm thinking that I might have to upgrade to 9999, but if its not very stable right now I might as well downgrade to stable grub and then install a fancy boot theme.

So, if I end up downgrading, I think the process is something like this:

1. Uninstall grub2 and remove it from /etc/portage/package.keywords.
2. Reinstall grub 1 and copy over the /boot/grub/grub.conf file.
3. grub-install --nofloppy /dev/sda

Is that right? Or maybe I should just stick with grub2 and get it working?
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Tue Dec 22, 2009 10:07 pm    Post subject: Reply with quote

I don't know, I don't use GRUB2, but I think that your solution may work.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Thu Dec 24, 2009 2:35 am    Post subject: Reply with quote

Grub-2 is not ready yet, it's still under heavy development, at least the implementation part of it is.

What you're probably looking for is media-gfx/bootsplash-themes that work fine with grub-legacy.

:arrow: Look here for assistance.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Dec 24, 2009 3:48 am    Post subject: Reply with quote

Mike, did you play with Grub2 ? If yes, can you post your feedback, because I know only one person that played with Grub2 and it's actually working pretty good, but he uses Funtoo.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Thu Dec 24, 2009 4:20 am    Post subject: Reply with quote

d2_racing,

True, that is because Funtoo is working very hard on developing a proper implementation for Grub-2, but only for testing on non-production test machines.

For more information you can look at the Funtoo Core Boot Framework and the grub-2 stuff on the funtoo-dev mailing list.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Dec 24, 2009 3:23 pm    Post subject: Reply with quote

Mike,Did you try Grub2 with Gentoo ?

I'm waiting for some feedback before creating a French wiki about the subject and also to have more technical stuff on how to install it and managing it properly.
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Thu Dec 24, 2009 5:07 pm    Post subject: Reply with quote

There is no hurry for that, it's all only at the beginning stages of developement for Gentoo based systems right now, and likely for a quite a while still.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sat Dec 26, 2009 4:05 am    Post subject: Reply with quote

You are right, but if you use it, let me know :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum