How initrd is mounted by Linux kernel

Lets first try to understand what are the ways to mount the root file system, Altough the documentation from Documentation/early-userspace/README inside kernel source code is bit outdated, it is still has valid information as below, The kernel has currently 3 ways to mount the root filesystem: a) all required device and filesystem drivers compiled into … Read more

How to recreate dts file from a live device ?

Sometimes it happens that you don’t have source code of the device on which you are working but want to know some kernel configurations or peripheral mappings etc in those case’s Linux kernel provides good insight through /proc filesystem. In this post also, we will try to showcase how you can regenerate dts file from … Read more

How to extract files from jffs2 root filesystem image ?

[ Note: following commands has been tried on ubuntu 16.04, but should work on other Linux distros as well ] Lets create a temporary device node in /tmp as, $ sudo mknod /tmp/mtdblock0 b 31 0 $ ls -l /tmp/mtdblock0 brw-r–r– 1 root root 31, 0 Aug 23 00:21 /tmp/mtdblock0 $ sudo modprobe mtdblock $ … Read more

Creating jffs2 filesystem image for embedded target platform

What is JFFS2 ?=> JFFS2 is a log-structured file system designed for use on flash devices in embedded systems. Rather than using a kind of translation layer on flash devices to emulate a normal hard drive, as is the case with older flash solutions, it places the filesystem directly on the flash chips.JFFS2 was developed … Read more

Understanding /proc/meminfo – Analyzing Linux memory utilization

/proc/meminfo Provides valuable information about the system’s RAM usage. (utilization of run time memory).  This varies by architecture and compile options.  The following is from a 4GB RAM, 64bit Ubuntu Desktop $ cat /proc/meminfo MemTotal: 4103420 kB MemFree: 449084 kB MemAvailable: 1149688 kB Buffers: 170416 kB Cached: 1031280 kB SwapCached: 0 kB Active: 2808536 kB … Read more