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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
08-29-2009, 09:31 AM
|
#1
|
|
Member
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 114
Rep:
|
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?
|
|
|
|
08-29-2009, 10:13 AM
|
#2
|
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 3,932
|
Did you try init=3? The "=" is the assignment operator.
|
|
|
|
08-29-2009, 08:59 PM
|
#3
|
|
Member
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 114
Original Poster
Rep:
|
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.
|
|
|
|
08-31-2009, 10:30 AM
|
#4
|
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 3,932
|
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.)
|
|
|
|
08-31-2009, 08:15 PM
|
#5
|
|
Member
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 114
Original Poster
Rep:
|
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.
|
|
|
|
08-31-2009, 08:29 PM
|
#6
|
|
Guru
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594
|
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
|
|
|
|
09-01-2009, 11:53 AM
|
#7
|
|
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 3,932
|
Quote:
Originally Posted by GrapefruiTgirl
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.
|
|
|
|
09-02-2009, 08:15 AM
|
#8
|
|
Member
Registered: Mar 2006
Location: NYS
Distribution: Mandriva-2006
Posts: 114
Original Poster
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:09 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|