Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Insert the SD card into your linux system.
  • Start a terminal.
  • Identify the SD card via shell command lsblk


    Code Block
    languagebash
    titleExemplary lsblk output
    linenumberstrue
    collapsetrue
    NAME  MAJ:MIN  RM      SIZE  RO   TYPE    MOUNTPOINT
    sda     8:0    0       120G  0    disk
    ├─sda1  8:1    0       112G  0    part    /
    ├─sda2  8:2    0         1K  0    part
    └─sda5  8:5    0         8G  0    part    [SWAP]
    sdc     8:32   1       7,2G  0    disk
    └─sdc1  8:33   1         1M  0    part
    sr0    11:0    1      1024M  0    rom
    
    RM = Removable → sdc is the SD card with one partition sdc1


  • Attention: If the wrong identifier is selected, the following commands can destroy the host system! Therefore, be aware to use the correct identifier.
  • The identifier is similar to sdXXX, where XXX symbols the identified SD card. To detect the SD card, it could help to look for the expected SD card size. After that, remove the SD card, use lsblk and look whether the expected device is removed. Then, insert the SD card again and check with lsblk which identifiert is selected for the SD card.
  • Unmount all partitions of the SD card via sudo umount /dev/<above identified partitions>
  • Start the tool fdisk as root via sudo fdisk /dev/sdXXX
  • Look at the partition structure via inserting p → Enter
  • Attention: Deleting the partitions in the next step destroys the saved information. If the information are needed save them before continuing!
  • Then delete all partitions via d → Enter
  • After all partitions are deleted the SD card structure can be created.

...

The filesystems are created with the linux tool mkfs.

  • Plug the SD card out and in of the system.
  • Create a vFAT filesystem on partition 1 via sudo mkfs -t vfat /dev/sdXXX1, whereby XXX symbols the above detected SD card identifier.
  • Create an ext3 filesystem on partition 2 via sudo mkfs.ext3 /dev/sdXXX1, whereby XXX symbols the above detected SD card identifier.
  • No extra filesystem for partition 3 is needed.

...

  • Copy the linux root filesystem to the ext3 partition 2 and decompress it if it is compressed.
    • For Linux this can be done using the following steps:
      • Mount the ext3-partition (in this case 2) to an available folder (e.g. /mnt/mountpoint), if necessary, via sudo mount /dev/<correct partition of the SD card> /mnt/mountpoint
      • Extract the <root filesystem>.tar.gz via sudo tar -xvf <path to compressed root filesystem>.tar.gz -C /mnt/mountpoint/ 
      • Synchronise the buffers via sudo sync

...

After doing these steps, the SD card can be inserted into the board and the boot process can be started. If booting runs into linux, the procedure is done.

////////////////////////

Informationsfragmente

mount/umount muss noch beachtet werden!!!!!

Data of each partition

Before writing data to the partitions, unmount the device
      sudo umount /dev/sdX*
and plage the SD card  in and out of the card reader.