[Q] [Android] mount system.ext2 inside Android - HD2 Windows Mobile 6.5 Q&A, Help & Troubleshooting

hi,
how can i mount system.ext2 file inside an android rom...
i'm not booting from this system.ext2 file!
Code:
# mount -t ext2 -o loop /sdcard/futureshock.miui.german/system.ext2 /mount/system
mount -t ext2 -o loop /sdcard/futureshock.miui.german/system.ext2 /mount/system
ioctl LOOP_SET_FD failed: Device or resource busy
i'm just getting this error...
thx for help

Hello
Have you find anti solutions ?
Thanks

futureshock said:
hi,
how can i mount system.ext2 file inside an android rom...
i'm not booting from this system.ext2 file!
Code:
# mount -t ext2 -o loop /sdcard/futureshock.miui.german/system.ext2 /mount/system
mount -t ext2 -o loop /sdcard/futureshock.miui.german/system.ext2 /mount/system
ioctl LOOP_SET_FD failed: Device or resource busy
i'm just getting this error...
thx for help
Click to expand...
Click to collapse
This system from castes an insertion ohm ?

You need to ask something like this in the Android section not Windows.

Related

[Q] SDCard Script

Can someone post the script that mount sdcard at boot?
I created a kernel but it doesn't mount sdcard at boot, it's possibile to create the script in system/etc/init.d that mount sdcard at boot?
Try busybox mount while booted to see if it's possible to mount SD Card with a script. SD card mounts automatically if it's FAT32 and it takes a little vold.fstab configuration for other file systems. You should check franco's or LG's kernel to see how to automount sd card from kernel.
This is taken from CM7, put it in init.d and see.
Turducken said:
This is taken from CM7, put it in init.d and see.
Click to expand...
Click to collapse
Thank you very much but what's that?
# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $e2fsk_exitcode;
if [ "$e2fsk_exitcode" -lt 2 ];
then
# mount and set perms
$BB mount -o noatime,nodiratime,barrier=1 -t ext3 $SD_EXT_PART $SD_EXT_DIRECTORY;
if [ "$?" = 0 ];
then
$BB chown 1000:1000 $SD_EXT_DIRECTORY;
$BB chmod 771 $SD_EXT_DIRECTORY;
log -p i -t mountsd "$SD_EXT_DIRECTORY successfully mounted";
else
log -p e -t mountsd "Unable to mount filesystem for $SD_EXT_DIRECTORY!";
fi
else
log -p e -t mountsd "Unable to repair filesystem, disabling apps2sd";
fi
Click to expand...
Click to collapse
EDIT: Mount This script sdcard?
#!/system/bin/sh
mount -o remount,ro -t yaffs2 /dev/block/mmcblk0
Click to expand...
Click to collapse
RE-EDIT: The CM7 script doesn't works, in the second reboot the sd wasn't mount
The CM7 script mounts a2sd apps (apps2sd script). The second one should be like
Code:
mount -o remount,r[b]w[/b] -t [b]fat32[/b] /dev/block/mmcblk0
. As I already said, it's probably a kernel problem, vold mounts sdcards automatically.
Cricco said:
Thank you very much but what's that?
Click to expand...
Click to collapse
That part of the script mounts an ext partition if one exists.
RE-EDIT: The CM7 script doesn't works, in the second reboot the sd wasn't mount
Click to expand...
Click to collapse
As Ianis G. Vasilev said there are various ways to mount the SD card but I suspect the issue is with the kernel you've compiled. Flash francos, if it mounts then your kernel is bad. Run logcat to see what's going on.
**EDIT**
I didn't see Ianis post before I began mine...
so with
mount -o remount,rw -t fat32 /dev/block/mmcblk0
Click to expand...
Click to collapse
the sd will be mount?
EDIT: I need a script that mount sd without write or read permission, infact if i use root explorer and I go to sdcard sometimes the sdcard folder is blank, so the sd didn't mount
Read permissions are needed to see what's on the sd card. For a read-only mount replace rw with ro:
Code:
mount -o remount,r[b]o[/b] -t fat32 /dev/block/mmcblk0
I would advice you to use dmesg(should be enabled in kernel) to see if your phone detects the card and logcat to see if any errors are preventing your card from mounting.
Now i create script
#!/system/bin/sh
mount -o remount,rw -t fat32 /dev/block/mmcblk0
mount -t vfat -o /dev/block/mmcblk0
Click to expand...
Click to collapse
is it correct?

[Q] Mount Problem

