Size of kernel built is much much larger than the built-in one - linux

I got latest kernel source from kernel.org(using git), and followed the steps as described in this page to build the kernel. The kernel boots successfully, however, I have no idea what was done incorrectly in the configuration process that initrd.img-3.16.0 is so much larger than the build in one(initrd.img-3.13.0-32-generic)
I copied the configuration file .config from /boot/ and used "yes '' | make oldconfig" for the kernel configuration.
the file size total 191M
-rw-r--r-- 1 root root 1.2M Jul 14 21:29 abi-3.13.0-32-generic
-rw-r--r-- 1 root root 162K Jul 14 21:29 config-3.13.0-32-generic
-rw-r--r-- 1 root root 167K Aug 4 19:48 config-3.16.0
-rw-r--r-- 1 root root 20M Jul 28 15:14 initrd.img-3.13.0-32-generic
-rw-r--r-- 1 root root 151M Aug 4 19:48 initrd.img-3.16.0
-rw-r--r-- 1 root root 173K Mar 12 05:31 memtest86+.bin
-rw-r--r-- 1 root root 174K Mar 12 05:31 memtest86+.elf
-rw-r--r-- 1 root root 175K Mar 12 05:31 memtest86+_multiboot.bin
-rw------- 1 root root 3.3M Jul 14 21:29 System.map-3.13.0-32-generic
-rw-r--r-- 1 root root 3.4M Aug 4 19:48 System.map-3.16.0
-rw------- 1 root root 5.6M Jul 14 21:29 vmlinuz-3.13.0-32-generic
-rw-r--r-- 1 root root 5.7M Aug 4 19:48 vmlinuz-3.16.0
Thanks!
William

follow below steps to obtain the right kernel configuration
Copy /boot/.config to the kernel source code directory
make menuconfig
Exit and save configuration
make
and then continue with the other options for install
Note : Since you are using make oldconfig, this would enable many of the options not related to the platform but related to the CPU architecture.
This steps should help you solve this issue

Related

Why some binaries are duplicated in the Linux filesystem?

Good Morning,
There are some commands that are both in /bin and in /usr/bin in our Yocto filesystem.
Is that normal? I don't think it's a mistake we made in building our Yocto filesystem because I see the same thing in my regular Debian Buster distribution (see below). But what is the purpose of that duplication?
Here is an example of what I'm talking about:
root#debian:~# ls -l /bin/zip* /usr/bin/zip*
-rwxr-xr-x 1 root root 213136 Aug 16 2015 /bin/zip
-rwxr-xr-x 1 root root 90432 Aug 16 2015 /bin/zipcloak
-rwxr-xr-x 1 root root 48497 Jul 21 2020 /bin/zipdetails
-rwxr-xr-x 1 root root 2953 Jan 10 16:12 /bin/zipgrep
-rwxr-xr-x 2 root root 183136 Jan 10 16:12 /bin/zipinfo
-rwxr-xr-x 1 root root 86048 Aug 16 2015 /bin/zipnote
-rwxr-xr-x 1 root root 86048 Aug 16 2015 /bin/zipsplit
-rwxr-xr-x 1 root root 213136 Aug 16 2015 /usr/bin/zip
-rwxr-xr-x 1 root root 90432 Aug 16 2015 /usr/bin/zipcloak
-rwxr-xr-x 1 root root 48497 Jul 21 2020 /usr/bin/zipdetails
-rwxr-xr-x 1 root root 2953 Jan 10 16:12 /usr/bin/zipgrep
-rwxr-xr-x 2 root root 183136 Jan 10 16:12 /usr/bin/zipinfo
-rwxr-xr-x 1 root root 86048 Aug 16 2015 /usr/bin/zipnote
-rwxr-xr-x 1 root root 86048 Aug 16 2015 /usr/bin/zipsplit
Thanks for your reading.
some of those binary does some special functions and purpose other than the main program.
just take a look at the grep program
original 'grep'
extended ones are - egrep, bgrep, pgrep, fgrep.
they all do the same thing but gives the user more flexibility and ease of usage

How to flash MB1355C and/or MB1293C from the STM32WB55 Nucleo Pack on Linux?

