LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-27-2023, 01:47 PM   #1
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 642

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
compare new-huge-kernel vs new-generic-kernel


Add these lines in /etc/rc.d/rc.local
Code:
echo  -e 'kmsg:' > /dev/shm/onboot
cat /proc/kmsg >> /dev/shm/onboot & sleep 3 && killall cat
chmod 600 /dev/shm/onboot && chown root:root /dev/shm/onboot
reboot new-huge-kernel then as root
Code:
cat /dev/shm/onboot > /root/huge.txt
reboot new-generic-kernel and as root
Code:
diff --side-by-side --suppress-common-lines /dev/shm/onboot /root/huge.txt

Last edited by rizitis; 10-27-2023 at 01:49 PM. Reason: typo
 
Old 10-28-2023, 08:16 AM   #2
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 769

Rep: Reputation: 869Reputation: 869Reputation: 869Reputation: 869Reputation: 869Reputation: 869Reputation: 869
Why not just use 'dmesg' to read the kernel buffer into a file and diff those if you want to compare kernel logs?

It would be easier since you wouldn't need to "killall cat". You could also just run the dmesg command as root after booting and direct it straight to a file in /root/, without messing with the /dev/shm and permissions/ownerships. There's not going to be any difference running it from rc.local, or just manually after booting.
 
Old 10-28-2023, 09:05 AM   #3
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 642

Original Poster
Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
hey @0XBF, yes you can do it with several ways...
For the history, I was playing with new kernels because I was trying to find the difference btw huge and generic in the beginning it was not clear to me. Also now
Code:
zgrep -q 'CONFIG_EXT4_FS=y' /proc/config.gz && echo "Huge kernel" || echo "Generic Kernel"
always return "huge". Trying to find a way for the question "what kernel am I running?" I remember that I already having something similar in my /etc/sys which was inspired from Paulo2
So this command for example
Code:
cat /etc/sys | grep BOOT
always is true, (huge or generic).
which is the same
Code:
dmesg | grep vmlinuz
Then i said ok, lets do the same for 2 new kernels to see what diffs they have in the same system or what diff they have with my custom kernel.
This way for me is easier I think.
ps. And I found this in my custom kernel
Code:
>	<6>[    0.000000] efi: Remove mem90: MMIO range=[0xc0000000-0
							      >	<7>[    0.000000] e820: remove [mem 0xc0000000-0xcfffffff] re
							      >	<6>[    0.000000] efi: Not removing mem91: MMIO range=[0xfe00
							      >	<6>[    0.000000] efi: Not removing mem92: MMIO range=[0xfec0
							      >	<6>[    0.000000] efi: Not removing mem93: MMIO range=[0xfed0
							      >	<6>[    0.000000] efi: Not removing mem95: MMIO range=[0xfee0
							      >	<6>[    0.000000] efi: Remove mem96: MMIO range=[0xff000000-0
which idk what it is!
 
Old 10-28-2023, 11:21 AM   #4
Aeterna
Senior Member
 
Registered: Aug 2017
Location: Terra Mater
Distribution: VM Host: Slackware-current, VM Guests: Artix, Venom, antiX, Gentoo, FreeBSD, OpenBSD, OpenIndiana
Posts: 1,008

Rep: Reputation: Disabled
is
Quote:
uname -r
not working for you?
e.g.
Quote:
uname -r
6.1.59-hardened1-betelgeuse
 
Old 10-28-2023, 02:28 PM   #5
0XBF
Member
 
Registered: Nov 2018
Distribution: Slackware
Posts: 769

Rep: Reputation: 869Reputation: 869Reputation: 869Reputation: 869Reputation: 869Reputation: 869Reputation: 869
With the ext4 filesystem module built into the generic kernel now, your test will report huge for both (assuming this is slackware-current we are using).

You could check what kernel you booted on the kernel command line from '/proc/cmdline'.
E.g.:
Code:
#/bin/bash
if ( grep -q vmlinuz-generic /proc/cmdline ); then
  echo Running a generic kernel
elif ( grep -q vmlinuz-huge /proc/cmdline ); then
  echo Running a huge kernel
else 
  echo Running a non-standard kernel name:
  cat /proc/cmdline
fi
 
  


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
Huge kernel boots--Huge.SMP (and generic.smp) kernel will not MTCAT Linux - Newbie 4 02-03-2021 02:11 PM
[SOLVED] Problem upgrading to new kernel 5.3.0-45-generic from 4.18.0-25-generic fgonza1971 Linux - Laptop and Netbook 1 04-01-2020 02:54 PM
[SOLVED] setting up initrd / generic kernel in Grub2...can't load generic Ubunoob001 Slackware 12 03-20-2015 07:32 AM
kernel-generic and kernel-generic-smp ?? liuyug Slackware - Installation 5 06-01-2014 07:01 PM
slack 12, switch to generic kernel from huge kernel, using grub? jaguarrh Slackware 8 09-19-2007 06:29 AM

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

All times are GMT -5. The time now is 01:45 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