LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-27-2013, 03:44 PM   #16
01micko
Member
 
Registered: Mar 2009
Location: Gold Coast, Queensland, Australia
Distribution: Puppy, Slackware
Posts: 92

Rep: Reputation: 18

Quote:
Originally Posted by textillis View Post
PS incidentally: how can I be 100% sure that I am running the generic kernel?
I tried uname -a but that didn't provide such information
Good question. I just tried this;
Code:
bash-4.2$ /sbin/lsmod|grep ext
ext4                  411375  1 
jbd2                   66646  1 ext4
mbcache                 5826  1 ext4
Substitute 'ext' with whatever module you chose when building the initrd needed for your root filesystem. If no output then 'huge' must be running.

There is probably a better test out there.
 
1 members found this post helpful.
Old 07-27-2013, 05:48 PM   #17
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by textillis View Post
PS incidentally: how can I be 100% sure that I am running the generic kernel?
I tried uname -a but that didn't provide such information
The kernel you are running is specified by the image = /boot/vmlinuz line in /etc/lilo.conf. You can check which of the kernels the soft link vmlinuz points to as follows:

Code:
cd /boot
ls -la | grep vmlinuz
lrwxrwxrwx  1 root root      19 May 16 21:20 vmlinuz -> vmlinuz-generic-3.8.13
-rw-r--r--  1 root root 3319520 May 12 23:20 vmlinuz-generic-3.8.13
-rw-r--r--  1 root root 6252192 May 12 23:23 vmlinuz-huge-3.8.13
In this example vmlinuz points to the generic kernel.

If you wanted to run the huge kernel all you would do is remove the existing link and create a new one pointing to huge:

Code:
cd /boot
rm vmlinuz
ln -s vmlinuz-huge-3.8.13 vmlinuz
Now check which kernel the link points to:
Code:
ls -la | grep vmlinuz
lrwxrwxrwx  1 root root      19 May 16 21:20 vmlinuz -> vmlinuz-huge-3.8.13
-rw-r--r--  1 root root 3319520 May 12 23:20 vmlinuz-generic-3.8.13
-rw-r--r--  1 root root 6252192 May 12 23:23 vmlinuz-huge-3.8.13
Don't forget to run lilo afterwards if you do this. If you do the opposite, linking vmlinuz to the generic kernel, you will most likely need initrd in /etc/lilo.conf as well, to bootstrap your system with the root filesystem and other information before the kernel loads.
 
1 members found this post helpful.
Old 07-27-2013, 06:01 PM   #18
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
This should tell you whether you're using the generic, huge, or another kernel, assuming the config files in /boot haven't been altered (and I can't think of a valid scenario in which they should be). This will work only for 64-bit Slackware; otherwise you would have to modify the paths to the config files to represent the smp versions.
Code:
if diff <(zcat /proc/config.gz) /boot/config-generic-3.2.29 >/dev/null ; then echo "generic"; elif diff <(zcat /proc/config.gz) /boot/config-huge-3.2.29 >/dev/null; then echo "huge"; else echo "Neither"; fi
The <(...) syntax is a bash-ism so other shells may not allow that.

[edit]
This is perhaps a better command in that it is universal (though it ignores the /boot/config symlink):
Code:
for i in /boot/config-* ; do if diff <(zcat /proc/config.gz) "$i" >/dev/null; then echo "$i"; fi; done
[/edit]

Last edited by T3slider; 07-27-2013 at 06:03 PM.
 
1 members found this post helpful.
Old 07-28-2013, 02:56 AM   #19
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
>T3Slider: second suggestion seemed to work

>T3Slider
Once I fixed the first line in lilo.conf to refer to the generic kernel, rebooted, then ran the first of your suggestions, I got this output:

Code:
[root@MudPark:lebec] # if diff <(zcat /proc/config.gz) /boot/config-generic-3.2.29 >/dev/null ; then echo "generic"; elif diff <(zcat /proc/config.gz) /boot/config-huge-3.2.29 >/dev/null; then echo "huge"; else echo "Neither"; fi
diff: /boot/config-generic-3.2.29: No such file or directory
diff: /boot/config-huge-3.2.29: No such file or directory
Neither
So I ran the second and ...bingo! ... it returned:

Code:
[root@MudPark:lebec] # for i in /boot/config-* ; do if diff <(zcat /proc/config.gz) "$i" >/dev/null; then echo "$i"; fi; done
/boot/config-generic-3.9.10
Still doesn't boot any faster, but at least I'm satisfied that I know which kernel I'm running.

Thanks for the code!
And thanks to all respondents.

Last edited by textillis; 07-28-2013 at 07:19 AM.
 
Old 07-28-2013, 07:37 AM   #20
AlleyTrotter
Member
 
Registered: Jun 2002
Location: Coal Township PA
Distribution: Slackware64-15.0
Posts: 783

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Quote:
Originally Posted by glorsplitz View Post
@AlleyTrotter, do you know how much different streamline_config.pl is to mkinitrd_command_generator.sh?
thanks
One is used to configure the kernel
The other is used to configure an initrd

As to speed I don't know, but streamline_config does greatly reduce the size of the kernel. Since not all modules are built, it reduces the time required to build the kernel
While initrd reduces the number of modules loaded during initial bootup all modules may still be built with the kernel.
Although size may not be an issue, I always think less code less chance of a bug.

john

Last edited by AlleyTrotter; 07-28-2013 at 07:55 AM.
 
1 members found this post helpful.
Old 07-28-2013, 08:00 AM   #21
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by textillis View Post
And how much difference would I notice in generalized speed of system:
I do create my own system-optimized kernels, but i wouldn't expect a significant difference because of that alone. What I also do is I patch my kernels with a different CPU scheduler and a different I/O scheduler. This definitely has an impact on the perceived smoothness of the desktop and it has measureable effects as well. Just in case, here are a couple of URLs for further reading.

http://ck-hack.blogspot.com/
http://www.algogroup.unimore.it/peop...lo/disk_sched/
 
1 members found this post helpful.
Old 07-28-2013, 10:19 AM   #22
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
>Martinus2u

Thanks for the information.
Filed away against the rainy day when I might try it.

My system is actually purring along and quite adequate to my humble needs.

The original question, although inspired by a genuine desire to get generic kernel booted, was out of curiosity rather than pressing practical need for speed.
 
  


Reply

Tags
generic, initrd, kernel 3, speed, startup



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
[SOLVED] Do I really need 8GB RAM? makeyourself Linux - Hardware 17 02-17-2013 01:00 PM
8GB of Ram not being recognized Ordinary12 Linux - Desktop 14 08-15-2010 11:02 PM
generic kernel boot time parameters ignored shadowsnipes Slackware 4 12-21-2008 07:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:32 PM.

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