Skip to content
TheChatArchiveThe Chat Archive
chatgpt-4o-latest-20250326· OpenAIHugging Face LMArena Human Preference 140K

in twrp terminal how to mount system that after os installation i get not the error that…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with o3-2025-04-16’s answer.
  1. User

    in twrp terminal how to mount system that after os installation i get not the error that unable to update partition tabel because /system (device busy)

  2. Assistant

    When using TWRP (Team Win Recovery Project) and encountering the error:

    Unable to update partition table because /system (Device or resource busy)
    

    This usually means that the /system partition is already mounted, and something is keeping it busy/locked. If you're preparing to install a ROM or modify /system, you need to ensure it's unmounted before certain actions (like formatting or updating the partition table), or mounted properly if you're writing files to it.


    🔧 Goal:

    You want to mount (or unmount) /system properly in TWRP terminal so that no "device busy" errors occur during OS installation or partition table edits.


    ✅ Step-by-step Instructions:

    📌 1. Boot into TWRP Recovery

    • Power off your device.
    • Boot into recovery with the correct key combo (usually Power + Volume Up or Down).

    📌 2. Open TWRP Terminal

    In TWRP:

    • Go to Advanced > Terminal.

    📌 3. Check Mount Status

    Run in the terminal:

    mount | grep system
    
    • If you see something like /dev/block/... on /system – that means it's mounted.

    📌 4. Unmount /system (if needed)

    If you’re trying to format or manipulate /system and get "device busy" errors:

    umount /system
    

    If umount says "device busy", you can try:

    umount -l /system
    

    (-l is "lazy unmount" – it detaches the filesystem when it's no longer busy.)


    📌 5. Mount /system (if needed during flashing)

    If you need to mount /system manually:

    mount /system
    

    Or specify the device and mount point manually:

    mount -t ext4 /dev/block/bootdevice/by-name/system /system
    

    ⚠️ Your actual block device may differ – use ls /dev/block/bootdevice/by-name/ to find the correct one for your device.


    📌 6. Alternative: Use the TWRP GUI

    • Go to Mount in TWRP.
    • Manually check or uncheck System depending on what you need:
      • Unmount /system if partitioning or formatting.
      • Mount /system if flashing ROMs or pushing files.

    🚫 Common Error Explained:

    ❌ "Unable to update partition table because /system (Device or resource busy)"

    This happens typically when:

    • /system is mounted and you're trying to format it.
    • There's a background process (including logging or some scripts) keeping it active.

    🧼 Optional: Format /system Cleanly

    If you're installing a clean ROM and want to clear /system:

    1. Unmount /system (via terminal or GUI).
    2. Then go to Wipe > Advanced Wipe > check only System > Swipe to Wipe.

    ✅ Summary

    To avoid the "device busy" error during partitioning or system installation:

    • ❗ Unmount /system before formatting or updating.
    • ✅ Mount /system only when writing files during flashing.
    • Use lazy unmount (umount -l) if umount fails.

    If you're still stuck, let me know your device model and TWRP version and I’ll give you exact mount commands for your storage layout.

  3. User

    moutn: no /proc/mounts

  4. Assistant

    Ah, the error:

    mount: no /proc/mounts
    

    means that /proc is not mounted, and so system commands like mount, umount, and others fail to work properly, because they rely on /proc for system information.

    This is especially common in TWRP terminal, because /proc may not be mounted in the minimal environment.


    ✅ Solution: Manually Mount /proc

    Before doing anything like mounting or unmounting system partitions in TWRP's terminal, you should mount /proc (and optionally /sys and /dev) like so:

    📌 Step-by-step:

    1. Mount basic virtual filesystems: Run these commands in TWRP’s terminal one by one:

      mount -t proc proc /proc
      mount -t sysfs sys /sys
      mount -t devtmpfs dev /dev
      
    2. (Optional but recommended): Also mount /dev/pts (used by pseudo terminals):

      mkdir -p /dev/pts
      mount -t devpts devpts /dev/pts
      

    ✅ After that, try checking or mounting partitions again

    • Now retry this to check mount status:

      mount | grep system
      
    • Or try unmounting:

      umount /system
      
    • Or manually mounting, if you're ready:

      mount -t ext4 /dev/block/bootdevice/by-name/system /system
      

    📌 To list your partition block names:

    ls /dev/block/bootdevice/by-name/
    

    Use the correct name for your device's system partition (it might be system_a, system_b in A/B devices).


    🧼 Final Tip: Use GUI When Possible

    If the terminal becomes annoying, you can always go to the GUI Mount menu in TWRP, and just tick or untick "System" to mount/unmount safely.


    Let me know your device model if you want precise block path examples.

  5. User

    mount: mounting sys on /sys failed: device or resource busy

  6. Assistant

    Thanks for following up. The error:

    mount: mounting sys on /sys failed: Device or resource busy
    

    means that /sys is already mounted, or in some cases, the directory is in use and cannot be remounted in the current TWRP session.

    But don't worry — this is not a fatal error. It's typically safe to ignore for what you're trying to do (e.g., manage /system or avoid 'device busy' errors).


    ✅ What You Need to Know:

    • /proc, /sys, and /dev are virtual filesystems needed by many tools.
    • If they're already mounted, trying to mount them again will give a "device busy" error.
    • You can check if they're mounted before trying to mount them.

    ✅ Safe Way to Check (And Avoid Errors):

    Run this before trying to mount anything:

    mount | grep ^proc
    mount | grep ^sys
    mount | grep ^dev
    

    If you see entries like:

    proc on /proc ...
    sysfs on /sys ...
    devtmpfs on /dev ...
    

    That means they're already mounted ✅ and there's no need to mount them again.


    ✅ Your Original Goal Revisited

    You want to work on the /system partition but want to avoid this error:

    ❌ "unable to update partition table because /system (device busy)"

    So to recap:


    🔧 Final Step-by-Step (Revised)

    1. ✅ Check /system Mount Status

    mount | grep system
    

    If it's mounted, you’ll see something like:

    /dev/block/... on /system type ext4 ...
    

    2. ❌ Unmount /system

    If mounted, unmount it like this:

    umount /system
    

    If it says device busy, try:

    umount -l /system
    

    (-l is lazy unmount — it will unmount as soon as not in use.)

    3. ❌ Error still? Stop Using the Partition in GUI

    Sometimes, the TWRP GUI itself has the /system partition mounted.

    • Go to TWRP > Mount
    • ✖ Uncheck "System"
      (This will unmount it)

    Then go back to terminal or Wipe menu and try again.


    ✅ If You Want to Format /system

    Once /system is unmounted:

    • In TWRP:
      • Go to Wipe > Advanced Wipe
      • Check System
      • Swipe to Wipe

    💡 Summary

    TaskSolution
    /proc not foundmount -t proc proc /proc (only if not already mounted)
    /sys busyAlready mounted — ignore
    Unmount /systemUse umount or umount -l or the GUI
    Still can't unmountGo to Mount menu in TWRP GUI and uncheck "System"

    Let me know your device model and TWRP version if this continues — device-specific partitions vary and I can give precise help.

  7. User

    give me right command with -t option: pmbootstrap install --android-recovery-zip

  8. Assistant

    If you're using pmbootstrap install --android-recovery-zip, you're likely building a postmarketOS system that will be flashed via a custom recovery like TWRP, using an update zip file.

    You mentioned needing the correct mount command using the -t option — likely to manually mount partitions like /system, /data, etc., during recovery operations, especially in TWRP terminal after preparing the ZIP with pmbootstrap.


    ✅ Correct Syntax for mount with -t

    🔧 Basic Format:

    mount -t <filesystem_type> <device_block_path> <mount_point>
    

    In TWRP, it's likely ext4, so:

    mount -t ext4 /dev/block/bootdevice/by-name/system /system
    

    But you need to adjust <device_block_path> for your actual device. Read on.


    🔍 Finding the Correct Partition

    Before mounting, find the correct block device name:

    ls /dev/block/bootdevice/by-name
    

    Look for entries like:

    • system, system_a, system_b → for /system
    • userdata → for /data
    • vendor → for /vendor

    ✅ Examples of Mount Commands You May Need:

    PartitionCommand
    /systemmount -t ext4 /dev/block/bootdevice/by-name/system /system
    /datamount -t ext4 /dev/block/bootdevice/by-name/userdata /data
    /vendormount -t ext4 /dev/block/bootdevice/by-name/vendor /vendor

    ⚠️ A/B Partition Devices

    Devices with A/B slots (seamless update) have partitions like:

    • system_a / system_b
    • vendor_a / vendor_b

    Make sure to mount the correct slot used by your device. You can check active slot with:

    getprop ro.boot.slot_suffix
    

    If it returns _a, then use system_a:

    mount -t ext4 /dev/block/bootdevice/by-name/system_a /system
    

    📦 After pmbootstrap install --android-recovery-zip

    This command creates:

    • A flashable ZIP (usually named something like postmarketOS-*.zip)
    • You flash it via TWRP → Install → ZIP
    • During this process, TWRP will automatically mount necessary partitions

    ✅ Only Manually Mount if:

    • Flash fails or
    • You’re manually pushing files via adb push, or
    • Debugging

    🐧 Extra Tip: pmbootstrap Output Folder

    After running:

    pmbootstrap install --android-recovery-zip
    

    Find the ZIP file in:

    ~/pmbootstrap/output/
    

    Transfer to device and flash via TWRP GUI.


    ✅ Sample Session in TWRP Terminal:

    # Mount basic filesystems (if needed)
    mount -t proc proc /proc
    mount -t sysfs sys /sys
    mount -t devtmpfs dev /dev
    
    # Mount /system for inspection
    mount -t ext4 /dev/block/bootdevice/by-name/system /system
    
    # OR for A/B device
    mount -t ext4 /dev/block/bootdevice/by-name/system_a /system
    

    Let Me Know:

    If you're unsure about:

    • Your device partition layout
    • Whether it's A/B
    • Exact block device names

    Drop your device name and I can give you exact mount commands.

  9. User

    pmbootstrap: error: unrecognized arguments: -t

  10. Assistant

    Ah, I see! You're trying to use the -t option with pmbootstrap, but you're getting:

    pmbootstrap: error: unrecognized arguments: -t
    

    That’s because **pmbootstrap** does not support the -t argument — it’s not a valid flag for pmbootstrap.


    ⚠️ Clarification

    You're confusing:

    • mount -t → Unix command-line (-t = type of filesystem, e.g., ext4)
    • pmbootstrap → Python-based tool for building postmarketOS — uses long commands, not short flags like -t

    ✅ Correct Use of pmbootstrap install --android-recovery-zip

    The command:

    pmbootstrap install --android-recovery-zip
    

    is the correct way to build a TWRP flashable zip file of postmarketOS.

    There is no -t flag for pmbootstrap.


    ✅ What This Command Does

    When you run:

    pmbootstrap install --android-recovery-zip
    

    It:

    1. Builds the root filesystem image.
    2. Packs it into a .zip file.
    3. Outputs it to:
      ~/pmbootstrap/output/
      
    4. You can flash the .zip in TWRP (e.g., Install > select zip > Swipe to flash).

    ✅ Answer Summary

    • pmbootstrap does not support -t (you likely confused it with mount -t)

    • To generate a TWRP ZIP for flashing postmarketOS, just use:

      pmbootstrap install --android-recovery-zip
      

    🚀 Next Steps

    Once the zip is generated:

    1. Copy the zip to your device:
      adb push ~/pmbootstrap/output/postmarketOS-*.zip /sdcard/
      
    2. Boot into TWRP
    3. Flash the zip: Install > select the zip > Swipe to flash

    If your ZIP fails with errors during flashing or mounting in TWRP, I can help debug those too — just show me the log or message.


    Let me know:

    • Your device model
    • Whether you're building edge, testing, or stable
    • Your goal (dual boot? full postmarketOS install?)

    And I’ll make sure you’re on the right track.

  11. User

    but: Process did not write any output for 900 seconds. Killing it. NOTE: The timeout can be increased with 'pmbootstrap -t'.

  12. Assistant

    Aha! Thank you for pointing that out — now it's clear what context -t is expected in.

    You're seeing this message:

    Process did not write any output for 900 seconds. Killing it.
    NOTE: The timeout can be increased with pmbootstrap -t.

    This happens when a build process (like building the rootfs or kernel) takes too long and appears "frozen" to pmbootstrap, so it’s killed after 15 minutes (900 seconds) of inactivity.


    ✅ The Real Meaning of -t in pmbootstrap

    In this context, -t is not a "filesystem type" like in the mount command — instead, it's:

    ✔️ -t, --timeout-output

    An option to change the inactivity timeout when waiting for a subprocess to generate output.


    ✅ Example: Increase Timeout to 1 hour

    If a step like install or initfs takes too long, use:

    pmbootstrap -t 3600 install --android-recovery-zip
    

    This sets the timeout to 3600 seconds (1 hour) instead of the default 900.


    💡 Why Does This Happen?

    Some stages in the build process (like creating the initramfs or rootfs) can take a long time — especially on:

    • 🔄 Slow machines
    • 🧠 Low RAM or CPU
    • 🌐 Slow network (for package fetching)
    • 🧱 First builds (cold cache)

    pmbootstrap waits for output from subprocesses, and if nothing is printed for 900 seconds (by default), it assumes it’s stuck.


    📦 TL;DR Summary

    ProblemSolution
    Process did not write any output for 900 seconds.Increase timeout
    NOTE: The timeout can be increased with 'pmbootstrap -t'Use -t <seconds>

    ✅ Fix Command

    pmbootstrap -t 3600 install --android-recovery-zip
    

    Let me know if you're hitting this during a specific step (e.g., install, initfs, apk add), and I can help optimize or debug it!

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.