Hello everyone.
So I've rooted my alcatel one touch 890d(running android 2.2.2 with kernel 2.6.32.9).
After that i installed a terminal emulator and busybox.
I've managed to get the sdk and connect to device using the adb shell.
I was thinking about having a decent linux emulated OS with chroot, after finding tons of broken links and some scripts for it (automatic installation of ubuntu/debian) and found out that to mount and ext2 img file, created using:
dd if=/dev/zero of=1.img bs=1MB count=0 seek=5
mke2fs 1.img
I will need to do the following(modified by me and yes, as root, and there is a directory /mnt/sdcard and the file downloaded to /mnt/sdcard/download/1.img):
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1 /mnt/sdcard/download/1.img
mount -t ext2 /dev/block/loop1 /mnt/sdcard/tmp
But when i use last command i get:
mount: no such device.
But when i try
mount -t yaffs2 /dev/block/loop1 /mnt/sdcard/tmp
the error is different:
mount: invalid argument
So my question, why doesn't it work ?
Thanks in advance.

[Q] [SOLVED] Is there kernel loop support for our device ?

Hi,
As the title says, Is there Kernel loop support for our LG Optimus L9 ?
I'm trying to mount a loop file created on debian on the device, but I get the error
ioctl LOOP_SET_FD failed: Device or resource busy
Click to expand...
Click to collapse
.
This is what I did --
Loop file created on debian and formatted with ext4.
On Optimus L9 with CM10.1, in terminal emulator,
$su
#losetup /dev/block/loop0 /storage/sdcar1/file
#mount -o remount,rw /system
#mkdir /system/temp
#mount -rw -o loop -t ext4 /dev/block/loop0 /system/temp/
ioctl LOOP_SET_FD failed: Device or resource busy
#
Click to expand...
Click to collapse
Is our kernel having loop support. If yes, am I doing anything wrong? The file gets successfully mounted in Debian.
EDIT:
using "busybox mount" solved the issue.
Tried adding busybox to the mount command and voila it worked.
#busybox mount -rw -o loop -t ext4 /dev/block/loop0 /system/temp/
Click to expand...
Click to collapse
You just taught me something new, thanks.
Can you upload your img, I would really like to check this out, or can you direct me to a thread so I can learn some more.
Sent from my LGMS769 using xda app-developers app
kuma82 said:
You just taught me something new, thanks.
Can you upload your img, I would really like to check this out, or can you direct me to a thread so I can learn some more.
Sent from my LGMS769 using xda app-developers app
Click to expand...
Click to collapse
The one I created is over 100MB. I had a html tutorial containing 12,000 files. I don't want to put those files on sdcard and mess it up. So, I used this block device.
I have created a sample "temp.img" file with a size of 500KB. It contains a single text file. I'm attaching it and you can check it out.
Below is the way i created and mounted it.
Code:
# "temp.img" md5 b97642fed817fa3f1a0cc6dc64b6c40d
# remount rootfs rw.
mount -o remount,rw /
# create mount point.
mkdir /mnt/temp
# chmod mountpoint.
chmod 777 /mnt/temp
# create block file.
dd if=/dev/zero of=/storage/sdcard0/temp.img bs=1024 count=500
# this creates 500 KB file. I can't seem
# to get bs=1M argument working on android.
# so bs1024 x count = target file size (=count times in KB).
# query free loop device. (will be /dev/block/loopx)
losetup -f
#attach block file with free loop.
losetup /dev/block/loop0 /storage/sdcard0/temp.img
#create file system.
mke2fs -T ext2 /dev/block/loop0
# And finally mount it
busybox mount -o loop -t ext2 -rw /dev/block/loop0 /mnt/temp
# For unmounting
busybox umount /mnt/temp
And it isn't encrypted. I don't need encryption, and i can't even seem to figure out how to encrypt it.

unable to mount img in RN3 for chrooted Linux

I am trying to install Debian in a chroot on RN3 (snapdragon) . Current ROM is V8.1.1.0.MHOMIDI (MIUI8) .
I followed this guide and created ext4 img file. But on mouting it returns error.
Code:
mount -o loop ,noatime -t ext4 /sdcard/debian.img /mnt/linux
It returns ""ioctl LOOP_SET_FD failed: Device or resource busy"
Plz guide me How to mount img file.

mount error in android recovery

Hi,
I am trying to mount ext4 image in android recovery using below command,
#mount -o loop -t ext4 /mnt/test.img /sdcard/
i am getting the following error,
mount: losetup failed 1
Can someone help me to understand what is wrong with this approach?
Regards,
Abdul

Categories

Resources