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.2. The method of prohibiting automatic expansion of the capacity of the rootfs partition in the TF card

  • 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 you can uninstall the TF card, and then pull out the TF card and insert it into the development board to start. When the linux system starts, when the file.no_rootfs_resize is detected in the /root directory, the rootfs will not be automatically expanded.

  • 6) After entering the Linux system after prohibiting automatic expansion of rootfs, you can see that the total capacity of the rootfs partition is only 4GB (the image of the desktop version is tested here), which is much smaller than the actual capacity of the TF card, indicating that the automatic expansion of rootfs is prohibited.

    orangepi@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 4.0G 3.2G 686M 83% /

  • 7) If you need to re-expand the capacity of the rootfs partition in the TF card, just execute the following command, and then restart the Linux system of the development board.

    Note, please execute the following commands under the root user.

    After restarting, enter the Linux system of the development board again, and you can see that the rootfs partition has been expanded to the actual capacity of the TF card

    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 15G 3.2G 12G 23% /


     <         > 


  • Страница:   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