I would like to program the (MB1355C and/or MB1293C) devices from an STM32WB55 Nucleo Pack on my (Ubuntu 18.04.3 LTS) machine - preferably with the convenience of an eclipse based IDE that supports debugging features.
I installed
STM32CubeProgrammer (version 2.2.1)
Atolic TrueStudio (version 9.3.0)
STM32CubeIDE (version 1.1.0)
and I now have the following udev rules
chandran#chandran-OptiPlex-9020:~$ ll /etc/udev/rules.d/
total 160
drwxr-xr-x 2 root root 4096 Dec 13 14:11 ./
drwxr-xr-x 4 root root 4096 Dec 4 13:44 ../
-rw-rw-r-- 1 root root 270 Oct 14 18:10 49-stlinkv1.rules
-rw-rw-r-- 1 root root 270 Oct 14 18:10 49-stlinkv1.rules.O
-rw-rw-r-- 1 root root 464 Oct 14 18:10 49-stlinkv2-1.rules
-rw-rw-r-- 1 root root 464 Oct 14 18:10 49-stlinkv2-1.rules.O
-rw-rw-r-- 1 root root 278 Oct 14 18:10 49-stlinkv2.rules
-rw-rw-r-- 1 root root 278 Oct 14 18:10 49-stlinkv2.rules.O
-rw-r--r-- 1 root root 458 Dec 11 17:26 49-stlinkv3loader.rules
-rw-rw-r-- 1 root root 845 Oct 14 18:10 49-stlinkv3.rules
-rw-rw-r-- 1 root root 845 Oct 14 18:10 49-stlinkv3.rules.O
-rw-r--r-- 1 root root 381 Dec 6 17:10 '#61-msp430uif.rules#'
-rw-r--r-- 1 root root 381 Dec 4 15:09 61-msp430uif.rules
-rwxr-xr-x 1 root root 2145 Dec 4 15:09 70-mm-no-ti-emulators.rules*
-rw-r--r-- 1 root root 58549 Dec 4 12:29 70-snap.core.rules
-rw-r--r-- 1 root root 79 Dec 5 12:11 77-msp430-blacklist.rules
-rw-r--r-- 1 root root 0 Dec 5 12:10 77-msp430-blacklist.rules~
-rw-rw-r-- 1 root root 18450 Oct 14 17:33 99-jlink.rules
-rw-rw-r-- 1 root root 18450 Oct 14 17:33 99-jlink.rules.O
I am in the dialout group
chandran#chandran-OptiPlex-9020:~$ groups chandran
chandran : chandran adm dialout cdrom sudo dip plugdev lpadmin sambashare
I downloaded an example project called STM32100E-EVAL_USART_IrDA_Transmit and it builds successfully, but I get the following error message when I connect the evaluation board(s) and click on debug to flash the micro controller
ST-Link enumeration failed
Error in initializing ST-Link device.
Reason: (2) ST-Link DLL error.
I get the same error message when I try the above with STM32CubeIDE.
I have tried shifting JP1 as described in section 7.6 of the users manual but to no avail.
A previous question on stack overflow deals with the same error message so I got STM32CubeProgrammer to launch and tried making the changes suggested by #IsaBostan, but the development boards don't seem to be detected
How can I proceed to resolve this problem and program the boards?
Debugging ideas or suggestions are welcome, even if they haven't been tested...
It was just a question of permissions as suggested by KamilCuk
Launching TrueStudio as root and then clicking on debug solved the problem.
This is what worked on my machine:
sudo su
/opt/Atollic_TrueSTUDIO_for_STM32_x86_64_9.3.0/ide/./TrueSTUDIO
STM32CubeIDE's debugger also works when launched as follows on my machine:
sudo su
/opt/st/stm32cubeide_1.1.0/./stm32cubeide
and STM32CubeProgrammer connects to the device straight away when launched as follows:
sudo su
/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/./STM32CubeProgrammer
My device shows up under /dev/ttyACM0 with the following permissions:
crw-rw----+ 1 root dialout 166, 0 Dec 28 11:56 ttyACM0
openocd and st-flash were not required.

Installation Of Cassandra

