<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Shobhit Kumar</title>
    <description>My titbits on Code, Linux Systems, Embedded, Photgraphy, Badminton and whatever else I like
</description>
    <link>https://www.shobhit.info/</link>
    <atom:link href="https://www.shobhit.info/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sun, 17 May 2026 13:28:45 +0000</pubDate>
    <lastBuildDate>Sun, 17 May 2026 13:28:45 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Linux &amp; Opensource - Should we tame the beast ?</title>
        <description>&lt;p style=&quot;text-align: justify;&quot;&gt;
After been working in Linux for so long, I thought none in today&apos;s technology oriented market would be untouched by Linux in someway or the other. With companies embracing open soure technologies with wide open arms and making huge investments in open source development Linux has become the poster child for all tech companies. 
&lt;/p&gt;
&lt;p&gt;
Interesting read: &lt;a href=&quot;https://www.toptal.com/linux/celebrating-25-years-of-linux&quot;&gt;Celebrating 25 Years of Linux Kernel Development]&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
So it was a surprise for me when I recently visited one of the prestigeous collge for a Linux workshop and found that Linux usage is negligible or very limited. Brief interaction with the students confirmed my reasons for the same. Today all technologies we have especially cloud oreinted are cross platform and easily work on other systems like Windows or MAC OSX. Then what is the need for Linux. I thought it was time to pen down my thoughts on why we need to learn Linux and what is its importance in todays world.

Let me just start by giving some data on what kind of companies are focussing on Linux and Opensource in general -
&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://www.shobhit.info/assets/img/companies.jpg&quot; alt=&quot;Comapnies working in Linux Kernel&quot; /&gt;
&lt;b&gt;Source: LinuxFoundation Kernel Development Report&lt;/b&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Be it companies producing low power sensor devices to complex SoCs or Web services, everybody is hooked to using open source tech. Its not only the cost advantage that everybody sees. After all you need engineers to enhance, maintain and bring out best in your chips. So then why embrace Linux ? Its the quick time to market and quality that attracts tech companies. Just to give an example of Linux kernel on how Linux kernel has grown over the years, refer to figure below - 
&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://www.shobhit.info/assets/img/kernel-loc.png&quot; alt=&quot;Linux Kernel Development&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And following fugure gives details about all the contribution for one kernel version 4.13 -&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://www.shobhit.info/assets/img/contribution.png&quot; alt=&quot;Linux Kernel Contribution&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Source: LinuxFoundation Kernel Development Report&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;
So why more and more companies are moving towards OpenSource and Linux ? &lt;br /&gt;&lt;/p&gt;

&lt;p&gt;The main reasons can be listed as below -&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Highly Flexible and Scalable
    &lt;ul&gt;
      &lt;li&gt;Being used in small smartwatches to huge media transcode servers today&lt;/li&gt;
      &lt;li&gt;Fit for simple home usage to complex and huge Data centers&lt;/li&gt;
      &lt;li&gt;Highly scalable distributed computing architecture and software availability&lt;/li&gt;
      &lt;li&gt;Freedom to customize as per your business needs&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Very Portable
    &lt;ul&gt;
      &lt;li&gt;Works on ARM, MIPS, Intel, AMD and varied kind of hardware architecture&lt;/li&gt;
      &lt;li&gt;Can achieve small footprint for real resource scarce environment&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Secure, Reliable and Fast
    &lt;ul&gt;
      &lt;li&gt;Open source philosophy provides a mature software tested by thousands of engineers and companies&lt;/li&gt;
      &lt;li&gt;Time to market is very fast&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;High Quality Code and Design,
    &lt;ul&gt;
      &lt;li&gt;The only project where Tech Giants working together and not against each other&lt;/li&gt;
      &lt;li&gt;Highly scalable and robust design is the common goal&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Longevity and Maintainability
    &lt;ul&gt;
      &lt;li&gt;Continuously maintained by a community of people not a company&lt;/li&gt;
      &lt;li&gt;Be seeders and the community will maintain your software&lt;/li&gt;
      &lt;li&gt;Newer upgrades bring in all your changes along with improved features and bug fixes&lt;/li&gt;
      &lt;li&gt;Freedom from Vendor Lock in&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;And of course its Free&lt;/li&gt;
