UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How to resize root directory on Redmi Note7

    Scheduled Pinned Locked Moved Xiaomi Redmi Note 7
    5 Posts 3 Posters 400 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • Z Offline
        zhaiker
        last edited by zhaiker

        I used the obsolete Redmi Note7 to change the DC direct power supply, and used OTG to build a home Nas but the root directory space is not enough after installing the admin panel, how can I expand the root directory space?
        alt text1.png

        1 Reply Last reply Reply Quote 0
        • O Offline
          OtaDr
          last edited by

          From what did you install ?
          directly https://ubuntu.com/download/server/arm ?

          if so, then when installing Ubuntu in the step of selecting the disc you can set ( change ) the size of /

          Z 1 Reply Last reply Reply Quote 0
          • Z Offline
            zhaiker @OtaDr
            last edited by

            @OtaDr Installation of Ubuntu Touch via Termina微信图片_20240322222346.jpg l

            1 Reply Last reply Reply Quote 0
            • O Offline
              OtaDr
              last edited by

              I'm just guessing can you run the installation like on a PC or is it fully automatic?

              1 Reply Last reply Reply Quote 0
              • G Offline
                gucong
                last edited by

                我也用redmi note 7,我将system分区扩展到了12G。

                #* 把Ubuntu Touch的parted存到电脑上
                $ adb shell which parted
                /usr/sbin/parted
                $ adb pull /usr/sbin/parted ./

                #* 手机重启到recovery,比如TWRP或OrangeFox
                $ adb reboot recovery

                #* 稍等片刻,等待手机进入recovery,

                #* 将电脑上存的parted传入recovery
                $ adb push ./parted /sbin

                #* 进入 adb shall,启动parted
                $ adb shell
                $ chmod 755 /sbin/parted
                $ sudo parted /dev/mmcblk0

                #* 默认单位改成B
                (parted) unit B

                #* 查看目前分区状况
                (parted) print

                #* 将system分区及其以后的分区信息妥善保存,比如这样:
                #* 63 1140850688B 13958643711B 12817793024B ext4 system
                #* 64 13958643712B 16106127359B 2147483648B ext2 vendor
                #* 65 16106127360B 17179869183B 1073741824B ext4 cust
                #* 66 17179869184B 62491773951B 45311904768B ext4 userdata

                #* 删除vendor分区
                (parted) rm 64
                #* 删除cust分区
                (parted) rm 65
                #* 删除userdata分区
                (parted) rm 66

                #* 查看目前分区状况
                (parted) print

                #* 将system分区的结尾位置改成13GiB,
                (parted) resizepart 63 13GiB
                (parted) print

                #* 重建vendor分区,位置为13GiB~15GiB
                (parted) mkpart vendor ext2 13GiB 15GiB
                (parted) print

                #* 重建cust分区,位置为15GiB~16GiB
                (parted) mkpart cust ext4 15GiB 16GiB
                (parted) print

                #* 重建userdata分区,位置为16GiB~以前的结尾位置
                (parted) mkpart userdata ext4 16GiB 45311904768B
                (parted) print

                退出
                (parted) quit

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post