[PRJ] apps2sd discussion

$ busybox fsck -t ext2 /dev/block/vold/179:2
busybox fsck -t ext2 /dev/block/vold/179:2
fsck (busybox 1.17.2, 2010-09-05 03:37:08 CDT)
fsck: can't read '/etc/fstab': No such file or directory
fsck: fsck.ext2: No such file or directory
$
 
You could probably create an fstab without too much trouble. The real problem is that it is not a good thing to run fsck on a mounted ext2 filesystem. The results could be very bad. Most *nix systems run fsck from init, before any daemons are running (also before the switch from single user to multi-user, etc), which avoids most of the issues that might arise from having inode clean-up or repair taking place. It's a tricky one for sure. There are some things that are done in embedded systems that could minimize the need (fsck on the target fs before pivot-root), but I don't know enough about the boot process that has been used on this system to say if they are possible here. Do you run your ext2 for apps read-only? That would tend to make for a lot less need for fsck (that's maybe also why /system is a r/o filesystem). It also helps to mount with a noatime flag so that you don't have access time resulting in the filesystem getting updated.

Edit: Oops. I just saw that you busybox doesn't have fsck.ext2. Bummer. We could probably cross-compile a new one. It's an easy build. I'll check it out tomorrow, time permitting (work has teeth on Mondays).
 
Last edited:
Celtus, I was thinking of doing a new build of busybox for this purpose. Just haven't had time to do so as of yet.

~Ivy
 
I just looked at the source for busybox, and unfortunately it doesn't appear that there is a fsck for ext2fs available.

~ivy
 
You're right, ivy. The last embedded build I did, I had to make a static e2fsck (from e2fsprogs source). Makes it a bit less convenient, but it still should be possible, I hope. I haven't tried it, of course, but I will as soon as I have a chance.

Edit: I just looked at the bb source, and it seems that perhaps it has been added. There is an e2fsprogs dir, and it has fsck source in it. I'll give it a closer look... Looks like it's been there awhile. I didn't think it had been so long since I was cramming 10 pounds of system into those 5 pound boxes, but then I have no sense of time really - lol.
 
Last edited:
Cool cool Celtus, I might have a closer look into busybox this evening once home.

I just am wondering if ext2 is best suited for this. As running an fsck on boot would slow things down quite a lot.

~Ivy
 
well i just went thru the process and believe i got it all working ! Titanium now shows :

Internal : 183mb (92.4mb free)
SD card : 6.79GB
SD card (a2sd): 1.26GB (933mb free)

have installed google earth and angry birds and they both went to my sdcard and not my internal as it would before this mod .

have rebooted and no errors programs still working ! woot

Thanks all for getting this going , and very well written even I could follow it heheh

GJ !
 
Pvella :hum makes sense since busybox fsck is for embeded systems most don t use ext2 i didn t test the command really.
before correcting the file system one must find out why the machine crashed or reboot i think first or and/if it get umounted at shutdown/reboot.
 
Now that I only mount the /data/app directory, I have not had any problems at all. I have a feeling that it is related to mounting the cache, but that is just my gut feeling. If the device reboots overnight (which sometimes happens) how can I tell in the morning why this might have happened? Is there a log file I can check. I am used to being able to check /var/messages on a linux box, is there an Android equivalent?
 
i think only logcat can do it not enough info too i leave mine with the cable connected and /adb logcat > logs.txt
an i test the fsck you put on the zip and got
./fsck -t ext2 /dev/block/vold/179:1
[1] Segmentation fault ./fsck -t ext2 /dev/block/vold/179:1

does not work :( that is a 2GB sd card made ext2 and touch forcefsck maybe its for some other arm or i did something wrong
 
Last edited:
i can use my huawei u8120 mic/headphone cord with the s7 so no need for a more expensive bluetooth headset
 
This is my first post though have been reading for quite some time. Thank you so much to all of you specially Pvella, Ivy. Kev.

I got a S7 in Dec and ofcourse had plan to root and do App2SD from begining. But, while I have been flashing for WM for several years have no idea of android at all. WM I can flash and setup within 15 min but it took me >4 days to finally get the things working on S7. Rooting and titanium backup was easy but App2SD took long time.

Here I want to mention some important points where I was stuck and hope it will help others, I remember buzzman and some others had the glitches which were similar. I followed Kev and Pvella's writeups.
In Kev's post on creating a partition, he mentioned creat as PRIMARY and not logical, I formated with ext2 probably does not need to be. I had problem mounting the vol 179:18 and this is what I did different. After remount and making /system/sd
mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
mkdir /system/sd
ls -l /dev/block/vold

If you don't see 179:18 (for US) Or 179:2 (for Aus) then something wrong with your partition or you did not reboot or not have SD card 2 etc, your next mounting not going to work.

If it is showing you the vol 179:18 or 179:2 (forgive me if this is not the right term) then follow.
The mount statement that worked for me is what I found on XDA forum
mount -t ext2 /dev/block//vold/179:18 /system/sd
or 179:2 if Aus ver. Remember the '//vold'. This was key for me. Verify your mount with
mount # as suggested by Pvella's post. If you see the mount as he suggested, GO AHEAD AND CHANGE it in the FILE init-sd.sh same way.

mount -t ext2 /dev/block//vold/179:18 /system/sd 1>>$MYLOG 2>>$MYLOG

Follow the instructions and you should be fine. I have no idea why ther has to be '/' or '//' slash, Hope one of the linux guru here will explain.

My setup is win7 ult x64, I used "QtADB_0.7.6_windows_with_libs" for ADB ), just found it simpler(tried droid explorer and ADB shell), you can do drag drop copy etc and then run the shell for superuser, also Ctrl+V works great. You can also browse the /system or /dev folder. And yes I put all /app, /data and catche to sd on a 1.5 GB patition. So far working great with ofcourse C61B011 ROM.

Pvella, May you please put a link to yours and Kevs post in your first post so a noobee like me don't go trying all the ideas in between.
 
I haven't tried apps2sd again. Still hoping for 2.2 or better to arrive. Martian, very glad you found a work around the sticking point. If I get impatient I'll remember your post!

You guys are certainly making huge progress in making this a great piece of hardware. Keep up the great work. What I'm ultimately hoping for since I'm technically challenged is for all the blocks to fall into place and a cooked rom from this site to be the ultimate hack with all the great improvements incorporated. Now the question is will it be 2.2 or 3.0? I'm always the optimist! ;)
 
I have updated the initial post, with shortcuts to the most relevant parts of this discussion. Let me know if you think anything else should be linked.
 
Count me in. I am in the same hope for a perfect coocked 2.2 /3.0. But cann't resist will keep trying, so far I am very happy with the singapore ROM and the APP2SD work around. I will monitor and report if I land up into problems that has been reported by some. BTW I am a novice for linux, I use it only rarely when I have to.

@Pvella Thanks for the links, it will be great help to many users.
 
Last edited:
Back
Top