&lt;/ol&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
Today open source and Linux has become so pervasive that companies working in Big Data, Cloud Computing, Databases, Machine Learning, etc. all  use one or the other variant of Linux OS and rely heavily on the Development Tools from the Linux/Open Source eco-system. All open source tools are developed for Linux first and then made available on other platforms. For example Apache Web Server which drives more that 70% of the web servers in the market was first developed for Linux. And there is no doubt that we should always develop in the same environment as where we would deploy our production solutions.

Further to underline the importnace of Linux and Open Source in the industry, if we look at how companies are engaging with open source we find that - 
&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;65 % of the companies are contributing to Open Source&lt;/li&gt;
  &lt;li&gt;67% of the companies encourage developers to participate&lt;/li&gt;
  &lt;li&gt;Only 1 in 3 companies have full time dedicated resource
    &lt;ul&gt;
      &lt;li&gt;Lack of skills to participate in open source projects&lt;/li&gt;
      &lt;li&gt;Not yet truly understood that they need to be seeders than lechers to reap the benefit of Open source&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;67 % participate to fix bugs or enhance&lt;/li&gt;
  &lt;li&gt;59 % do it to get competitive advantage&lt;/li&gt;
  &lt;li&gt;34 % of companies have 50% of their developers contributing to 1 or more open source project&lt;/li&gt;
  &lt;li&gt;50% of the companies have no formal policy for selecting and approving open source code&lt;/li&gt;
  &lt;li&gt;One of the tool - GIT is the overwhelming choice for SCM - 73 %&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From students perspective if we look at what managers are looking while hiring, we find -&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://www.shobhit.info/assets/img/hiring.png&quot; alt=&quot;Hiring&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If we look at what motivates the professional developers out there in the market we find -&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://www.shobhit.info/assets/img/motivation.png&quot; alt=&quot;Motivation&quot; /&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
So to answer the question if we should learn Linux and Open Source devlopment tools, technologies and environment, I can give a very emphatic  !!YES!!. It is absolutely important for anybody in Software/IT career to focus on Linux. My recommendation to engineering students is to make Linux as their primary Learning and Development tool, because its everywhere and is so versatile that it can be used in mutiple learning contexts. There is a rich community of experts and beginners alike which forms an excellent learning platform.
&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
Industry is looking to hire Linux talent and honing ones&apos; skills at college level is the best way to be job ready. Running Linux and working in Linux and solving problems in Linux, you will not only learn computer and software architecture but problem solving skills that are invaluable in ones&apos; career.
&lt;/p&gt;
&lt;p style=&quot;text-align: justify;&quot;&gt;
So I would encourage every body who had read this far to embark on their journey of learning and take it up as a challenge which you are willing to accept and unwilling to postpone and determined to win.
&lt;/p&gt;

&lt;p style=&quot;text-align: justify;&quot;&gt;
&lt;font size=&quot;2&quot;&gt;
Note: &lt;br /&gt;
1. All references has been taken from The Linux Foundation reports on Kernel Dev and Job Market in Open Source 2017&lt;br /&gt;

2. This is first part of the series on exlaining why we need to dive into Linux. Please stay tuned for upcomming short tutorials on setting up and starting learning on Linux. Please put in your interest in comments below and topics you would like to learn.
&lt;/font&gt;
&lt;/p&gt;
</description>
        <pubDate>Tue, 27 Nov 2018 00:00:00 +0000</pubDate>
        <link>https://www.shobhit.info/2018/11/27/Why_Learn_Linux.html</link>
        <guid isPermaLink="true">https://www.shobhit.info/2018/11/27/Why_Learn_Linux.html</guid>
        
        <category>Linux</category>
        
        
      </item>
    
      <item>
        <title>Create Customized Linux Distro</title>
        <description>&lt;p&gt;I own a HP Mini210 with Intel Pineview processor and all of the latest and greatest Linux distro sucks on this one. And those Win guys who may be reading this, don’t ever mention to me on trying Win 7 on this one, though it came with home basic by default, that goes against my morals to have such a thing like Windows on my machine less even talk about it.&lt;/p&gt;

