CentOS Mondo Rescue Error to Restore the iso: Kernel Panic - centos

I am trying to create an image (.iso) of my installed CentOS 5.11 system, for this i am using the "Mondo Rescue" with the command:
mondoarchive -Oi -9 -L -d /tmp/centos_iso -I / -T /tmp/centos_iso -p centos_image -s 4480m -E "/tmp|/var/spool/squid|/var/log"
The image is generated, and apparently is functional.
To install the iso in other machine i'm using the option "Nuke", in initialization page of "Mondo Rescue", like is represented in below image
When attempting to perform the installation, the following error occurs during the process:
Kernel panic - not syncing: No init found. Try passing init= options to kernel.

Related

How to generate coredump file in alpine container

I'm trying to work on a open source TSDB TDengine, and compile it in alpine to make it dockerized. After compiled, just run the taosd binary, it causes segment fault(coredumped), but I can't find the core file.
I've searched and use sysctl to set the core pattern and ulimic -c is unlimited. But it failed to apply sysctl like below.
# ulimic -c
unlimited
# sysctl -w kernel.core_pattern=core-%e.%p.%h.%t
sysctl: error setting key 'kernel.core_pattern': Read-only file system
How to generate the core file in alpine?
I finally found the solution:
docker run -it --rm --ulimit core=-1 --privileged -v $PWD:/coredump <myimage> bash
In container, set core pattern and run app:
sysctl -w kernel.core_pattern=/coredump/core-%e.%p.%h.%t
app # coredumped to /coredump/ directory
Since we mount $PWD to /coredump, so we can see core file in current directory.

Custom postgres shared_preload_libraries dir - how to configure?

I am trying to install pg_cron extension in postgres in alpine linux docker.
When running
CREATE EXTENSION pg_cron;
in psql console I get:
ERROR: could not open extension control file "/usr/local/share/postgresql/extension/pg_cron.control": No such file or directory
The problem is that the actual pg_cron.control is not under /usr/local/share/... but under /usr/share/..
Where in postgresql.conf I can define the path?
Steps taken:
docker run --name postgres-0 -e POSTGRES_PASSWORD=Password1 -p 5432:5432 -d postgres:10-alpine
docker exec -it postgres-0 /bin/bash
apk update
apk add postgresql-pg_cron --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
cat <<EOT >> /var/lib/postgresql/data/postgresql.conf
shared_preload_libraries='pg_cron'
EOT
pg_ctl reload
PostgreSQL expects to find the extension files in the SHAREDIR/extension/ directory associated with the installation (execute pg_config --sharedir to confirm the value of SHAREDIR for your particular installation).
There is however no facility for specifying an alternative location for extension files; it looks like something is wrong with the packaging.
I'm not familiar with Alpine Linux, but a quick Google search brings up e.g. this issue: Postgres extensions are installed into incorrect path and the suggested solution is to use a bare Alpine Linux image and install PostgreSQL via the apk command, so you might want to try that.

cannot execute binary file centos?

I am using centos 6.9 and want to install xampp. But when I run the command on the terminal it showing error i.e. cannot execute binary file. So, How can I fix this problem and successfully install xampp ? Please help me.
chmod +x xampp-linux-x64-7.0.22-0-installer.run
./xampp-linux-x64-7.0.22-0-installer.run
after this command it showing
bash: ./xampp-linux-x64-7.0.22-0-installer.run: cannot execute binary file
You're probably running the install (binary) with a lesser privileged user. You'll have to use root user for modifying SELinux settings as such:
semanage fcontext -a -t httpd_sys_script_exec_t '/<install-location>(/.*)/?'
restorecon -R -v /<install-location>/

Dockerfile RUN command not working

I am trying to create IBM WAS image from my local binary but it is not working . i used the dockerfile and added below command but getting error :
Dockerfile:
FROM centos:centos6
RUN yum update -y
RUN "/docker/software/im/installc -acceptLicense -accessRights nonAdmin \
-installationDirectory /docker/IBM/InstallationManager -dataLocation /docker/var/ibm/InstallationManager -showProgress"
Error:
---> Running in 206e970b75c8 /bin/sh: /docker/software/im/installc -acceptLicense -accessRights nonAdmin -installationDirectory /docker/IBM/InstallationManager -dataLocation
/docker/var/ibm/InstallationManager -showProgress: No such file or
directory The command '/bin/sh -c "/docker/software/im/installc
-acceptLicense -accessRights nonAdmin -installationDirectory /docker/IBM/InstallationManager -dataLocation
/docker/var/ibm/InstallationManager -showProgress"' returned a
non-zero code: 127
Docker is trying to run installc from within the image. The image centos:centos6 image does not contain IBM Installation Manager.
I recommend taking a look at the WebSphere traditional Docker images published by IBM to Docker hub. If you wish to create something slightly different for example use centos instead of ubuntu then take a look at the instructions for building WebSphere traditional Docker images, they are Apache licensed so you are free to adapt them.
Docker build error :
/bin/sh: /tmp/im/installc: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
The command '/bin/sh -c unzip -qd /tmp/im /tmp/agent.installer.linux.gtk.x86_1.8.0.20140902_1503.zip && /tmp/im/installc -acceptLicense -show Progress -installationDirectory /usr/lib/im -dataLocation /var/im && rm -rf /tmp/agent.installer.linux.gtk.x86_1.8.0.20140902_1503.zip /tmp/i m' returned a non-zero code: 126
Linux version : AWS linux 3.10.0-514.10.2.el7.x86_64 #1 SMP Mon Feb 20 02:37:52 EST 2017 x86_64 x86_64 x86_64 GNU/Linux

Unable to run "gearman" command line tool with gearman 1.1.6

I am trying to run the example on "http://gearman.org/getting_started" on Ubuntu in VirtualBox environment.
At first I tried to download an old version 0.16 by using apt-get install gearman-job-server, apt-get install gearman-tools and everything worked well. The server ran in the background, I was able to create 2 workers and verify that I can call them by creating a client.
I decided to download and compile the latest version, 1.1.6. Now, I am trying to do the same thing with the new version and I am having errors.
I run the server as admin:
sudo gearmand
The statement
gearadmin --getpid
seems to work - it returns me the process ID of the server. Thus, the server is running, and this answer is not relevant.
Now, I am adding a worker:
gearman -w -f wc -- wc -l
It seems to run.
Nevertheless,
gearadmin --workers
results in something that probably represents and empty list :
33 127.0.0.1 - :
.
(In version 0.16, I was able to see 2 lines, the second showing the registered function name.)
Attempting to run the client
gearman -f wc < /etc/passwd
results in
gearman: gearman_client_run_tasks : flush(GEARMAN_COULD_NOT_CONNECT) localhost:0 -> libgearman/connection.cc:671"
This might be the very same problem described in here - the port not specified, but I have no idea how to do it through the command line tool.
Any idea?
Ok, It looks like the answer in here was the key to success. Probably, the "getting started" section was not updated for a while. Indeed, one must specify a port explicitly for gearmand and gearman .
Server:
sudo gearmand -p 5000
Worker:
gearman -p 5000 -w -f wc -- wc -l
Client:
gearman -p 5000 -f wc < /etc/passwd