in twrp terminal how to mount system that after os installation i get not the error that…
- 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)
- 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
/systempartition 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)
/systemproperly 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
/systemand get "device busy" errors:umount /systemIf
umountsays "device busy", you can try:umount -l /system(
-lis "lazy unmount" – it detaches the filesystem when it's no longer busy.)
📌 5. Mount
/system(if needed during flashing)If you need to mount
/systemmanually:mount /systemOr 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
/systemif partitioning or formatting. - Mount
/systemif flashing ROMs or pushing files.
- Unmount
🚫 Common Error Explained:
❌ "Unable to update partition table because /system (Device or resource busy)"
This happens typically when:
/systemis mounted and you're trying to format it.- There's a background process (including logging or some scripts) keeping it active.
🧼 Optional: Format
/systemCleanlyIf you're installing a clean ROM and want to clear
/system:- Unmount
/system(via terminal or GUI). - 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
/systembefore formatting or updating. - ✅ Mount
/systemonly when writing files during flashing. - Use lazy unmount (
umount -l) ifumountfails.
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.
- User
moutn: no /proc/mounts
- Assistant
Ah, the error:
mount: no /proc/mountsmeans that
/procis not mounted, and so system commands likemount,umount, and others fail to work properly, because they rely on/procfor system information.This is especially common in TWRP terminal, because
/procmay 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/sysand/dev) like so:📌 Step-by-step:
-
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 -
(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_bin 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.
-
- User
mount: mounting sys on /sys failed: device or resource busy
- Assistant
Thanks for following up. The error:
mount: mounting sys on /sys failed: Device or resource busymeans that
/sysis 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
/systemor avoid 'device busy' errors).
✅ What You Need to Know:
/proc,/sys, and/devare 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 ^devIf 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
/systempartition 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
/systemMount Statusmount | grep systemIf it's mounted, you’ll see something like:
/dev/block/... on /system type ext4 ...2. ❌ Unmount
/systemIf mounted, unmount it like this:
umount /systemIf it says device busy, try:
umount -l /system(
-lis 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
/systempartition 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
/systemOnce
/systemis unmounted:- In TWRP:
- Go to Wipe > Advanced Wipe
- Check System
- Swipe to Wipe
💡 Summary
Task Solution /procnot foundmount -t proc proc /proc(only if not already mounted)/sysbusyAlready mounted — ignore Unmount /systemUse umountorumount -lor the GUIStill can't unmount Go 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.
- User
give me right command with -t option: pmbootstrap install --android-recovery-zip
- 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
mountcommand using the-toption — likely to manually mount partitions like/system,/data, etc., during recovery operations, especially in TWRP terminal after preparing the ZIP withpmbootstrap.
✅ Correct Syntax for
mountwith-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 /systemBut 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-nameLook for entries like:
system,system_a,system_b→ for/systemuserdata→ for/datavendor→ for/vendor
✅ Examples of Mount Commands You May Need:
Partition Command /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_bvendor_a/vendor_b
Make sure to mount the correct slot used by your device. You can check active slot with:
getprop ro.boot.slot_suffixIf it returns
_a, then usesystem_a:mount -t ext4 /dev/block/bootdevice/by-name/system_a /system
📦 After
pmbootstrap install --android-recovery-zipThis 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-zipFind 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.
- User
pmbootstrap: error: unrecognized arguments: -t
- Assistant
Ah, I see! You're trying to use the
-toption withpmbootstrap, but you're getting:pmbootstrap: error: unrecognized arguments: -tThat’s because
**pmbootstrap**does not support the-targument — it’s not a valid flag forpmbootstrap.
⚠️ 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-zipThe command:
pmbootstrap install --android-recovery-zipis the correct way to build a TWRP flashable zip file of postmarketOS.
There is no
-tflag forpmbootstrap.
✅ What This Command Does
When you run:
pmbootstrap install --android-recovery-zipIt:
- Builds the root filesystem image.
- Packs it into a
.zipfile. - Outputs it to:
~/pmbootstrap/output/ - You can flash the .zip in TWRP (e.g.,
Install > select zip > Swipe to flash).
✅ Answer Summary
-
pmbootstrapdoes not support-t(you likely confused it withmount -t) -
To generate a TWRP ZIP for flashing postmarketOS, just use:
pmbootstrap install --android-recovery-zip
🚀 Next Steps
Once the zip is generated:
- Copy the zip to your device:
adb push ~/pmbootstrap/output/postmarketOS-*.zip /sdcard/ - Boot into TWRP
- 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.
- User
but: Process did not write any output for 900 seconds. Killing it. NOTE: The timeout can be increased with 'pmbootstrap -t'.
- Assistant
Aha! Thank you for pointing that out — now it's clear what context
-tis expected in.You're seeing this message:
Process did not write any output for 900 seconds. Killing it.
NOTE: The timeout can be increased withpmbootstrap -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
-tinpmbootstrapIn this context,
-tis not a "filesystem type" like in themountcommand — instead, it's:✔️
-t, --timeout-outputAn option to change the inactivity timeout when waiting for a subprocess to generate output.
✅ Example: Increase Timeout to 1 hour
If a step like
installorinitfstakes too long, use:pmbootstrap -t 3600 install --android-recovery-zipThis 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)
pmbootstrapwaits for output from subprocesses, and if nothing is printed for900seconds (by default), it assumes it’s stuck.
📦 TL;DR Summary
Problem Solution 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!
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.