error: trying to remount - Huawei Mate 9 Questions & Answers

rooted stock here.
trying to remount /system /data with data=writeback flags
im trying:
busybox mount -o remount, data=writeback /system it doesnt parse the flag onto the partition when i check using mount | grep /system
if i try the same without busybox
i get " device or resource busy"
is there any way i can change the flags for my mounts on boot? since scripts and terminal returns these errors?

Related

Debian in Haykuro/Cupcake builds

Hello all,
I've been trying for some time now to get Debian to work on the Haykuro bulds, but I can't seem to get things to mount. Anybody have any ideas?
This is the script that is supposed to start it up:
=============SCRIPT START==============
clear
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
echo "Android Filesytem remounted as read/write"
export kit=/sdcard/debian
export bin=/system/xbin/bb
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox insmod ext2
mknod /dev/loop2 b 7 0
clear
mount -o loop,noatime $kit/debian.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
sleep 1
echo "Starting init process"
sleep 1
echo "INIT: Debian booting....."
sleep 1
echo "Running Linux Kernel"
sysctl -w net.ipv4.ip_forward=1
sleep 1
echo "AutoMounter started"
sleep 1
echo "Type EXIT to end session"
echo "Make sure you do a proper EXIT for a clean kill of Debian!"
echo " "
chroot $mnt /bin/bash
busybox umount -f /data/local/mnt/dev/pts /data/local/mnt/proc /data/local/mnt/sys /data/local/mnt
echo "Filesystems have unmounted"
sleep 3
busybox losetup -d /dev/block/loop2
===============END SCRIPT==================
This is the result I get when I run it:
===============RUN SCRIPT START=============
←[H←[JAndroid Filesytem remounted as read/write
insmod: /lib/modules/2.6.27-04102009-daproy: No such file or directory
insmod: /lib/modules: No such file or directory
insmod: ext2.ko: module not found
mknod: /dev/loop2: File exists
←[H←[J
mount: mounting /sdcard/debian/debian.img on /data/local/mnt failed: Block devic
e required
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or direct
ory
mount: mounting proc on /data/local/mnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory
Custom Linux Pseudo Bootstrapper V1.0 - by Mark Walker
WEB: http://www.androidfanatic.com
EML: [email protected]
Starting init process
INIT: Debian booting.....
Running Linux Kernel
net.ipv4.ip_forward = 1
AutoMounter started
Type EXIT to end session
Make sure you do a proper EXIT for a clean kill of Debian!
chroot: cannot execute /bin/bash: No such file or directory
umount: forced umount of /data/local/mnt/dev/pts failed!
umount: cannot umount /data/local/mnt/dev/pts: No such file or directory
umount: forced umount of /data/local/mnt/proc failed!
umount: cannot umount /data/local/mnt/proc: No such file or directory
umount: forced umount of /data/local/mnt/sys failed!
umount: cannot umount /data/local/mnt/sys: No such file or directory
umount: forced umount of /data/local/mnt failed!
umount: cannot umount /data/local/mnt: Invalid argument
Filesystems have unmounted
losetup: : No such file or directory
Loopback device shutdown - success
==============End===============
I was hoping someone could help me out with this. I would really appreciate it. I am running 5.0.1G (Haykuro's build). I have tried asking him, but neither of us have the knowledge of how to fix the problems.
Thanks.
Check the first lines in the script that begin with "export..." .
For example if your debian image is located like defined in "export kit..."
Or if the binary paths are all correct. I think the problem is that there is probably no /system/xbin within your image like in the JF image. So the script can't find the tools it needs.
EDIT//
You can probably ignore the above part....
The problem is that the script doesn't load the "ext2" filesystem kernelmodule which is needed to mount Debian.
But i don't know if the script only look at the wrong place or if the ext2.ko module isn't available within your image.
You can search for the module by typing the following into a terminal:
find / -name "ext2.ko"
check if /data/local/mnt exists, if not , mkdir /data/local/mnt.
xbin is there. There is no need for ext2.ko because it is built into the kernel already (asked haykuro himself). /data/local/mnt exists. The export statement is right, my debian image is in /sdcard/debian.img.
Any other ideas?
I am running haykuro's 4.5g build. The latest one.
damageless said:
..... is right, my debian image is in /sdcard/debian.img.
Click to expand...
Click to collapse
Mhm. But that would be wrong...
Has to be in /sdcard/debian/debian.img
So try to create debian subfolder.
Okay, my bad. It's in /sdcard/debian/debian.img.
Any ideas?
I will try to help with this in a few hours. I have the 5.0.2Hr2-appstosd-signed image on my phone, a 1.2 GB ext2 filesystem partition on my SD Card (only a Class-4, it's really dog slow for most apps!), and I am working on getting debian functional within /system/sd.
I don't like the idea of having 3 "different" filesystems on my SD card, so I wanted to utilize the ext2 partition I use for apps/cache for Debian also, this would ensure that I could leave it mounted all the time without worrying about Debian dying if I mount the FAT32 partition onto my computer.
Praeluceo said:
I will try to help with this in a few hours.
Click to expand...
Click to collapse
I would really appreciate that. I was thinking the same thing, but I don't know how to do it.
Well that got nowhere quick. Any other ideas?
modprobe ext2
ok i just tried that, that was the solution previously when running debian, yu had to load the ext2 module, but something must be missing in the new build as i get
cannot parse modules.dep
Got the same error
I receive the same error message. Found a solution at the bottom of the first post:
http://forum.xda-developers.com/showthread.php?t=507291&highlight=debian
download updated scripts
it seems to be ok for me
----------------------------------
In fact, i cannot achieve any apt-get.
Phone block before and i'm unable to do anything in terminal, neither shutingdown.
I've tried with "terminal emulator" on phone and with adb shell.
HTC Orange
1.5G
---------------------------------
new image from duke
-> ok

Mac Terminal system remount syntax

I have an Atrix on AT&T. Which means there's a bootloader encryption, and the carrier prevents non-market apk installations, which I have resolved since my phone is rooted and I have changed the boot animation already.
In order to do these things, I found Ghost Commander that would let me chmod my system directories...which is fine, but I feel kind of gimped that I can't do it on terminal.
Basically, what I want to be able to do is remount /system as rw using terminal.
This method doesn't work on both terminal and emulator on my phone. I have done:
Terminal:
Code:
sudo su
cd [sdk directory]
./adb devices
./adb shell
su
mount -o remount,rw -t ext3 /dev/block/mmcblk0p12 /system
and this is where I get stuck because I just get an Invalid argument error.
Here is some info about my sytem -
Usage: mount [-r] [-w] [-o options] [-t type] device directory
/dev/block/mmcblk0p12 /system ext3 ro,noatime,nodiratime, data=ordered 0 0
Been searching for the answers for a while now and tried all kinds of syntax, and now I'm here. What am I doing wrong? Thanks
Try:
mount -o remount,rw /system
The remount option automatically looks up the info for /system so you shouldn't have to bother with the details.
Hmm, I tried that thanks, and I still got 'Usage: mount [-r] [-w] [-o options] [-t type] device directory'
Hmm, I can't think of any reason that wouldn't work but it sounds like your phone is locked down pretty tight. Do you know if others have been able to remount /system?
What version of busybox do you have? Maybe you could try updating it. There are one or two free busybox updater apps on the market, if you can use them.
Have you tried just 'adb remount'?
Does the mount command require busybox? Do you have that properly installed?
That requires adbd itself to be run in root mode (this is different from being rooted on the phone) & you could do that only on insecure boot image. mount/unmount both happen to come from the busybox package. It would be hard to contemplate that Motorola actually changed that but nothing would stop them from. You could try updating the busybox utility onboard your phone. There is nothing with your usage of the command - it would work the same way on my Nexus S
I do have Busybox in /system/xbin. Thinking that maybe the xbin directory may need to have the rewrite permissions, I changed its permissions to 777 using the chmod command in phone Terminal. I did the remount command 'mount -o remount,rw -t ext3 /dev/block/mmcblk0p12 /system' in shell on the phone, and I THOUGHT I BRICKED! Haha, but it just turned off, and I rebooted to find that my button backlights were turned off...which I fixed with the brightness file.
Anyhow, I think I'll just use the chmod command because that seems to work. NeoA, I think you are right about the adbd to run in root mode, because I've seen discussions about that before.
Thanks for the feedback guys! At least I know I wasn't having syntax errors to say the least
So did it remount it as rw? The mount command was running before, just giving errors, but if it's running that should mean the permissions were ok.
try
Code:
busybox mount -o remount,rw /system
Fr4gg0r said:
try
busybox mount -o remount,rw /system
Click to expand...
Click to collapse
"mount: can't find /system/app in /proc/mounts"
but
Code:
busybox chmod 777 /system
is good enough for me, for now
marlasinger said:
Code:
busybox chmod 777 /system
is good enough for me, for now
Click to expand...
Click to collapse
Using chmod to change permissions won't actually give you rw access to the system partition since it won't change whether it's mounted as read-only or r/w. To be able to run the chmod command, the system must already have been mounted as r/w or you would have received a "Read-only file system" error. It must have gotten mounted as read/write when the remount command caused a reboot. You can see how /system is mounted by just typing "mount" in adb shell which will list all of the mounted partitions.

[Q] Question about how to mount a virtual disk

I have a rooted andriod phone v2.3.2.
Can I mount a virtual disk using something like 'mount -o loop ....' ?
I opened a terminal , then
# su
# cd /data
# install -d test_mnt
# mount -o loop -t vfat /mnt/sdcard/a_vfat.img /mnt/data/test_mnt
I got this error
ioctl LOOP_SET_FD failed: Device or resource busy
Does anyone have solution ?

How to mount cifs shares via Terminal on CM13?

Hi,
I am using CM13 with ElementalX and I wanna mount a Samba share on my local network. I wanna use this with Tasker in combination with EncFS, thats why I need a mountpoint in my filesystem.
I've already tried some combinations of "su --mount-master", "busybox" and "mount" commands, but all I can get is "Invalid Argument" or "Interrupted system call". Changing SELinux mode doesn't help either and Apps like CIFSManager or Mount Manager also don't work.
Here are the two error messages I get everytime. No matter if i change the mountpoint (e.g. to sdcard) or the SELinux mode.
Code:
su --mount-master -c "busybox mount -o username=USER,password=PASSWORD -t cifs //192.168.xxx.xxx/share /mnt/smb/nas
mount: mounting //192.168.xxx.xxx/share on /mnt/smb/nas failed: Invalid argument
as soon as I remove the password, the error is another one.
Code:
su --mount-master -c "busybox mount -o username=USER -t cifs //192.168.xxx.xxx/share /mnt/smb/nas
mount: mounting //192.168.xxx.xxx/share on /mnt/smb/nas failed: Interrupted system call
Did somebody manage to mount cifs shares on CM13 or Android 6 in general, using a Terminal command? If yes, whats the trick?
witti

FP4 /e/os remounting /system ends in I/O error

I am trying to edit my gps.conf because of some accuracy problems but before I can push the new one I need to make the system rw first. When I try to remount it I get the following errors:
FP4:/ # su
FP4:/ # mount -o remount,rw /system
mount: '/system' not in /proc/mounts
FP4:/ # mount -o rw,remount /
mount: '/dev/block/dm-8'->'/': I/O error
When I try just remount the following happens:
C:\platform-tools>adb remount
Skipping /system for remount
Skipping /system_ext for remount
Skipping /product for remount
Skipping /vendor for remount
Skipping /odm for remount
remount failed
disabling verity ends in the error "Device is locked. Please unlock the device first" - Even though that is not the case.
I read somewhere that this is bad news but I am unsure. I cant even install busybox apk because it fails to write to system.
I have never tried to touch the system partition before so I am unsure how I killed something, if that is actually the case.
Do you guys have any idea how to fix this? Thank you!

Categories

Resources