Tinker Board S : 기본설정, eMMC에 OS 설치

OS/Tinker Board S 2018.08.18 17:14 Posted by 파란크리스마스

출처

OS 업데이트

$ sudo apt-get update
$ sudo apt-get upgrade

IP 확인

$ ip addr | grep "inet "
    inet 127.0.0.1/8 scope host lo
    inet 192.168.137.223/24 brd 192.168.137.255 scope global dynamic eth0
    inet 192.168.0.115/24 brd 192.168.0.255 scope global wlan0

SD 확장

SD 확장전 용량확인

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.3G  4.4G  2.5G  64% /
devtmpfs        943M     0  943M   0% /dev
tmpfs          1007M     0 1007M   0% /dev/shm
tmpfs          1007M   17M  990M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs          1007M     0 1007M   0% /sys/fs/cgroup
/dev/mmcblk0p1   63M  7.5M   56M  12% /boot
tmpfs           202M   12K  202M   1% /run/user/1000

SD FDisk

$ sudo fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.29.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 29.8 GiB, 32010928128 bytes, 62521344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x58bc1052

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1        8192   139263   131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      139264 15630335 15491072  7.4G 83 Linux

Command (m for help): d
Partition number (1,2, default 2): 2

Partition 2 has been deleted.

Command (m for help): n
Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (2048-62521343, default 2048): 139264
Last sector, +sectors or +size{K,M,G,T,P} (139264-62521343, default 62521343): 

Created a new partition 2 of type 'Linux' and of size 29.8 GiB.
Partition #2 contains a ext4 signature.

Do you want to remove the signature? [Y]es/[N]o: Y 

The signature will be removed by a write command.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: 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).

linaro@tinkerboard:~$ sudo shutdown -r now

SD 확장

$ sudo resize2fs /dev/mmcblk0p2
resize2fs 1.43.4 (31-Jan-2017)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/mmcblk0p2 is now 7797760 (4k) blocks long.

SD 확장 확인

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        30G  4.4G   24G  16% /
devtmpfs        943M     0  943M   0% /dev
tmpfs          1007M     0 1007M   0% /dev/shm
tmpfs          1007M  8.9M  998M   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs          1007M     0 1007M   0% /sys/fs/cgroup
/dev/mmcblk0p1   63M  7.5M   56M  12% /boot
tmpfs           202M  8.0K  202M   1% /run/user/1000

How to burn Linux image to eMMC

출처 : How to burn Linux image to eMMC
bpi-copy command

eMMC 용량 확인

$ sudo fdisk -l

... 생략 ...

Disk /dev/mmcblk1: 14.7 GiB, 15758000128 bytes, 30777344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

... 생략 ...

Disk /dev/mmcblk0: 29.8 GiB, 32010928128 bytes, 62521344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x58bc1052

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1        8192   139263   131072   64M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      139264 62521343 62382080 29.8G 83 Linux

이미지 복원

이미지 복원이 완료되면 SD 메모리를 제거하고 재부팅, eMMC 용량을 다 사용하지 않는 경우 eMMC 확장 필요

$ sudo dd if=tinkerOSplus207.img of=/dev/mmcblk1 bs=10MB
800+1 records in
800+1 records out
8002732032 bytes (8.0 GB, 7.5 GiB) copied, 241.641 s, 33.1 MB/s


 

티스토리 툴바