Run ssh-agent at login and load keys with an alias

27 07 2016

Add the following lines to the “~/.bashrc” for start automatically the ssh-agent service in each login and create and alias for load the keys and write the passphrase:

if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
fi
alias ssh-keys='ssh-add ~/.ssh/name_of_key_one ~/.ssh/name_of_key_two'





Notes for LUKS partition

10 06 2016

Install requisites:
apt-get install cryptsetup

Create encrypt partition:
cryptsetup -y -v luksFormat /dev/sdX

Create filesystem inside encryp partition:
cryptsetup luksOpen /dev/sdX backupdisk
mkfs.ext4 /dev/mapper/backupdisk

Mount LUKS partition:
cryptsetup luksOpen /dev/sdX backupdisk
mount /dev/mapper/backupdisk /mnt/backupdisk/

Umount LUKS partition:
umount /mnt/backupdisk/
cryptsetup luksClose backupdisk

Change password:
cryptsetup luksDump /dev/sdX
cryptsetup luksAddKey /dev/sdX

Remove password:
cryptsetup luksRemoveKey /dev/sdX

Check mapping status:
cryptsetup -v status backupdisk

Dump headers, for backup:
cryptsetup luksDump /dev/sdX





Install from source GQRX in Debian Jessie

6 06 2016

First of all, the requirements from repositories:

apt-get install liblog4cpp5-dev libboost-thread-dev libboost-program-options-dev gnuradio-dev

The previous line usually solve the following problems:

In file included from /usr/include/gnuradio/block.h:29:0,
from /usr/include/gnuradio/sync_block.h:27,
from /usr/include/gnuradio/blocks/file_sink.h:28,
from ../../gqrx/applications/gqrx/receiver.h:28,
from ../applications/gqrx/mainwindow.h:48,
from ../applications/gqrx/main.cpp:32:
/usr/include/gnuradio/logger.h:122:31: fatal error: log4cpp/Category.hh: No such file or directory
#include

In file included from /usr/include/gnuradio/blocks/file_sink.h:27:0,
from ../../gqrx/applications/gqrx/receiver.h:28,
from ../applications/gqrx/mainwindow.h:48,
from ../applications/gqrx/main.cpp:32:
/usr/include/gnuradio/blocks/file_sink_base.h:27:28: fatal error: boost/thread.hpp: No such file or directory
#include

Now, clone the official repository:

git clone https://github.com/csete/gqrx.git

Compile and install:
cd gqrx
mkdir build
cd build
qmake ..
make
make install





Creating ext4 without journal

10 05 2016

Similar to ext2 but taking advantages of a filesystem desing 15 years later:

mke2fs -t ext4 -O ^has_journal /dev/sdb1





Quick build a .deb package without sign

20 04 2016

# dpkg-buildpackage -us -uc





Google Chrome issue with SHA-1 ssl cert in Debian

18 04 2016

Google Chrome reports some issues in Debian with root ssl certificates related with SHA-1, for example with AddTrust External CA Root.

The problem is related with the following packages, update all and problem solved:

ca-certificates libnss3 libnss3-dbg libnss3-dev libnss3-tools libnss3

More info:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774195
https://bugs.launchpad.net/ubuntu/+source/nss/+bug/1423031
https://bugs.chromium.org/p/chromium/issues/detail?id=437733





Quick notes for compile a kernel following the Debian way

30 03 2016

Simple guide for compiling a custom kernel following the Debian way:

Before all, check your kernel version:
uname -r

Assure that you have “deb-src” section in your “/etc/apt/sources.list” and search for the kernel sources available:
apt-cache search linux-source*

Go to the source path for store the source code there:
cd /usr/src/

Get the linux source code (maybe get it from backports?):
apt-get install linux-source-4.4
(or) apt-get -t jessie-backports install linux-source-4.4

And some requirements:
apt-get install libncurses5-dev build-essential fakeroot ncurses-dev

Extract the code:
tar xaf linux-source-4.4.tar.xz

Enter and configure, don’t fortget saving the changes:
cd linux-source-4.4/
make nconfig

Save some disk space:
scripts/config --disable DEBUG_INFO

Proceed and wait:
make clean
make deb-pkg

Finally install the kernel and the headers:
dpkg -i ../linux-image-4.4.6_4.4.6-1_amd64.deb
dpkg -i ../linux-headers-4.4.6_4.4.6-1_amd64.deb

If you have out-of-tree kernel modules, check their status with the following command and compile manually if is necessary:
dkms status

More info:
http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-building
https://debian-handbook.info/browse/en-US/stable/sect.kernel-compilation.html








Follow

Get every new post delivered to your Inbox.