&lt;p&gt;So here I am on creating my own distribution customized to my taste and perfect the way I want it.&lt;/p&gt;

&lt;p&gt;Few questions I asked my self about what I want to do once I am done with this distribution and thats what I concluded -&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Boot as fast as it can&lt;/li&gt;
  &lt;li&gt;Able to browse internet&lt;/li&gt;
  &lt;li&gt;Download my mails&lt;/li&gt;
  &lt;li&gt;Watch on-line/local stored movies. HD content possible ?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So the above needed only simple packages, but I wanted something more - An easy to use package management system and I zeroed on Debian tool “aptitude” and my base distro as Debian. So lets jump into creating it right away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you need to achieve this&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Any Linux desktop environment - Fedora/Ubuntu/Mint/Suse/Mandrake, etc&lt;/li&gt;
  &lt;li&gt;I see pain on Windows guys :) So install
    &lt;ul&gt;
      &lt;li&gt;VirtualBox&lt;/li&gt;
      &lt;li&gt;And then install any of the above mentioned flavors of Linux distros inside that&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Do install debootstrap, make, gcc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Creating the base root file system&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now you can directly install this on a physical hard disk as well, but I will give steps based on virtual disks so that we can burn them as Live CD, you know the cool stuff to boot from USB pen-drive any-time, anywhere and yes persistent.&lt;/p&gt;

&lt;p&gt;Create a virtual disk -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span class=&quot;nb&quot;&gt;dd &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/dev/zero &lt;span class=&quot;nv&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;rootfs.ext4 &lt;span class=&quot;nv&quot;&gt;bs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1024 &lt;span class=&quot;nv&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;524288&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Yeah 512 MB is more than sufficient. We can resize it later. Keeping it small helps in actually while burning on USB pen drive. Actually the base console install needs just 256 MB. Blown Away Eh :)&lt;/p&gt;

&lt;p&gt;Prepare the disk image file with ext4 file system and mount it. Next create the basic root fs.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;mkfs.ext4 rootfs.ext4
&lt;span class=&quot;nb&quot;&gt;mkdir &lt;/span&gt;rootfs
mount &lt;span class=&quot;nt&quot;&gt;-o&lt;/span&gt; loop rootfs.ext4 rootfs
debootstrap &lt;span class=&quot;nt&quot;&gt;--arch&lt;/span&gt; ia64 squeeze rootfs http://ftp.us.debian.org/debian&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You have the rootfs ready and now time to use another cool thing - chroot&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;mount &lt;span class=&quot;nt&quot;&gt;-t&lt;/span&gt; proc proc rootfs/proc
mount &lt;span class=&quot;nt&quot;&gt;-t&lt;/span&gt; sysfs sys rootfs/sys
mount &lt;span class=&quot;nt&quot;&gt;--bind&lt;/span&gt; /dev rootfs/dev
&lt;span class=&quot;nb&quot;&gt;chroot &lt;/span&gt;rootfs /bin/bash&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You are now in your root file system and any modification you do are restricted to your new debian root fs. Do configure the networking stuff, like modifying the /etc/hosts, /etc/network/interfaces, /etc/resolv.conf, /etc/hostname, etc&lt;/p&gt;

&lt;p&gt;Also remember to add a new user for your self using useradd and also change the root password using passwd command. In Fedora selinux might crip, so disable that. Now our rootfs is ready. Just unmount everything&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span class=&quot;nb&quot;&gt;exit
&lt;/span&gt;umount rootfs/proc
umount rootfs/sys
umount rootfs/dev
umount rootfs&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;strong&gt;Building the Kernel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I wanted to use the latest Linux kernel out there and grabbed the tarball from www.kernel.org for latest stable 3.4.4 kernel&lt;/p&gt;