I have download cassandra via terminal but problem is where are the other folders like data, conf, lib, doc etc.
i can see only some files as shown in figure i.e Click here
where is the other folders ?
By "download cassandra via terminal" and your screenshot, I'll assume that you installed Cassandra via apt-get.
From the Apache Cassandra project Wiki, section on Installation from Debian packages:
The default location of configuration files is /etc/cassandra.
The default location of log and data directories is /var/log/cassandra/ and /var/lib/cassandra.
As for the lib directory, check how your $CASSANDRA_HOME is being set:
$ grep CASSANDRA_HOME /etc/init.d/cassandra
CASSANDRA_HOME=/usr/share/cassandra
$ ls -al /usr/share/cassandra/
total 8312
drwxr-xr-x 3 root root 4096 Dec 13 07:57 .
drwxr-xr-x 372 root root 12288 Nov 28 08:51 ..
-rw-r--r-- 1 root root 5962385 Jun 1 2016 apache-cassandra-3.6.jar
lrwxrwxrwx 1 root root 24 Jun 1 2016 apache-cassandra.jar -> apache-cassandra-3.6.jar
-rw-r--r-- 1 root root 1902216 Jun 1 2016 apache-cassandra-thrift-3.6.jar
-rw-r--r-- 1 root root 875 May 31 2016 cassandra.in.sh
drwxr-xr-x 3 root root 12288 Dec 13 07:57 lib
-rw-r----- 1 root root 82123 Oct 20 2015 metrics-core-2.2.0.jar
-rw-r----- 1 root root 9639 Oct 20 2015 metrics-graphite-2.2.0.jar
-rw-r--r-- 1 root root 509144 Jun 1 2016 stress.jar
Note that Cassandra's lib directory is shown in the middle of the directory listing above.

npm erased Plesk 12 on Ubuntu 16.04

