IoT Bytes

Bits and Bytes of IoT

Change piCore (Tiny Core) Linux Boot Codes (Boot Options)

Pradeep Singh | 31st Aug 2017

bootcode

Boot codes are configuration options used by Linux operating system when the system is starting up. Linux kernel uses these codes to setup a functional OS environment. The following document lists all the supported boot codes or boot option supported by piCore / TinyCore –

http://tinycorelinux.net/faq.html#bootcodes

If you need to change a Boot Code for your piCore running on Raspberry Pi, you can follow this document –

1.  Mount the ‘/dev/mmcblk0p1‘ Partition:

The first partition (/dev/mmcblk0p1) is Win95 FAT32 (VFAT) type partition; it contains the basic piCore system and the Raspberry Pi boot loader, firmware and other support files. PiCore OS is loaded into memory (RAM) from this partition and after that is unmounted. piCore doesn’t use this partition for any read or write operation to keep the OS Image safe.

The file that contains the Boot Code (or Boot Options) is stored in this partition, and to get access to that file we need to mount this partition using the following command –

mount /dev/mmcblk0p1

2. Check the cmdline File Name based on Raspberry Pi Model:

As there are several different RaspberryPi models available in the market, piCore uses different Boot Code files for each of them. You can use the following command to list all the settings for different Raspberry Pi Models –

cat /mnt/mmcblk0p1/config.txt | more

As I am using Raspberry Pi 3, based on the contents of “/mnt/mmcblk0p1/config.txt” file, the command line file the boot codes for Raspberry Pi 3 is “cmdline3.txt“. So any Boot Code changes that I need to make, will be done in “cmdline3.txt” and not in “cmdline.txt” file.

3. Edit the right cmdline File to Change the piCore Boot Codes:

You can edit the “cmdline” file based on your Raspberry Pi Model and change the Boot Codes as per your requirements. For me, the file name is “cmdline3.txt” (as I am using Raspberry Pi 3), so I will use the following command to change Boot Codes –

sudo vi /mnt/mmcblk0p1/cmdline3.txt

Following are the contents of my “cmdline3.txt” file –

tc@box:~$ cat /mnt/mmcblk0p1/cmdline3.txt 
dwc_otg.lpm_enable=0 console=ttyS0,115200 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed waitusb=1
tc@box:~$

4. Reboot the Raspberry Pi:

Reboot your Raspberry Pi to make the changes effective, using the following command –

sudo reboot

 

2 thoughts on “Change piCore (Tiny Core) Linux Boot Codes (Boot Options)

  1. “cat /mnt/mmcblk0p1/config.txt | more” is silly:

    “more /mnt/mmcblk0p1/config.txt” or “cat /mnt/mmcblk0p1/config.txt” are better

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: