I'm running a MIUI 12.5.5 xiaomi.eu ROM on a rooted Redmi Note 9 Pro. I'm trying to format my 128GB micro SD Card via Settings > Storage > Format SD Card, but this causes the device to reboot. I suspect it's something to do with the ROM, so I'd like to format it via terminal or Termux if needed.

How should I proceed? Also, should I format it to exFAT or FAT32?

  • @meganukebmp is looking for testers on Partitioning SD card. sounds right on cue for you :)
    – alecxs
    Commented Jun 4, 2022 at 7:22

1 Answer 1


WARNING: for devices with UFS flash memory only

  • from MIUI

    mkfs.exfat /dev/block/mmcblk0p1
  • from TWRP

    mkexfatfs /dev/block/mmcblk0p1

(mmcblk1p1 for devices with eMMC flash memory)

  • 1
    On devices with eMMC, mmcblk0 is usually the internal storage. And mmcblk1 is the SD card. Better add warning in your answer. Also AFAI have seen, eMMC storage is enumerated as mmcblk[N], while UFS storage is enumerated as sd[N]. In the latter case the SD card is likely to be mmcblk0 which you've stated. Commented Jun 4, 2022 at 11:04
  • Is there a way to confirm what is the correct form for my device? Commented Jun 6, 2022 at 19:10
  • cat /proc/memory_type
    – alecxs
    Commented Jun 6, 2022 at 19:30
  • I don't seem to have a /proc/memory_type file, nor anything resembling it in /proc. However, cat /proc/partitions displays, among others, mmcblk0 and mmcblk0p1. Is that enough to be sure I won't format my internal storage accidentally? Commented Jun 6, 2022 at 23:03
  • 1
    assuming with both you mean mmcblk0 and mmcblk0p1: mmcblk0 is the disk, mmcblk0p1 is the first partition on that disk. you should also see block size (KiB)
    – alecxs
    Commented Jun 8, 2022 at 8:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .