User Manual Orange Pi Zero 3

  Features   |  Use   |    Linux     |  Linux SDK   |  Android   |  Android SRC   |

RU          EN  

Chapt 3. Instructions for use of Debian/Ubuntu Server and Xfce desktop system
Страница:   25    26    27    28    29    30    31    32    33    34    35    36    37    38    39    40    41    42    43    44    45    46    47    48    49    50    51    52    53    54    55    56    57    58    59    60    61    62    63    64    65    66    67    68    69    70    71    72    73    74    75    76    77    78    79    80    81    82    83    84    85    86    87    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122  


3.6.3. The method of manually expanding the capacity of the rootfs partition in the TF card
partition in the TF card If the total capacity of the TF card is large, such as 128GB, you do not want the rootfs partition of the Linux system to use all the capacity of the TF card, but only want to allocate a part of the capacity, such as 16GB, to the Linux system, and then the remaining capacity of the TF card can be used for other use. Then you can use the content introduced in this section to manually expand the capacity of the rootfs partition in TF.

  • 1) First burn the linux image of the development board to the TF card on the Ubuntu computer (Windows not available), and then re-plug and insert the TF card

  • 2) Then the Ubuntu computer will automatically mount the partition of the TF card. If the automatic mounting is normal, use the ls command to see the following output

    test@test:~$ ls /media/test/opi_root/
    bin
    sbin
    boot dev etc home lib lost+found media
    selinux srv sys tmp usr var
    mnt
    opt
    proc root run

  • 3) Then switch the current user to the root user on the Ubuntu computer

    test@test:~$ sudo -i
    [sudo] test
    root@test:~#

  • 4) Then enter the root directory of the linux system in the TF card and create a new file named . no_rootfs_resize

    root@test:~# cd /media/test/opi_root/ root@test:/media/test/opi_root/# cd root root@test:/media/test/opi_root/root# touch .no_rootfs_resize root@test:/media/test/opi_root/root# ls .no_rootfs* .no_rootfs_resize

  • 5) Then install the gparted software on the Ubuntu computer

    test@test:~$ sudo apt install -y gparted

  • 6) Then open gparted

    test@test:~$ sudo gparted

  • 7) 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. The figure below shows the situation of the TF card after burning the Linux desktop version system. It can be seen that although the total capacity of the TF card is 16GB (displayed as 14.84GiB in GParted), the rootfs partition (/dev/sdc1) Only 4.05GiB were actually allocated, leaving 10.79GiB unallocated


    Img 3.14

  • 8) Then select the rootfs partition (/dev/sdc1)


    Img 3.15

  • 9) 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


    Img 3.16

  • 10) Then select the rootfs partition again, click the right mouse button, and select Resize/Move to start expanding the size of the rootfs partition


    Img 3.17

  • 11) After the Resize/Move option is turned on, the following setting interface will pop up


    Img 3.18

  • 12) 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)


    Img 3.19

  • 13) After setting the capacity, click Resize/Move in the lower right corner


    Img 3.20

  • 14) After confirming that it is correct, click the green button shown in the figure below


    Img 3.21

  • 15) Then selectApply, It will officially start to expand the capacity of the rootfs partition


    Img 3.22

  • 16) After the expansion is completed, click Close to close


    Img 3.23

  • 17) 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 see that the size of the rootfs partition is the same as the size set before, it means manual Expansion succeeded

    root@orangepi:~# df -h

    Filesystem Size Used Avail Use% Mounted on udev 925M 0 925M 0% /dev tmpfs 199M 3.2M 196M 2% /run /dev/mmcblk0p1 7.7G 3.2G 4.4G 42% /


     <         > 


  • Страница:   25    26    27    28    29    30    31    32    33    34    35    36    37    38    39    40    41    42    43    44    45    46    47    48    49    50    51    52    53    54    55    56    57    58    59    60    61    62    63    64    65    66    67    68    69    70    71    72    73    74    75    76    77    78    79    80    81    82    83    84    85    86    87    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122