LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2013, 02:09 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
How do I give the kernel a parameter.


Hi: I use lilo as the boot loader. When control passes to the boot loader, I can type 'lin', the label of the OS to boot, supposedly followed by some paramenter. Suppose the lilo prompt is 'lilo ' (I do not remember well). Then
Code:
lilo lin abcd
will be accepted by lilo. I.e., it accepts anything. I've writen a valid parameter name, but with no effect at all. How do I pass the kernel a parameter at boot time?
 
Old 01-26-2013, 02:34 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Generally parameters not recognised are ignored and passed on. This is true of grub, and presumably lilo (which I haven't used in years).
Likewise the kernel will ignore anything passed to it if it doesn't recognise it - parameters change as kernels develop; new parameters come in, sometimes (rarely) old ones get removed.
Quote:
I've writen a valid parameter name, but with no effect at all
Provide some evidence.
 
1 members found this post helpful.
Old 01-26-2013, 03:08 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Easy. I used sr0=ide-scsi. I discover, though, that the kernel must have SCSI emulation builtin. Does this make sense to you?
 
Old 01-26-2013, 03:24 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Surely. The kernel is monolithic, but as options are compiled in they bring with them code to handle their own parameters.
If that option isn't there, the parameter isn't "valid" (as no code recognises it), and it gets ignored.

This makes sense - it is possible (common) to pass parameters to initscripts via the boot arguments; they just get ignored by everybody until the initscript processes them.
 
1 members found this post helpful.
Old 01-26-2013, 03:25 PM   #5
floppy_stuttgart
Senior Member
 
Registered: Nov 2010
Location: EU mainland
Distribution: Debian like
Posts: 1,153
Blog Entries: 5

Rep: Reputation: 107Reputation: 107
look at the parameter list of your kernel version
look at the parameter your distro accept (not every distro accept any parameter)
knoppix ftp://ftp.uni-kl.de/pub/linux/knoppi...cheatcodes.txt
TinyCoreLinux http://tinycorelinux.net/faq.html#bootcodes
kernel 3.7 http://www.mjmwired.net/kernel/Docum...parameters.txt
etc.
 
Old 01-26-2013, 03:47 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by floppy_stuttgart View Post
look at the parameter list of your kernel version
look at the parameter your distro accept (not every distro accept any parameter)
knoppix ftp://ftp.uni-kl.de/pub/linux/knoppi...cheatcodes.txt
TinyCoreLinux http://tinycorelinux.net/faq.html#bootcodes
kernel 3.7 http://www.mjmwired.net/kernel/Docum...parameters.txt
etc.
Where can I get my kernel version (3.2.29) list of parameters?
 
Old 01-26-2013, 05:46 PM   #7
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
The file /usr/src/linux/Documentation/kernel-parameters.txt is what you want.
 
1 members found this post helpful.
Old 01-26-2013, 06:08 PM   #8
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thank you very much, allend.
 
Old 01-27-2013, 06:17 AM   #9
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
When you get to the lilo boot screen, hit the TAB key, then type in:
Code:
lin whatever kernel parameters you want
To make them permanent, add them to this line in /etc/lilo.conf:
Code:
append=" vt.default_utf8=0"

Last edited by brianL; 01-27-2013 at 06:24 AM. Reason: added extra info
 
1 members found this post helpful.
Old 01-27-2013, 12:54 PM   #10
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks brianL. I removed an 'append' I had in lilo.conf and gave the parameter (nomodeset) manually to lilo at boot time. And it worked!
 
  


Reply



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
give a parameter or string by default to the prompt after booting from CD/DVD vikas027 Linux - Software 2 03-11-2011 12:12 PM
Why we should give "core" parameter in yum config file ram_rajavarapu Linux - Enterprise 2 08-16-2010 12:49 PM
linux bash - how to use a dynamic parameter in shell parameter expansion expression nickleus Linux - General 2 08-21-2006 04:54 AM
Give me hand for kickstart parameter of pxelinux configureation ssscan Linux - Networking 2 05-19-2006 10:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:05 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration