LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 03:09 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Rep: Reputation: 51
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, 03:34 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,842

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
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, 04:08 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Original Poster
Rep: Reputation: 51
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, 04:24 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,842

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
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, 04:25 PM   #5
floppy_stuttgart
Member
 
Registered: Nov 2010
Location: Stuttgart, Germany
Distribution: Debian like
Posts: 710
Blog Entries: 2

Rep: Reputation: 68
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, 04:47 PM   #6
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Original Poster
Rep: Reputation: 51
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, 06:46 PM   #7
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,433

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

Original Poster
Rep: Reputation: 51
Thank you very much, allend.
 
Old 01-27-2013, 07:17 AM   #9
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

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 07:24 AM. Reason: added extra info
 
1 members found this post helpful.
Old 01-27-2013, 01:54 PM   #10
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,485

Original Poster
Rep: Reputation: 51
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


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


All times are GMT -5. The time now is 02:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration