Discussion:
get kernel version of chroot
(too old to reply)
T o n g
2010-08-16 01:10:02 UTC
Permalink
Hi,

Is it possible to get the kernel version of a chroot system?

I tried

chroot chroot_fs uname -r

but it only reports the kernel version of my current system, not the
chroot system.

Any other way?
Thanks
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/i4a2k6$rrd$***@dough.gmane.org
Stephen Powell
2010-08-16 01:20:02 UTC
Permalink
Post by T o n g
Is it possible to get the kernel version of a chroot system?
I'm not sure that I understand what question you are really asking.
I am assuming that you have, for example, used a Debian installation
CD as a rescue CD on a system that you do not know what version
of the kernel it normally runs. You are now running in a chrooted
shell session. uname -r reports the version of the kernel
that the rescue CD is running, but you want to know what
version of the kernel the target system normally runs.

If that is what you are asking, the easiest way I know to find
out is to look at what kernel image (or images) are stored in
the /boot directory. If there's more than one, you may be able to
determine what the default kernel is by looking for the boot
loader configuration file, such as /etc/lilo.conf, /boot/grub/menu.lst,
etc.
--
.''`. Stephen Powell
: :' :
`. `'`
`-
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@md01.wow.synacor.com
T o n g
2010-08-16 02:40:01 UTC
Permalink
Post by Stephen Powell
You are now running in a chrooted
shell session. uname -r reports the version of the kernel that the
rescue CD is running, but you want to know what version of the kernel
the target system normally runs.
yes, exactly.

Ok, now while thinking the whole thing over, I realized that the way you
proposed, which was the way that used to use, is the solution.

thanks
--
Tong (remove underscore(s) to reply)
http://xpt.sourceforge.net/techdocs/
http://xpt.sourceforge.net/tools/
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/i4a88h$rus$***@dough.gmane.org
Hartwig Atrops
2010-08-16 11:50:02 UTC
Permalink
Hi.
Post by T o n g
Hi,
Is it possible to get the kernel version of a chroot system?
I tried
chroot chroot_fs uname -r
but it only reports the kernel version of my current system, not the
chroot system.
Chroot changes into a different directory structure but does not boot a
different kernel. uname reports the kernel in use, and that did not change.

regards,

Hartwig
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@mail-in-18.arcor-online.net
Continue reading on narkive:
Loading...