Changes

Jump to: navigation, search

Orange Pi Zero 2W

1,568 bytes added, 17:03, 25 September 2023
The first startup will automatically expand the capacity of the rootfs partition in the TF card.
<ol style="list-style-type: decimal;">
<li><p>After burning the Linux image of the development board into the TF card, you can check the usage of the TF card capacity on the '''<span style="color:#FF0000">Ubuntu computer</span>'''. The steps are as follows:</p>{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that failure to perform this step will not affect the automatic expansion of the Linux system of the development board. Here I just want to explain how to check the capacity of the TF card after burning the Linux image on the TF card.'''</p></big>|}
<ol style="list-style-type: lower-alpha;">
<li><p>First install the gparted software on your Ubuntu computer</p>
{| class="wikitable" style="width:800px;" |-| <p>test@test:~$ '''sudo apt install -y gparted'''</p>|}</li>
<li><p>Then open gparted</p>
{| class="wikitable" style="width:800px;" |-| <p>test@test:~$ '''sudo gparted'''</p>|}</li>
<li><p>After opening gparted, you can select the TF card in the upper &gt; right corner, and then you can see the usage of the TF card &gt; capacity.</p>
<p>[[File:zero2w-img86.png]]</p></li>
<li><p>The picture above shows the situation of the TF card after &gt; burning the Linux desktop system. It can be seen that although &gt; the total capacity of the TF card is 16GB (displayed as &gt; 14.84GiB in GParted), the rootfs partition (/dev/ sdc1) Only &gt; 4.05GiB is actually allocated, leaving 10.79GiB unallocated</p></li></ol>
</li>
<li><p>Then you can insert the TF card with the Linux system burned into the development board to start. When the TF card starts the Linux system for the first time, it will automatically call the '''orangepi-resize-filesystem''' script through the '''orangepi-resize-filesystem.service''' systemd service. Expansion of rootfs partition, '''<span style="color:#FF0000">so there is no need to manually expand it</span>'''</p></li><li><p>After logging in to the system, you can use the '''df -h''' command to check the size of rootfs. If it is consistent with the actual capacity of the TF card, it means that the automatic expansion is running correctly.</p></li>{| class="wikitable" style="width:800px;"|-|</olp> orangepi@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;">430M </span><span style="margin-right: 50px;">0 </span><span style="margin-right: 70px;">430M </span><span style="margin-right: 90px;">0% /dev</span><br> <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 50px;">100M </span><span style="margin-right: 30px;">5.6M </span><span style="margin-right: 70px;">95M </span><span style="margin-right: 90px;">6% /run</span><br> <span style="margin-right: 25px;color:#FF0000">'''/dev/mmcblk0p1 '''</span><span style="margin-right: 50px;color:#FF0000">'''15G '''</span><span style="margin-right: 35px;color:#FF0000">'''915M '''</span><span style="margin-right: 80px;color:#FF0000">'''14G '''</span><span style="margin-right: 90px;color:#FF0000">'''7% /'''</span><br> <span style="margin-right: 100px;">tmpfs </span><span style="margin-right: 60px;">500M </span><span style="margin-right: 50px;">0 </span><span style="margin-right: 50px;">500M </span><span style="margin-right: 90px;">0% /dev/shm</span><br>|}</ol>
<ol start="4" style="list-style-type: decimal;">
<li><p>After starting the Linux system for the first time, we can also remove the TF card from the development board and reinsert it into the '''<span style="color:#FF0000">Ubuntu computer</span>''', and then use gparted again to check the status of the TF card, as shown in the figure below, rootfs partition (/dev/ The capacity of sdc1) has been expanded to 14.69GiB</p><p>[[File:zero2w-img87.png]]</p></li></ol>
'''It should be noted that the Linux system has only one ext4 format partition and does not use a separate BOOT partition to store files such as kernel images, so there is no problem of BOOT partition expansion<p>[[File:zero2w-img87.'''png]]</p>
{| class="wikitable" style="background-color:#ffffdc;width:800px;"
|-
|
<big>'''It should be noted that the Linux system has only one ext4 format partition and does not use a separate BOOT partition to store files such as kernel images, so there is no problem of BOOT partition expansion.'''</big>
|}
</li></ol>
<span id="method-to-prohibit-automatic-expansion-of-rootfs-partition-capacity-in-tf-card"></span>
 
=== Method to prohibit automatic expansion of rootfs partition capacity in TF card ===

Navigation menu