Nach der Installation von Ubuntu Mate sollte die SD-Kartengröße an die tatsächliche SD-Karte angepasst werden. Hierfür führt man in der Konsole nachfolgende Schritte aus:
#Zuerst prüfen wir die aktuelle Größe der SD-Karte #vorher: 3,5G pi@pi-desktop:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/root 3,5G 3,2G 373M 90% / devtmpfs 459M 0 459M 0% /dev tmpfs 463M 84K 463M 1% /dev/shm tmpfs 463M 6,8M 457M 2% /run tmpfs 5,0M 4,0K 5,0M 1% /run/lock tmpfs 463M 0 463M 0% /sys/fs/cgroup /dev/mmcblk0p1 64M 20M 45M 32% /boot tmpfs 93M 24K 93M 1% /run/user/1000 #öffnen des Partitionsmanagers fdsik pi@pi-desktop:~$ sudo fdsik /dev/mmcblk0 [sudo] password for pi: 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 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 (133120-30318591, default 133120): Last sector, +sectors or +size{K,M,G,T,P} (133120-30318591, default 30318591): Created a new partition 2 of type 'Linux' and of size 14,4 GiB. 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). #System neustarten pi@pi-desktop:~$ sudo shutdown -r now #nach dem neustart muss das Filesystem noch angepasst werden pi@pi-desktop:~$ sudo resize2fs /dev/mmcblk0p2 [sudo] password for pi: resize2fs 1.42.12 (29-Aug-2014) Dateisystem bei /dev/mmcblk0p2 ist auf / eingehängt; Online-Größenänderung ist erforderlich old_desc_blocks = 1, new_desc_blocks = 1 The filesystem on /dev/mmcblk0p2 is now 3773184 (4k) blocks long. #das wars nun kann die vollständige Kartengröße verwendet werden #die neue größe kann wieder überprüft werden #nachher: 15G pi@pi-desktop:~$ df -h Filesystem Size Used Avail Use% Mounted on /dev/root 15G 3,2G 11G 23% / devtmpfs 459M 0 459M 0% /dev tmpfs 463M 88K 463M 1% /dev/shm tmpfs 463M 6,8M 457M 2% /run tmpfs 5,0M 4,0K 5,0M 1% /run/lock tmpfs 463M 0 463M 0% /sys/fs/cgroup /dev/mmcblk0p1 64M 20M 45M 32% /boot tmpfs 93M 24K 93M 1% /run/user/1000
Zeile | Parameter | Effekt |
---|---|---|
23 | d | Lösche Partition |
24 | 2 | Partition 2 |
28 | n | Erzeuge neue Partition |
32 | p | Primäre Partition |
33 | 2 | Partition 2 |
34 | Enter | Beginn der neuen Partition |
35 | Enter | Ende der neuen Partition |
40 | w | Speichere Änderungen |