My issue is pretty simple to explain and I guess hard to solve: I commited the stupidity of installing npm on a cloud based server with Ubuntu 16.04 with Plesk 12.
After reading this article I realized it was too late and after trying to connect to my Plesk GUI got an 403 error.
Also if I execute plesk on the CLI, it shows:
user#server:~$ plesk repair
plesk: command not found
So, I erased Plesk... All my hosted sites on Plesk are reachable with their databases in their URLs or by SSH.
The hosting provider told me there is no way to restore Plesk without losing everything unless I made a backup, but I didn't. Maybe there is an alternative... Do you know it?
Edit: Content of /var/lib/psa/dumps:
user#server:/var/lib/psa/dumps$ ls -lrta
total 5708
drwxr-xr-x 3 root root 4096 ene 4 2017 ..
-rw------- 1 root root 206315 ene 4 2017 mysql.preupgrade.12.0.18-12.0.18.20170104-173632.dump.gz
-rw------- 1 root root 3417 ene 4 2017 mysql.preupgrade.apsc.12.0.18-12.0.18.20170104-173633.dump.gz
-rw------- 1 root root 208481 ene 4 2017 mysql.preupgrade.12.0.18-12.5.30.20170104-174155.dump.gz
-rw------- 1 root root 3002 ene 4 2017 mysql.preupgrade.apsc.12.0.18-12.5.30.20170104-174156.dump.gz
-rw------- 1 root root 220725 ene 23 2017 mysql.preupgrade.12.5.30-12.5.30.20170123-062554.dump.gz
-rw------- 1 root root 3002 ene 23 2017 mysql.preupgrade.apsc.12.5.30-12.5.30.20170123-062556.dump.gz
-rw------- 1 root root 236736 feb 8 06:27 mysql.preupgrade.12.5.30-12.5.30.20170208-062713.dump.gz
-rw------- 1 root root 3003 feb 8 06:27 mysql.preupgrade.apsc.12.5.30-12.5.30.20170208-062715.dump.gz
-rw------- 1 root root 262580 feb 24 06:26 mysql.preupgrade.12.5.30-12.5.30.20170224-062621.dump.gz
-rw------- 1 root root 4603 feb 24 06:26 mysql.preupgrade.apsc.12.5.30-12.5.30.20170224-062623.dump.gz
-rw------- 1 root root 258785 mar 22 06:26 mysql.preupgrade.12.5.30-12.5.30.20170322-062626.dump.gz
-rw------- 1 root root 4898 mar 22 06:26 mysql.preupgrade.apsc.12.5.30-12.5.30.20170322-062627.dump.gz
-rw------- 1 root root 251339 abr 17 06:25 mysql.preupgrade.12.5.30-12.5.30.20170417-062540.dump.gz
-rw------- 1 root root 4899 abr 17 06:25 mysql.preupgrade.apsc.12.5.30-12.5.30.20170417-062543.dump.gz
-rw------- 1 root root 244219 may 16 06:25 mysql.preupgrade.12.5.30-12.5.30.20170516-062533.dump.gz
-rw------- 1 root root 4373 may 16 06:25 mysql.preupgrade.apsc.12.5.30-12.5.30.20170516-062535.dump.gz
-rw------- 1 root root 248044 jun 1 06:25 mysql.preupgrade.12.5.30-12.5.30.20170601-062529.dump.gz
-rw------- 1 root root 4381 jun 1 06:25 mysql.preupgrade.apsc.12.5.30-12.5.30.20170601-062530.dump.gz
-rw------- 1 root root 273341 jul 17 06:25 mysql.preupgrade.12.5.30-12.5.30.20170717-062542.dump.gz
-rw------- 1 root root 4379 jul 17 06:25 mysql.preupgrade.apsc.12.5.30-12.5.30.20170717-062544.dump.gz
-rw------- 1 root root 367277 jul 20 06:26 mysql.daily.dump.8.gz
-rw------- 1 root root 367218 jul 21 06:25 mysql.daily.dump.7.gz
-rw------- 1 root root 368954 jul 22 06:25 mysql.daily.dump.6.gz
-rw------- 1 root root 369279 jul 23 06:25 mysql.daily.dump.5.gz
-rw------- 1 root root 368767 jul 24 06:25 mysql.daily.dump.4.gz
-rw------- 1 root root 369629 jul 25 06:26 mysql.daily.dump.3.gz
-rw------- 1 root root 370169 jul 26 06:25 mysql.daily.dump.2.gz
-rw------- 1 root root 368027 jul 27 06:25 mysql.daily.dump.1.gz
-rw------- 1 root root 368128 jul 28 06:26 mysql.daily.dump.0.gz
drwxr-xr-x 2 psaadm psaadm 4096 jul 29 01:32 .
-rw------- 1 root root 20 jul 29 01:32 mysql.plesk.core.prerm.12.5.30.20170729-013250.dump.gz
First of all, I recommend to change the hosting provider, as their answer is incorrect and it seems, that they don't have much experience with Plesk, nor do they seem to have much knowledge about Plesk.
Second, your statements are a bit unclear, as you state:
although I made a backup
and directly afterwards you stated:
and I didn't
Could you pls. clarify WHAT you did and what you forgot to do?
Third, pls. have a look at => "/var/lib/psa/dumps" and inform us about the possible content.
Fourth, if you have dumps located at "/var/lib/psa/dumps", you will always have the choice to re-install Plesk and to re-import the latest "psa", "mysql" and "horde" - databases from your dumps. How to restore a Plesk database dump is explained at:
=> https://support.plesk.com/hc/en-us/articles/213904125
If you have further Plesk related questions, I recommend a new thread at the official Plesk Community Forum ( => https://talk.plesk.com ) , where experienced Plesk users will help you with Plesk - related questions/issues/errors/problems! ;-)

Reading package lists... Error! on EC2

I am running Ubuntu 14.04.1 LTS on a t1.micro on ec2. Just a moment ago I logged in, ran sudo apt-get update and got Reading package lists... Error!
I also realized that I no longer can install packages using sudo apt-get install.
Any idea what went wrong here? And how to fix it?
I have tried the answer suggested in this thread https://unix.stackexchange.com/questions/139441/reading-package-lists-error but that did not fix the problem. What makes things a little annoying also is the lack of error logs (or the fact I do not know where to look). For example the sudo apt-get install just fails and I do not know how to run it in verbose mode or where to look to find the specific reason why it is failing...
Here is the content of /var/lib/apt/lists
total 105476
drwxr-xr-x 3 root root 4096 Mar 15 23:05 .
drwxr-xr-x 6 root root 4096 Mar 9 05:58 ..
-rw-r----- 1 root root 0 Mar 15 20:02 lock
drwxr-xr-x 2 root root 4096 Mar 15 23:05 partial
-rw-r--r-- 1 root root 822 Mar 15 19:23 pkg.jenkins-ci.org_debian_binary_Packages
-rw-r--r-- 1 root root 2046 Mar 15 19:23 pkg.jenkins-ci.org_debian_binary_Release
-rw-r--r-- 1 root root 181 Mar 15 19:23 pkg.jenkins-ci.org_debian_binary_Release.gpg
-rw-r--r-- 1 root root 19466 Mar 13 10:29 ppa.launchpad.net_webupd8team_java_ubuntu_dists_trusty_main_binary-amd64_Packages
-rw-r--r-- 1 root root 6192 Mar 13 10:29 ppa.launchpad.net_webupd8team_java_ubuntu_dists_trusty_main_i18n_Translation-en
-rw-r--r-- 1 root root 15111 Mar 13 10:29 ppa.launchpad.net_webupd8team_java_ubuntu_dists_trusty_Release
-rw-r--r-- 1 root root 316 Mar 13 10:29 ppa.launchpad.net_webupd8team_java_ubuntu_dists_trusty_Release.gpg
-rw-r--r-- 1 root root 1410166 Mar 12 21:35 security.ubuntu.com_ubuntu_dists_trusty-security_main_binary-amd64_Packages
-rw-r--r-- 1 root root 1140580 Mar 11 00:34 security.ubuntu.com_ubuntu_dists_trusty-security_main_i18n_Translation-en
-rw-r--r-- 1 root root 349379 Mar 12 21:40 security.ubuntu.com_ubuntu_dists_trusty-security_main_source_Sources
-rw-r--r-- 1 root root 61968 Mar 12 21:40 security.ubuntu.com_ubuntu_dists_trusty-security_Release
-rw-r--r-- 1 root root 933 Mar 12 21:40 security.ubuntu.com_ubuntu_dists_trusty-security_Release.gpg
-rw-r--r-- 1 root root 542657 Mar 12 21:35 security.ubuntu.com_ubuntu_dists_trusty-security_universe_binary-amd64_Packages
-rw-r--r-- 1 root root 250304 Mar 11 00:34 security.ubuntu.com_ubuntu_dists_trusty-security_universe_i18n_Translation-en
-rw-r--r-- 1 root root 72494 Mar 12 21:40 security.ubuntu.com_ubuntu_dists_trusty-security_universe_source_Sources
-rw-r--r-- 1 root root 8234934 May 8 2014 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty_main_binary-amd64_Packages
-rw-r--r-- 1 root root 4149211 Apr 15 2014 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty_main_i18n_Translation-en
-rw-r--r-- 1 root root 5000095 May 8 2014 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty_main_source_Sources
-rw-r--r-- 1 root root 58512 May 8 2014 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty_Release
-rw-r--r-- 1 root root 933 May 8 2014 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty_Release.gpg
-rw-r--r-- 1 root root 31726252 May 8 2014 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages
-rw-r--r-- 1 root root 18635427 May 8 2014 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty_universe_i18n_Translation-en
-rw-r--r-- 1 root root 27857155 May 8 2014 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty_universe_source_Sources
-rw-r--r-- 1 root root 2881415 Mar 15 22:58 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty-updates_main_binary-amd64_Packages
-rw-r--r-- 1 root root 1784682 Mar 12 18:07 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty-updates_main_i18n_Translation-en
-rw-r--r-- 1 root root 938350 Mar 15 22:58 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty-updates_main_source_Sources
-rw-r--r-- 1 root root 61966 Mar 15 22:58 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty-updates_Release
-rw-r--r-- 1 root root 933 Mar 15 22:58 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty-updates_Release.gpg
-rw-r--r-- 1 root root 1538422 Mar 15 22:58 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty-updates_universe_binary-amd64_Packages
-rw-r--r-- 1 root root 669587 Mar 12 18:27 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty-updates_universe_i18n_Translation-en
-rw-r--r-- 1 root root 510829 Mar 15 22:58 us-west-2.ec2.archive.ubuntu.com_ubuntu_dists_trusty-updates_universe_source_Sources
and a little snippet from /var/lib/dpkg/status
Package: node-normalize-package-data
Status: install ok installed
Priority: extra
Section: web
Installed-Size: 58
Maintainer: Ubuntu Developers <ubuntu-devel-discuss#lists.ubuntu.com>
Architecture: all
Version: 0.2.2-1
Depends: nodejs, node-github-url-from-git, node-semver (>= 2)
Description: Normalizes package metadata - Node.js module
This module is used by node-read-package-json to normalize data it
reads from a package.json file typically found in Node.js modules,
but in principle it could come from any source.
.
Node.js is an event-based server-side javascript engine.
Original-Maintainer: Debian Javascript Maintainers <pkg-javascript-devel#lists.alioth.debian.org>
Homepage: https://github.com/meryn/normalize-package-data
A restart of the instance fixed the issue. Why this worked, I cannot explain!
You can try out the below commands to fix the issue
sudo rmdir /var/lib/dpkg/status
sudo touch /var/lib/dpkg/status
sudo apt-get update
The first command will remove the empty directory, second will create the new directory and the last command will populate the lists files.
Also, Restart your EC2 instance to make the above changes effective.

Resources