You are not logged in.

#1 2010-02-27 01:36:45

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

Preventing `file vmlinuz*` from truncating version?

Hi all, for my nvidia-beta-all package I have the following line to deduce the versions of installed kernels:-

`file /boot/* | grep 'Linux kernel.*boot executable' | grep 'vmlinuz' | sed 's/.*version \([^ ]\+\).*/\1/'`

A user recently contacted me to say that when running file on his vmlinuz26zen (zen-git I believe) with a long version string, the 'version' string that I'm looking for is truncated. Here's the result from the standard Arch kernel:-

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

From his vmlinuz26zen:-

vmlinuz26zen: Linux kernel x86 boot executable bzImage, version 2.6.32-zen7-bregol-20100224-sta, RO-rootFS, root_dev 0x806, swap_dev 0x2, Normal VGA

Note that there's no '(' which indicates the user who compiled this kernel, instead the version is cut off at ..sta, which is supposed to read stable-<SOMEOTHERNUMBERS>. I've been browsing man pages and trawling google but haven't found any other ways besides:-

uname -r OR cat /proc/version - unsatisfactory because only gets version of running kernel
ls /lib/modules - unsatisfactory because old directories can get left here when kernels are upgraded

Any other suggestions, please? If I could figure out how file truncates (and increase the truncation limit or remove it entirely) that would be ideal.


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