#53 Raspbian Lite & Splunk




SECTION 9 Cyber Security show

Summary: In this episode we talk about installing Rasbian Lite and logging with Splunk. Dorothy took on the task of installing Rasbian Lite, while I focused on Splunk. We both ran into issues. The good news, we have Raspbian Lite on all four of our Raspberry Pi’s.<br> How to install Raspbian Stretch Lite – No GUI<br> <br> <br> Go to the Downloads page, and select the appropriate choice. <a class="urlextern" title="https://www.raspberrypi.org/documentation/installation/installing-images/linux.md" href="https://www.raspberrypi.org/documentation/installation/installing-images/linux.md" rel="nofollow">Installation page</a><br> <br> <br> Click on Downloads Tab.<br> <br> <br> Select Raspian Stretch Lite<br> <br> <br> Download zip (Release 11-29-17 Version 4.9)<br> <br> <br> Unzip it.<br> <br> <br> Go to Linux (on the Installation page) for instructions on how to get it installed in Linux.<br> <br> <br> Open a terminal window.<br> <br> <br> Enter “lsblk” command to see which devices are currently connected to your workstation.<br> <br> <br> Make a note of it.<br> <br> <br> Insert SD Card in SD Card holder, and plug it into the USB port in your workstation.<br> <br> <br> Run “lsblk” again to determine which drive your sd card is listed as.<br> <br> <br> To install Raspbian Stretch Lite on SD Card<br> <br> <br> <br> Make yourself root. (sudo -s)<br> <br> <br> Enter your password.<br> <br> <br> Run “dd bs=4M if=2017-11-29-raspbian-stretch-lite.img of=/dev/sdX conv=fsync” (sdX is generic, the X will be replace by the actual drive letter your sd card is listed as, for example, on ours it was listed as sdc, so the C replaces the X in the command). Be sure to check your sd card holder is blinking, so you know it is being copied.<br> <br> <br> <br> <br> To make installation same size as image<br> <br> If the SD card is bigger than the original image size, dd will make a copy of the whole card. We must therefore truncate the new image to the size of the original image. Make sure you replace the input file if= argument with the correct device name. diff should report that the files are identical.<br> <br> <br> Run “dd bs=4M if=/dev/sdc of=from-sd-card.img”<br> <br> <br> Run “truncate – -reference 2017-11-29-raspbian-stretch-lite.img from-sd-card.img”<br> <br> <br> Run “diff -s from-sd-card.img 2017-11-29-raspbian-stretch-lite.img”<br> <br> <br> If the files are identical, the output message should read: “Files from-sd-card.img and 2017-11-29-raspbian-stretch-lite.img are identical.”<br> <br> <br> Run “sync” to ensure the cache is flushed and it is safe to unmount sd card.<br> <br> <br> Run “umount (name of the mountpoint)”<br> <br> <br> <br> To test if the installation worked<br> <br> <br> <br> Insert sd card into Raspberry Pi3’s sd card slot.<br> <br> <br> Plug in the power cable into the Raspberry Pi3’s power slot.<br> <br> <br> Plug in the peripherals into the Raspberry Pi3’s USB slot.<br> <br> <br> Login: pi<br> <br> <br> Password: raspberry<br> <br> <br> If the installation runs, it means it was successful.<br> <br>