UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. gucong
    G
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 3
    • Groups 0

    gucong

    @gucong

    1
    Reputation
    3
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    gucong Unfollow Follow

    Best posts made by gucong

    • RE: fstab getting overwritten?

      @crackulator
      I worked for the same purpose for several days, and finally I succeeded.
      In the <boot partition>/ramdisk/scripts/halium, you can find this:

      echo "/dev/root / rootfs defaults,ro 0 0" >>$FSTAB
      

      That's where fstab is being rewritten.

      See github:
      https://github.com/Halium/initramfs-tools-halium/blob/halium/scripts/halium#L315

      https://github.com/Halium/initramfs-tools-halium/blob/e6a91ad5dbd62521629ecd6f90d93c10884dc846/scripts/halium#L315

      posted in Support
      G
      gucong

    Latest posts made by gucong

    • RE: How to resize root directory on Redmi Note7

      我也用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

      posted in Xiaomi Redmi Note 7
      G
      gucong
    • RE: fstab getting overwritten?

      @kuzmi4 yes, I did it. ↑ See my previous post. ↑

      posted in Support
      G
      gucong
    • RE: fstab getting overwritten?

      @crackulator
      I worked for the same purpose for several days, and finally I succeeded.
      In the <boot partition>/ramdisk/scripts/halium, you can find this:

      echo "/dev/root / rootfs defaults,ro 0 0" >>$FSTAB
      

      That's where fstab is being rewritten.

      See github:
      https://github.com/Halium/initramfs-tools-halium/blob/halium/scripts/halium#L315

      https://github.com/Halium/initramfs-tools-halium/blob/e6a91ad5dbd62521629ecd6f90d93c10884dc846/scripts/halium#L315

      posted in Support
      G
      gucong