LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-29-2009, 09:31 AM   #1
ssenuta
Member
 
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 116

Rep: Reputation: 16
Grub2 (grub-1.96) ERROR: NOT AN ASSIGNMENT


Grub2 grub.cfg (menu) will not boot a new menuentry unless that entry starts a new kernel
or new device. I cannot just change a kernel boot parameter option & get grub2 to boot from
its menu when the same kernel or device already has a menu entry.

However, pressing the "e" key for a selected menu item & adding a kernel boot option will
allow grub boot Linux with the new options.

Here is an example of two grub2 (grub.cfg) menu entries (The 1st entry will boot but not the 2nd entry):

menuentry "Linux-Sata 2.6.30" {
set root=(hd0,1)
set prefix=/grub
linux (hd0,1)/bzImage-2.6.30 root=/dev/sdb2 ro resume=/dev/sdb5 vga=771 raid=noautodetect
}

menuentry "Linux-Sata 2.6.30-runlevel-3" {
set root=(hd0,1)
set prefix=/grub
linux (hd0,1)/bzImage-2.6.30 root=/dev/sdb2 ro init 3 resume=/dev/sdb5 vga=771 raid=noautodetect
}

Please note that the only difference aside from the menuentry "names" is the addition of the "init 3"
kernel boot option to the 2nd menuentry item.

Does anyone know why Grub2 won't boot my 2nd menuentry. It just complains with ERROR: NOT AN ASSIGNMENT?
What exactly is an assignment anyway?
 
Old 08-29-2009, 10:13 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Did you try init=3? The "=" is the assignment operator.
 
Old 08-29-2009, 08:59 PM   #3
ssenuta
Member
 
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 116

Original Poster
Rep: Reputation: 16
No, I haven't tried "init=3" but I will. However, "init 3" is the kernel boot parameter I used in Grub-Legacy & it worked.

I also have the following menuentry & it gives the same ERROR: NOT AN ASSIGNMENT. You'll note that the kernel boot parameter "confirm" doesn't use an (=) equal sign.

menuentry "Linux 2.6.30-confirm" {
set root (hd0,1)
set prefix=/grub
linux (hd0,1)/bzImage-2.6.30 root=/dev/sdb2 ro confirm resume=/dev/sdb5 vga=771 raid=noautodetect
}

The "confirm option allows me to step thru the boot process & select
the process I want to start. I have trouble remembering that option so, if I can have a grub.cfg menu with it, it helps.

Last edited by ssenuta; 08-29-2009 at 09:01 PM.
 
Old 08-31-2009, 10:30 AM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
From the GRUB2 documentation:
Quote:
Extra options or text at the end of the line are ignored unless otherwise specified.
So, since the option isn't being ignored, try:
Code:
menuentry "Linux-Sata 2.6.30" {
set root=(hd0,1)
set prefix=/grub
linux (hd0,1)/bzImage-2.6.30 root=/dev/sdb2 ro resume=/dev/sdb5 vga=771 raid=noautodetect
}

menuentry "Linux-Sata 2.6.30-runlevel-3" {
set root=(hd0,1)
set prefix=/grub
linux (hd0,1)/bzImage-2.6.30 root=/dev/sdb2 ro resume=/dev/sdb5 vga=771 raid=noautodetect init 3
}
menuentry "Linux 2.6.30-confirm" {
set root (hd0,1)
set prefix=/grub
linux (hd0,1)/bzImage-2.6.30 root=/dev/sdb2 ro resume=/dev/sdb5 vga=771 raid=noautodetect confirm
}
The ro may also need to be moved to the end of the line, but it may be a "specified" option. (The documentation is, um, "less than complete," eh.)
 
Old 08-31-2009, 08:15 PM   #5
ssenuta
Member
 
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 116

Original Poster
Rep: Reputation: 16
I tried changing kernel option from "init 3" to "init=3" but it was ignored without error because there is no file called "3". The kernel option "init=[file]" is used to assign the init process to a different file instead of /sbin/init.

I will try changing the order of my kernel options like you suggested & post my results later.
 
Old 08-31-2009, 08:29 PM   #6
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543Reputation: 543
I suspect the same should apply in your case as it does with LILO; I don't use GRUB, but I have found that when giving an init option on the command line (boot line) I have not needed a space in it. You could try:

init3

and see if it likes that?

Good luck,
Sasha
 
Old 09-01-2009, 11:53 AM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,147

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Quote:
Originally Posted by GrapefruiTgirl View Post
I suspect the same should apply in your case as it does with LILO; I don't use GRUB, but I have found that when giving an init option on the command line (boot line) I have not needed a space in it. You could try:

init3

and see if it likes that?

Good luck,
Sasha
That reminds me: Fedora accepts a 3 by itself - no init needed - to boot to level 3.
 
Old 09-02-2009, 08:15 AM   #8
ssenuta
Member
 
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 116

Original Poster
Rep: Reputation: 16
I just tried using "init3" instead of "init 3" & grub2 still complains with ERROR: NOT AN ASSIGNMENT.

I also tried moving the "ro" & "init 3" to the end of my kernel's boot option line but grub2 still complains with ERROR: NOT AN ASSIGNMENT.

Thanks for the suggestions but the following grub2 problem still exists:

Grub2 grub.cfg (menu) will not boot a new menuentry unless that entry starts a new kernel
or new device. I cannot just change a kernel boot parameter option & get grub2 to boot from
its menu when the same kernel or device already has a menu entry.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help converting grub-legacy to grub2 ssenuta Linux - General 4 08-29-2009 10:04 AM
Installing GRUB or GRUB2 from scratch williamv2 Linux - Newbie 10 03-31-2009 09:31 PM
grub problem and looking for grub2 docs m-jackson Linux - Newbie 1 10-27-2006 02:18 AM
Grub Legacy or Grub2? RAVC Linux - Software 2 01-21-2006 09:43 AM
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:27 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