

The documentation for all the options is available at Simple non-destructive way to tryout multiple OS on Pi Here is an example file content gpu_mem=128 The second file is the configuration file config.txt, which is the equivalent of bios settings for the Raspberry Pi SoC. Root=/dev/mmcblk0p2 rootfstype=ext4 fsck.repair=yes rootwait This file is more close to the grub/syslinux command lineįollowing is an example of content of cmdline.txt dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 elevator=deadline The first file cmdline.txt configures the command line parameter passed while starting the boot process. In addition to the kernel image, there are two configuration files, which are interesting to understand the booting process. So the boot loader will look for the correct kernel image file for your model of Pi. For Pi0, Pi1 models the default kernel image file name is kernel.img and for Pi2 and Pi3 models the default kernel image file is called kernel7.img.

To boot Linux, the kernel image must be present on this partition. The boot process on Pi expects the SD card to have a FAT32 based first partition. With all the data in the /boot directory it is still within 30Mb of space, while the root file system size can be much bigger based on the user application and data. If we look ate the space usage, a typical kernel image is only around 10mb in size. So the trick to run Linux on Pi from USB stick involves installing the kernel images on the SD card while keeping the root file system on the USB stick and providing the information about the root filesystem location to the kernel in the boot command line.

Going through the Pi documentation, it looks like Pi boards recognize the SD card as the only boot device. Usually the kernel images are kept in the first partition and this partition is mounted on /boot directory. In simple words, booting Linux involves loading the kernel, which initializes the hardware, and then mounting the root filesystem, which has all the user applications. The process is summarized in the following section.
#Ntopng upgrade raspbian pi how to
On the Internet there is a lot of information on how to install and boot Linux from USB sticks for Raspberry Pi. While this is a good enough solution I wanted to know how things work internally and if there was a simple way to achieve multiboot without using any tools (and more so for my learning purpose). Both options allow multibooting your Pi board with different OS distros. So was thinking if the USB sticks could be used.Ī little research on the Internet came up with 2 prominent options BerryBoot and Noobs. While I have a bunch of USB sticks lying around unused. I am running short on micro SD cards and it has a size limit too. I realized quite quickly that to try a new OS I would need to block copy (dd) the OS image to my SD card every time. Recently I got a Raspberry Pi 3 board and wanted to try out various OS options on it. Ntop can even be run from a docker container Now the monitoring data from ntopng can can be exported to Grafana.

This will keep the monitored traffic separate from the monitoring traffic. Accessing the Monitoring resultĪs the Gigabit port of the Pi is used to receive mirrored traffic, the monitoring dashboard is accessed over the wlan0 interface. I used the Rasbian image for the pi and Ntopng can be easily installed from their repository using apt. It can aggregate and produce nice traffic analysis summary. To monitor traffic over long time I used Ntop. These tools give a live view of the packets going through my home network. Once the traffic is available on the mirrored port, I was able to run traffic monitors like wireshark, tshark and tcpdump on the mirror port to analyze all the traffic between the router and ISP. All traffic monitoring happens on the Pi. The mirrored traffic is passed on to the Raspberry Pi. I used this to mirror traffic arriving through the router and the ISP connection. The NetGear GS105E switch provides the capability of port mirroring. The following figure shows the connectivity. To get around the problem I decided to put the traffic monitor on the WAN side of the router. This makes traffic monitoring a bit of a problem on the LAN side. As with most people I have very few devices that connect to the router over an Ethernet cable, most devices are wifi capable. The router provides both wire and wifi connectivity. I have a PPPoE connection to my ISP that connects to my home router. So, I decided to do a weekend project to implement traffic analysis on my home network. I had the Raspberry Pi laying around for some time without doing any major function and so was the NetGear switch.
