You are not logged in.

#1 2010-06-10 02:02:58

pythonscript
Member
From: Edinburgh, Scotland
Registered: 2009-07-10
Posts: 68

get linux kernel version from distro on a different partition?

I posted this in the ubuntu forums as well, since in this case, it's a question "across distros" since I'd love to find a general linux command, not just something ubuntu specific.

##
I'm currently using a triple boot system on my netbook between WinXP, lucid, and arch, and I'm trying to work out my grub entries (which I update from lucid). Here's what I have for my ubuntu menu entry, just the text:

Code:

menuentry "Ubuntu Linux 10.04, $(uname -r)" {

How would I use a command like this to echo the kernel version of arch, which is installed on a different partition? This prints out in grub2, by the way:

Ubuntu Linux 10.04, 2.6.32-22-generic

Is there a way to set the "root directory" of uname -r to a different partition with a flag? I couldn't find one in the man page but maybe I missed it.
##
Does anyone here know of any linux command that will help? This is grub2, by the way.


Lenovo SL510 Thinkpad / Asus EEEPC 1005HA
No hables a menos que puedas mejorar el silencio. - Neruda
La sabiduría nos llega cuando ya no nos sirve de nada. - Márquez

Offline

#2 2010-06-10 03:13:46

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: get linux kernel version from distro on a different partition?

uname dont print a installed kernel, its print the version of running kernel. You need to get the info from the fs. e.g from /var/lib/pacman/local/kernel26-2.6.34-1/desc or from /usr/src or /lib/modules all depend if you use the official arch kernel, or others

Last edited by kazuo (2010-06-10 03:18:56)

Offline

#3 2010-06-10 03:16:55

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,354

Re: get linux kernel version from distro on a different partition?

$ file /boot/vmlinuz26
/boot/vmlinuz26: Linux kernel x86 boot executable bzImage, version 2.6.34-ARCH (tobias@T-POWA-LX) , RO-rootFS, root_dev 0x902, swap_dev 0x1, Normal VGA

Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB