First steps

When I have free time I experiment with my A20-OLinuXino-MICRO board a lot. Sometimes those experiments lead to a screwed filesystem on SD card, ubootable or unstable system. Writing a fresh and working image to the SD card is unevitable but then all previously made modifications are lost. I decided to keep track of the most common changes I made.

  • Exstending filesystem

My Arch Linux ARM image is less than 1 GB in size and my uSD card is 8GB so I have almost 7 GB unallocated space on the card after I write the Linux image to it. There are multiple ways to extend the partition and FS, that is what I use:


[root@alarm-a20 ~]# fdisk /dev/mmcblk0
Welcome to fdisk (util-linux 2.26.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p):
Using default response p
Partition number (1-4, default 1):
First sector (2048-15564799, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-15564799, default 15564799):
Using default value 15564799
Partition 1 of type Linux and of size 7.4 GiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.
[root@alarm-a20 ~]# shutdown -r now
[root@alarm-a20 ~]# resize2fs /dev/mmcblk0p1

  • Minimize writing to SD card
  1. Disable systemd journald logging to filesystem (uSD card):

Edit /etc/systemd/journald.conf, uncomment Storage option and change it to none

Storage=none

2. Change pacman cache directory to /tmp:

Edit /etc/pacman.conf, uncomment CacheDir option and change it to /tmp/cache/pacman/pkg/

CacheDir    = /tmp/cache/pacman/pkg/

  • Colorify the console
  1. More colors in pacman output:

Edit /etc/pacman.conf, uncomment Color option

2. More colors in bash – to be filled later

  • Change time zone
[root@alarm-a20 ~]# timedatectl set-timezone Europe/Sofia 

 

Advertisements
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s