The knowledge about the Raspberry Pi

1. rotate the official dispaly 7 inch with 180 degree

  1. # sudo vim /boot/config.txt

    and at the end paste

  2. # lcd_rotate=2

2. Add Chinese input method

  1. install Chinese input method

    # sudo apt-get install scim-pinyin

  2. Reboot the system

    # sudo reboot

3. How to back up and restore the SD card

I am running the ubuntu-mate 16.04 on the Raspberry pi. There are 2 partitions on the system. /PI_BOOT and /PI_ROOT are the partitions. Normally, dd command will create an image which will take the same space and the card. The file will take too much space in the hard disk. It takes too much time and space. So I will create the zip file. Which depends on the used space of the SD card.

1. find and mount partitions

  1. Check the lab of the SD card

    # sudo df -h

    (I will take the /dev/sdd1 and /dev/sdd2 as the partitions)
  2. (If the SD card is mounted, please skip this steep) Mount disks

    # cd /media

    # sudo mkdir sdd1 sdd1

    # sudo mount /dev/sdd1 /media/sdd1

    # sudo mount /dev/sdd2 /media/sdd2

2. Back up the SD card

# sudo dd if=/dev/sdd | gzip>/home/_username_/_nameofbackup_.gz

(Please set up the destination and nameofbackup by yourself)

3. Restore the back up

  1. Format the SD card with parted

  2. Restore the image

    # sudo gzip -dc >/home/_username_/_nameofbackup_.gz | sudo dd of=/dev/sdd

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.