Concourse tasks that check uname on different images - continuous-integration

From the Stark Concourse tutorial
The following task will run the uname command with the -a switch on a docker-image tagged "14.04":
---
platform: linux
image_resource:
type: docker-image
source: {repository: ubuntu, tag: "14.04"}
run:
path: uname
args: [-a]
Result:
fly -t tutorial e -c task_ubuntu_uname.yml
executing build 10
initializing
running uname -a
Linux a0c3f38b-7dd3-4a8f-7b3e-e56ce2bf05e9 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
succeeded
I'm curious why changing the tag doesn't change the version of Ubuntu:
---
platform: linux
image_resource:
type: docker-image
source: {repository: ubuntu, tag: "16.04"}
run:
path: uname
args: [-a]
Result:
fly -t tutorial e -c task_ubuntu_16_uname.yml
executing build 9
initializing
running uname -a
Linux 58069086-7a27-43f8-71ff-374bcaef0c6d 4.2.0-42-generic #49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
succeeded
I see that the guids are different but I would expect the versions to be different too. Why isn't the version 16.04?

uname will get the version information of the host's kernel of the machine you're running on - this is not namespaced - so the container you're running isn't going to show.
if you are on an ubuntu host, and run docker run --rm -it centos uname -a, it will also still show the ubuntu kernel results.

Related

How to check the date of the non-current kernel on Debian

You get the date of the current kernel on Debian with (here: 2020-12-17):
user#pc:~$ uname -v
#1 SMP Debian 4.9.246-2 (2020-12-17)
But, how to check the date of the non-current (e.g. linux-image-4.9.0-13-amd64 4.9.228-1) kernel on Debian?
I can't see this with:
user#pc:~$ dpkg -l | grep linux-image
ii linux-image-4.9.0-13-amd64 4.9.228-1 amd64 Linux 4.9 for 64-bit PCs
ii linux-image-4.9.0-14-amd64 4.9.246-2 amd64 Linux 4.9 for 64-bit PCs
ii linux-image-amd64 4.9+80+deb9u12 amd64 Linux for 64-bit PCs (meta-package)
And the follow command doesn't show this, too:
dpkg -s linux-image-4.9.0-13-amd64
Thanks
My current kernel on ubuntu 20.04 is 5.4.0-58.
# uname -a
Linux mylaptop8 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
then the date is december the 9th. If I download the changelog I should have some clue about the date:
# apt-get changelog linux-image-5.4.0-58-generic | cat | head -n6
downloading :1 https://changelogs.ubuntu.com linux-signed 5.4.0-58.64 Changelog [90,7 kB]
linux-signed (5.4.0-58.64) focal; urgency=medium
* Master version: 5.4.0-58.64
-- Khalid Elmously <khalid.elmously#canonical.com> Wed, 09 Dec 2020 02:30:56 -0500

ngrok binary file execution is not working on catalina(mac os)

Recently i have updated to Catalina and when i have tried running ngrok below error comes in:
-bash: ./ngrok: cannot execute binary file
Below are the details of file and system:
cmd:- file ./ngrok
output:- ./ngrok: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=WiQDkmDKISYhEPN12k-3/C6vlWFNDOR0o0u0x3X26/VIi6gzoMVXoqHTYgeFTz/LKswZ3xo2O5g2OnUiOwZ, not stripped
cmd:- uname -a
output:- Darwin XXXXXXX-MacBook-Air.local 19.2.0 Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64 x86_64
Any update would be appreciated
It was an access permission issue but this npm module solves it https://www.npmjs.com/package/ngrok, now it working smoothly.

ksh giving error in Darwin Kernel Version 9.8.0

I've copied the latest version of ksh93 into the darwin computer but for some reason it doesn't work.
Whenever I execute anything with ksh (for example "ksh --version") this is the error that I get:
dyld: unknown required load command 0x80000022
Trace/BPT trap
Do you know what it might be?
My version is the following:
Darwin paramisx82614.fr.net.intra 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
The ast ksh downloads for Darwin require Mac OS X. So your kernel should be 10.x as well.
If you really need ksh for Darwin 9.x you will have to compile it from source.

How to find if my Amazon EC2 instance is 32 bit or 64 bit?

I am newbie to this and this may be very easy question but I am running a Amazon EC2 instance and I don't know if my running instance is 32 bit or 64 bit.
My Question
Is there any way to find if my instance is 32 bit or 64 bit?
This should work for any linux instance. On the terminal type the following command:
> uname -a
Linux domU-XX-XX-XX-XX-XX-XX 3.2.20-1.29.6.amzn1.i686
#1 SMP Tue Jun 12 01:20:33 UTC 2012 i686 i686 i386 GNU/Linux
That last "i386" indicates that it's 32-bit; "x86_64" indicates 64-bit.
Alternative:
uname -m
-m, --machine
print the machine hardware name
e.g.
$ uname -m
x86_64

Changes required in makefile of project run on 64 bit system to 32 bit system

What changes would be required in Makefile of 64 bit system so that it can be build on 32 bit system.
On 64 bit server :
bash-3.2$ uname -a
2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
On 32 bit server:
[root#localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-100.34.1.el6uek.i686 #1 SMP Wed May 25 17:28:36 EDT 2011 i686 i686 i386 GNU/Linux
On make error is displayed as:
usr/bin/ld: i386:x86-64 architecture of input file `./lib/libxml2.a(parser.o)' is incompatible with i386 output
By the error there, it sounds like you're trying to use a 64-bit .o file... Is parser.o something that you're compiling yourself?

Resources