Portál AbcLinuxu, 21. července 2025 16:35
Řešení dotazu:
Pro nabootovaný kernel např.:
$ cat /proc/version Linux version 2.6.26-2-vserver-686 (Debian 2.6.26-19) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Wed Aug 19 07:56:57 UTC 2009
A pokud to chceš zjistit na nenabootovaném kernelu, tak můžeš postupovat podle How to Know the Version of a Kernel Without Booting from It:
$ gcc -o binoffset /usr/src/linux-2.6.33.1/scripts/binoffset.c $ ./binoffset /boot/vmlinuz-2.6.26-1-686 0x1f 0x8b 0x08 00 2>/dev/null 12926 $ dd if=/boot/vmlinuz-2.6.26-1-686 skip=12926 bs=1 |gzip -d >vmlinux $ strings vmlinux |grep gcc Linux version 2.6.26-1-686 (Debian 2.6.26-13lenny2) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Fri Mar 13 18:08:45 UTC 2009 %s version %s (Debian 2.6.26-13lenny2) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) %s
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.