Author: Sahil Suri

Setting up a local repository on Ubuntu 16.04

Introduction Having packages available locally is helpful in a number of situations. Your organization might be using certain packages which are not available on public repositories. You might also be building your own debian packages and would prefer to have them available locally on the system. In this article, we will show you how to set up a simple local package repository on an Ubuntu 16.04 system.   Step 1: Install dpkg-dev package To install the dpkg-dev package we will use the following command: root@linnuxnix:~# apt install dpkg-dev Reading package lists... Done Building dependency tree Reading state information... Done dpkg-dev is already the newest version (1.18.4ubuntu1.3). dpkg-dev set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. The package appears to be already installed. Let’s view some information about the package using dpkg -s command. root@linnuxnix:~# dpkg -s dpkg-dev Package: dpkg-dev Status: install ok installed Priority: optional Section: utils Installed-Size: 1715 Origin: debian Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Bugs: debbugs://bugs.debian.org Architecture: all Multi-Arch: foreign Source: dpkg Version: 1.18.4ubuntu1.3 Replaces: manpages-it (<< 2.80-4) Depends: libdpkg-perl (= 1.18.4ubuntu1.3), bzip2, xz-utils, patch (>= 2.7), make, binutils, base-files (>= 5.0.0) Recommends: gcc | c-compiler, build-essential, fakeroot, gnupg | gnupg2, gpgv | gpgv2, libalgorithm-merge-perl Suggests: debian-keyring Breaks: devscripts (<< 2.14.10), dpkg-cross (<< 2.0.0) Conffiles: /etc/dpkg/shlibs.default 1a2b9d0a869e2aa885ae3621c557fb95 /etc/dpkg/shlibs.override 84b1e69080569cc5c613a50887af5200 Description: Debian package development tools This package provides the development tools (including...

Read More

Creating namespaces in Linux using unshare

Introduction In a previous post, we talked about how kernel namespaces and cgroups form the building blocks of containerization in Linux. In this article, we will explore namespaces in more depth by demonstrating some examples of creating namespaces using the unshare command.Namespaces use the clone(), unshare() and netns() system calls to allow different process hierarchies to have different views of the underlying operating system resources. The clone() system call creates a new process and attaches it to a new specified namespace The unshare() system call attaches the current process to a new specified namespace The setns() system call attaches a process to an already existing namespace We will now explore the creation of mount and UTS namespaces to illustrate how a process can have a different file system hierarchy and hostname as compared to the rest of the system. Since we will be using the unshare command to create our namespaces, we’d like to share an excerpt from its man page explaining its usage. NAMEunshare - run program with some namespaces unshared from parentSYNOPSISunshare [options] program [arguments]DESCRIPTIONUnshares the indicated namespaces from the parent process and then executes the specified program. The namespaces to be unshared are indicated via options.Unshareable namespaces are: mount namespace Mounting and unmounting filesystems will not affect the rest of the system (CLONE_NEWNS flag), except for filesystems which are explicitly marked as shared (with mount --make-shared;...

Read More

Recovering a missing kernel in Centos 6

Introduction Recently when I restarted a centos 6.8 system, I was greeted with the message “Error 15:  File not found”. In this article, I will systematically describe the steps I used to recover my system. I was using a VMware virtual machine. Step 1: Identify the error My system did not boot beyond the grub prompt and gave me “Error 15:  File not found”. I still tried to boot the system in single user mode several times without any success.   Step 2: Boot system into BIOS I attached the Centos installation iso to my virtual machine but in order to boot from the iso, I needed to change the boot order in the virtual machine BIOS. The problem was that I was unable to interrupt the boot sequence quickly enough to open the BIOS menu. I finally shut down the machine and appended the following line in the virtual machine’s VMX file. bios.forceSetupOnce = "TRUE" After this, I restarted my virtual machine and it presented the BIOS setup as soon as it powered up.   Step 3: Change boot order in BIOS At the BIOS setup, use the arrow keys to move the cursor to the Boot tab.   Use the arrow keys to bring the cursor to the CD-ROM drive option and press the + key. This will ensure that the system boots from the iso inserted into the CR...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.