Open main menu

Wiki-Orange Pi β

Changes

Orange Pi Zero 3

1,206 bytes added, 20:31, 10 July 2023
How to reduce the capacity of the rootfs partition in the TF card
=== How to reduce the capacity of the rootfs partition in the TF card ===
{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big>'''After configuring the application program or other development environment in the Linux system of the TF card, if you want to back up the Linux system in the TF card, you can use the method in this section to reduce the size of the rootfs partition first, and then start the backup.'''</big>|}
# First insert the TF card you want to operate in the '''<span style="color:#FF0000">Ubuntu computer</span>''' (Windows not available)
# Then install the gparted software on the Ubuntu computer
::{| class="wikitable" style="width:800px;"
|-
|
test@test:~$ '''sudo apt install -y gparted'''
|}
<ol start="3" style="list-style-type: decimal;">
<li>Then opengparted</li></ol>
{| class="wikitable" style="width:800px;"
|-
|
test@test:~$ '''sudo gparted'''
|}</ol>
<ol start="4" style="list-style-type: decimal;">
<li>After opening gparted, you can select the TF card in the upper right corner, and then you can see the usage of the TF card capacity</li></ol>
[[File:media/image102.png|575x217px]]
</ol>
<ol start="5" style="list-style-type: decimal;">
<li>Then select the rootfs partition (/dev/sdc1)</li></ol>
[[File:media/image103.png|575x217px]]
</ol>
<ol start="6" style="list-style-type: decimal;">
<li>Click the right mouse button again to see the operation options shown in the figure below. If the TF card has been mounted, first you need to Umount the rootfs partition of the TF card</li></ol>
[[File:media/image104.png|400x274px]]
</ol>
<ol start="7" style="list-style-type: decimal;">
<li>Then select the rootfs partition again, click the right mouse button, and select '''Resize/Move''' to start setting the size of the rootfs partition</li></ol>
[[File:media/image105.png|399x273px]]
</ol>
<ol start="8" style="list-style-type: decimal;">
<li>After the'''Resize/Move''' option is turned on, the following setting interface will pop up</li></ol>
[[File:media/image106.png|315x188px]]
</ol>
<ol start="9" style="list-style-type: decimal;">
<li>Then you can directly drag the location shown in the figure below to set the size of the capacity, or you can set the size of the rootfs partition by setting the number in '''New sieze(MiB)'''</li></ol>
[[File:media/image97.png|318x190px]]
</ol>
<ol start="10" style="list-style-type: decimal;">
<li>After setting the capacity, click'''Resize/Move''' in the lower right corner</li></ol>
[[File:media/image98.png|327x196px]]
</ol>
<ol start="11" style="list-style-type: decimal;">
<li>After confirming that it is correct, click the green button shown in the figure below'''√'''</li></ol>
[[File:media/image99.png|392x270px]]
</ol>
<ol start="12" style="list-style-type: decimal;">
<li>Then select '''Apply''', and the expansion of the rootfs partition will officially start</li></ol>
[[File:media/image100.png|365x106px]]
</ol>
<ol start="13" style="list-style-type: decimal;">
<li>After the expansion is completed, click '''Close''' to close</li></ol>
[[File:media/image101.png|379x164px]]
</ol>
<ol start="14" style="list-style-type: decimal;">
<li>Then you can pull out the TF card, insert it into the development board and start it up. After entering the Linux system of the development board, if you can use the '''df -h''' command to see that the size of the rootfs partition is the same as the size set before, it means that the size has been reduced. capacity success</li></ol>
{| class="wikitable" style="width:800px;"|-|<p>root@orangepi:~# '''df -h'''</p> <span style="margin-right: 80px;">Filesystem </span><span style="margin-right: 50px;">Size </span><span style="margin-right: 30px;">Used </span><span style="margin-right: 30px;">Avail </span><span style="margin-right: 50px;">Use% Mounted on</span><br> <span style="margin-right: 110px;">udev </span><span style="margin-right: 60px;">925M </span><span style="margin-right: 50px;">0 </span><span style="margin-right: 70px;">925M </span><span style="margin-right: 90px;">0% /dev</span><br> <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">199M </span><span style="margin-right: 30px;">3.2M </span><span style="margin-right: 70px;">196M </span><span style="margin-right: 90px;">2% /run</span><br> <span style="margin-right: 25px;color:#FF0000">'''/dev/mmcblk0p1 '''</span><span style="margin-right: 50px;color:#FF0000">'''7.7G '''</span><span style="margin-right: 35px;color:#FF0000">'''3.2G '''</span><span style="margin-right: 80px;color:#FF0000">'''4.4G '''</span><span style="margin-right: 90px;color:#FF0000">'''42% /'''</span><br>|}</ol><span id="network-connection-test"></span>
<span id="network-connection-test"></span>
== Network connection test ==