&lt;p&gt;Apply the default kernel configuration &lt;strong&gt;x86_64_defconfig&lt;/strong&gt;
Now here comes the difficult and iterative task of fine tuning your kernel to support your device and only your device :) I removed all the unnecessary drivers. Just selected exact drivers matching my hardware for the HP Mini 210. Sometimes things didn’t work and you relise you have removed wrong driver and need to rebring it in. Now as I wanted to make it boot fast. Most of the drivers for the netbook I just made as kernel modules to have a very small kernel. Actually basic kernel booted in less than 3 seconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Putting things together with a boot-loader (Grub)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Insert you pen drive and make two partitions using fdisk. Note the device name carefully - sdb or sdc, etc&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;boot partition - 64 MB is more than sufficient. Format as vfat(mkfs.vfat)&lt;/li&gt;
  &lt;li&gt;rootfs partition - 8 GB for now. You can resize it later&lt;/li&gt;
  &lt;li&gt;Make additional partitions as you wish. Basically the current system to be usable you may need nothing more than 1.5 GB&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Mount the vfat partition say as /media/boot. Install the grub as follows -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;grub2-install &lt;span class=&quot;nt&quot;&gt;--force&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--no-floppy&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--root-directory&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/media/boot /dev/sdb1&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Copy the default grub.cfg from your host linux system /boot/grub2/grub.cfg /mnt/boot/boot/grub2/grub.cfg. Remove all the enteries and just add a new entry for our latest kernel as follows -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;menuentry &lt;span class=&quot;s1&quot;&gt;&apos;TUX Kernel (3.4.4)&apos;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;--class&lt;/span&gt; gnu-linux &lt;span class=&quot;nt&quot;&gt;--class&lt;/span&gt; gnu &lt;span class=&quot;nt&quot;&gt;--class&lt;/span&gt; os &lt;span class=&quot;o&quot;&gt;{&lt;/span&gt;
	load_video
	&lt;span class=&quot;nb&quot;&gt;set &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;gfxpayload&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	&lt;span class=&quot;nb&quot;&gt;set &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&apos;(hd0,msdos1)&apos;&lt;/span&gt;
	&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;Loading Tux Kernel (3.4.4)&apos;&lt;/span&gt;
	linux   /bzImage &lt;span class=&quot;nv&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/dev/sdb2
&lt;span class=&quot;o&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Burn the rootfs, resize it to 8GB and label it&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span class=&quot;nb&quot;&gt;dd &lt;/span&gt;&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;rootfs.ext4 &lt;span class=&quot;nv&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/dev/sdb2
e2fsck /dev/sdb2
resize2fs /dev/sdb2
e2label /dev/sdb2 rootfs&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Copy the kernel image to the /boot partition&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span class=&quot;nb&quot;&gt;cp arch&lt;/span&gt;/x86/boot/bzImage /media/boot&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;We are ready. just boot from the pen drive and you have console environment booted in under 8s. Install the X environment as  follows -&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;apt-get update
apt-get &lt;span class=&quot;nb&quot;&gt;install &lt;/span&gt;xfce4&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;Now we have a bare minimum Linux system (Under 1 GB). We can fine tune what packages we want like firefox(browser), thunderbird (e-mail client), vlc(media player) etc avoiding all the clutter that all of the latest distros install by default. I got my desired system in less than 1.5Gb booting in around 10s.&lt;/p&gt;
</description>
        <pubDate>Mon, 16 Jul 2012 10:16:17 +0000</pubDate>
        <link>https://www.shobhit.info/2012/07/16/Create_Customized-Linux-Distro.html</link>
        <guid isPermaLink="true">https://www.shobhit.info/2012/07/16/Create_Customized-Linux-Distro.html</guid>
        
        <category>Linux</category>
        
        
      </item>
    
  </channel>
</rss>
