Linux Partitioning Guide

I use Fedora Linux as my primary desktop OS. Every time there is a fresh install, I find myself confounded on how to partition the OS. So I thought I might as well make a permanent note of how I do it so that I always have a place to come back to. Partitioning Scheme This is how I partition my Fedora during installation: Partition Mounted On Size Encrypted Filesystem Boot /boot 512M No ext4 Boot EFI /boot/efi 200M No vfat Swap - 1.5 times the RAM Yes swap Home /home 265G Yes ext4 Root / 211G No ext4 Encryption Note that Swap and Home partitions have to be encrypted. Swap extends the RAM and can have a sensitive copy of RAM data like passwords, keys, etc. Hence always ensure to encrypt the Swap partition. Home partition is equally essential to be encrypted because this is where your data will live. Things like configuration, SSH keys, GPG keys, API keys are all stored in the home in various directories. So it is of utmost importance that you encrypt these two directories. ...

January 11, 2021 路 2 min 路 Suraj Deshmukh

How to disable your Chrome Ctrl + W keybinding

I am about to attempt the CKA exam and it has a browser based terminal. And I am used to this terminal shortcut Ctrl + W which deletes a word. But the same shortcut in browser can close a tab. Since this exam is combination of both I am afraid I might close my exam tab while deleting a word in terminal. Now the only solution to this is disabling the shortcut in chrome. But turns out that the shortcut is hard coded in chrome. ...

October 16, 2018 路 2 min 路 Suraj Deshmukh

Single node Kubernetes Cluster on Fedora with SELinux enabled

Start a single node fedora machine, using whatever method but I have used this Vagrantfile to do it: # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.define "fedora" do |fedora| fedora.vm.box = "fedora/28-cloud-base" config.vm.hostname = "fedora" end config.vm.provider "virtualbox" do |virtualbox, override| virtualbox.memory = 4096 virtualbox.cpus = 4 end config.vm.provision "shell", privileged: false, inline: <<-SHELL echo '127.0.0.1 localhost' | cat - /etc/hosts > temp && sudo mv temp /etc/hosts SHELL end Now start it and ssh into it: vagrant up vagrant ssh Once inside the machine, become root user and run this script: sudo -i curl https://raw.githubusercontent.com/surajssd/scripts/master/shell/k8s-install-single-node/install.sh | sh And you should have a running Kubernetes cluster. ...

September 11, 2018 路 2 min 路 Suraj Deshmukh

Sharing Vagrant Box offline

If you have some box that was downloaded on your machine from Atlas but now you wanna share it on other machines and you don鈥檛 have internet to download it, how do you share it? You will need to export the box from machine that has it downloaded already. So on machine with boxes: $ vagrant box list centos/7 (libvirt, 1610.01) centos/7 (libvirt, 1704.01) fedora/25-cloud-base (libvirt, 20161122) fedora/26-cloud-base (libvirt, 20170705) I wanted to share fedora/26-cloud-base box to another machine. Run the following command: ...

September 18, 2017 路 2 min 路 Suraj Deshmukh

rpm Notes

This post will get you through all the steps needed for doing RPM packaging. Setup of the system for building rpms $ dnf -y install fedora-packager fedora-review $ sudo usermod -a -G mock vagrant $ fedora-packager-setup $ kinit surajd@FEDORAPROJECT.ORG My Notes Start reading from: Fedora packager鈥檚 guide Some macros come from redhat-rpm-config and fedora-rpm-macros. $ sudo rpm -ql redhat-rpm-config-45-1.fc25.noarch To see all macros on the system: $ rpm --showrc Koji - fedora build system fedora uses fedpkg for doing builds, while rpmbuild is for CentOS To get general info about the package $ rpm -qip ./x86_64/namaskar-1-1.fc25.x86_64.rpm OR ...

March 24, 2017 路 2 min 路 Suraj Deshmukh

Packaging 'kompose' for centos paas sig

Note: This is a living document and will be updated from time to time. Following are steps to package kompose for CentOS PAAS SIG. CentOS PAAS SIG is a repository of packages where rpms related to OpenShift and eco-system around it are delivered. Setup your machine Install packages needed sudo yum update -y && \ sudo yum install -y epel-release && \ sudo yum install -y rpm-build go redhat-rpm-config make koji \ gcc byobu rpmlint rpmdevtools centos-packager Setup certs ...

March 15, 2017 路 4 min 路 Suraj Deshmukh

Testing 'fedora' and 'CentOS' kompose package

I generally do kompose package testing for fedora and CentOS. So here are the steps I follow. Fedora For respective fedora version use the tag respectively for e.g. 25 for fedora 25. Starting the environment: docker run -it registry.fedoraproject.org/fedora:26 bash Running tests: # Inside the container # Pull packages from the testing repository dnf --enablerepo updates-testing -y install kompose # Check the kompose version kompose version # Install the testing dependencies dnf install -y jq make # Pull the git repository to run the functional tests git clone https://github.com/kubernetes/kompose/ cd kompose git reset --hard $(kompose version | cut -d "(" -f2 | cut -d ")" -f1) # Run cmd tests make test-cmd CentOS epel repo Spin the CentOS environment in container. ...

March 14, 2017 路 2 min 路 Suraj Deshmukh