View Full Version : lacking mkfs.ext2, and going bald
spycedtx
08-10-2006, 12:25 AM
It seems I finally maxed out the internal storage. I bought a 1G card a few weeks ago, and was going to follow the destructions on moving the file system to the mmc. now it's really time.
running ubuntu under vmware on windows, it sees the disk being inserted
"new full speed USB device using uhci_hcd and address 3" (the address number always changes).
I can see it has been mounted under /proc/bus/usb. I can see the devices file and 001 and 003, etc.
I've searched forums and such, and I keep seeing references to the usb drive being mounted as a scsi device, but I see no such reference in the dmesg. this happens on both the mmc and a regular thumb drive. I really don't know which module I need to modprobe/insmod.
I used sfdisk (on the 770) to create 2 partitions on the mmc (one at 100meg, just for simple file xfer via usb, if needed, and the remaining 900 for the file system and swap file).
So... now... how do i actually mkfs.ext2? I copied it from the scratchbox devkit (yes, the armel version), and got a dependency error (i believe, i don't recall at the moment).
I tried even using a liveCD of gnoppix, and but still got the same issues above of seeing a uhci but not a scsi disk.
help? please? I've been digging at this for almost 24hrs now.. so I'm sure I'm overlooking something small and stupid, so please forgive me.
bradb
08-10-2006, 12:48 AM
Just for grins, as root on my 770 I did:
apt-get install e2fsprogs
Would you believe it gave me 'mkfs.ext2'?
Give it a try.
Brad.
EDIT: Even better, it gives you 'e2fsck' for those "hard-crash" moments. Damn... let's see MyLo do that, eh? :-)
spycedtx
08-10-2006, 03:12 AM
Just for grins, as root on my 770 I did:
apt-get install e2fsprogs
Would you believe it gave me 'mkfs.ext2'?
Give it a try.
Brad.
EDIT: Even better, it gives you 'e2fsck' for those "hard-crash" moments. Damn... let's see MyLo do that, eh? :-)
You are so my hero. Now, I just need to figure out where to properly add the insmod in the startup scripts so /media/mmc2 is mounted properly as /Root. As a control, I added the insmod line in the bootmisc.sh and the 2nd partition in fstab. A reboot shows nothing listed in mount. bah. and attempting a mount on the fstab entry fails until I insmod again from the command line.
Now I'm digigng through the /etc/init.d/minircS chain, trying to make sense of it. I need to step away, as my brain is fried, but my tablet is somewhat unusable at this point. *grumble* well, usable. just can't install anything else w/o uninstalling
This is call coming from: http://maemo.org/maemowiki/ExtendedRootFilesystem
I'm opting to use ext2, as from what I've read using jffs/ext3 isn't going to buy me enough to warrant the difference. Tho, if I can't solve it quickly, I'll return to using ext3.. and hope it works easily. :)
Please feel free to contribute any help. I'm hoping to update the wiki page once all of my madness is complete.
bradb
08-10-2006, 03:45 AM
As my old boss used to tell me: "better lucky than good".
Check this post (http://www.internettablettalk.com/forums/showpost.php?p=16134&postcount=17) , it should still apply.
Brad.
fanoush
08-10-2006, 05:01 AM
Why not to copy whole system to mmc and boot directly from it? Looks easier to me than use ExtendedRootFilesystem. And as a bonus you can have internal flash with clean system as a backup and boot it if something goes wrong with your card and e2fsck it. I have it like this for two weeks and so far had no problem and the speed is comparable with internal flash. Didn't notice any slowdown.
http://maemo.org/pipermail/maemo-developers/2006-August/005040.html
Edit: not two weeks, just one (but seemed like two :-)
aflegg
08-10-2006, 08:32 AM
Until it's possible to unionfs /usr, this might well be the best solution :-/
Seems a bit wasteful to have all the stuff on the MMC that I've got in the system flash, though.
Cheers,
Andrew
fanoush
08-10-2006, 09:53 AM
Yes it is wasteful :-) But with 1 or 2 gig card it is bearable. And I find the tradeoff of wasting space vs. having stable rootfs in flash to go back anytime worthwile. And I can still fill the rest of internal flash with e-books or anything to use the rest of free space.
spycedtx
08-10-2006, 06:03 PM
So, as I continue, step by step, hoping this works, I find that this particular sub doesn't do anything, as udevstart is no longer present in minircS. there are some references to udevsynth and /etc/udev/udev.con...
cp -p /etc/init.d/minircS /etc/init.d/minircS~ && sed -ir 's|(/sbin/udevstart)$|\1;mount /dev/mmcblk0p2|' /etc/init.d/minircS
So, I checked out the thread on the rynch (which I now need to install to make work), but I'm not sure where in the existing steps, if any, this needs to go.
here are the steps so far:
umount /media/mmc1
sfdisk -uM /dev/mmcblk0 << EOF
0,100,6
,,L
EOF
[reboot]
mkfs.vfat /dev/mmcblk0p1
mkfs.ext2 /dev/mmcblk0p2
modified minircS to add the insmod, after the PATH= line:
insmod /mnt/initfs/lib/modules/2.6.16-omap1/ext2.ko
i added mmcblk0p2 to the fstab, and it mounts on boot to /media/mmc2. so, this much is working.
now, the question is.. how much of the minireboot/others do I need to still touch, if any.. what else should be done prior to trying the synch line listed in
http://maemo.org/pipermail/maemo-developers/2006-August/005040.html
there's also a question I have about referencing the version specific dir under modules, rather than current (which is a symlink), as if there's another OS update, will that version go away, will the current still carry the ext2fs.ko...
I appreciate all the help and assistance from everyone that's taken these steps before me. Hopefully, shortly, we can have an updated wiki page to assist others, taken from my adventure.
EDIT: I apologize if I'm missing stupid things.. I've been obsessing over this non-stop now since I started 2 days ago, so I'm sure I've developed some serious tunnel vision. It sucks being a geek sometimes.
fanoush
08-11-2006, 02:00 AM
now, the question is.. how much of the minireboot/others do I need to still touch, if any.. what else should be done prior to trying the synch line listed in
http://maemo.org/pipermail/maemo-developers/2006-August/005040.html
you are mixing two things here
1. exended rootfs which tries to reuse system in flash and join it with space on mmc
2. full rootfs on mmc without using rootfs in flash at all
1 is tricky and need lot of modifications you mentioned
for 2 you need to do only the rsync in the mail you quoted and custom initfs with menu (previous mail in the list), nothing you mentioned above.
spycedtx
08-11-2006, 02:39 AM
you are mixing two things here
1. exended rootfs which tries to reuse system in flash and join it with space on mmc
2. full rootfs on mmc without using rootfs in flash at all
1 is tricky and need lot of modifications you mentioned
for 2 you need to do only the rsync in the mail you quoted and custom initfs with menu (previous mail in the list), nothing you mentioned above.
aaah! I knew they were two different things, but I had assumed #2 was a different route after having repartitioned and formatted the mmc properly.
I'm wondering which steps I need to remove (ie, changing back the minireboot and minirC), and what would break if I changed your steps to use ext2 rather than jffs. Or should I really just get over it and use jffs?
spycedtx
08-11-2006, 03:12 AM
nevermind.. the original copy in the system can stay jffs. but when i do the rsync to copy to the mmcp2, it can stay ext2.
sorry, it's been a long process. i'm just frazzled and not thinking.
fanoush
08-11-2006, 03:14 AM
aaah! I knew they were two different things, but I had assumed #2 was a different route after having repartitioned and formatted the mmc properly.
Yes, if you want to keep partition 1 as vfat to use the usb mass storage you need to do this and also need that custom initfs to select partition 2 booting.
I'm wondering which steps I need to remove (ie, changing back the minireboot and minirC), and what would break if I changed your steps to use ext2 rather than jffs. Or should I really just get over it and use jffs?
You shoud remove all steps. There are no rootfs modifications needed for rootfs on mmc. Just rsync to have exact copy of your flash rootfs on mmc.
fanoush
08-11-2006, 03:29 AM
you also need ext2 module inserted while doing the rsync
Nokia770-26:~# insmod /mnt/initfs/lib/modules/current/ext2.ko
Nokia770-26:~# mount -t jffs2 /dev/mtdblock4 /floppy -o rw,rpsize=1024,rpuid=0,rpuid=30000
Nokia770-26:~# mount /dev/mmcblk0p2 /opt/
Nokia770-26:~# rsync -avH --delete /floppy/ /opt/
Nokia770-26:~# umount /opt
Nokia770-26:~# umount /floppy
after you have exact copy of flash rootfs booting from mmc and you are tired of selecting mmc partition 2 on every boot, you can set it as default boot mode via
Nokia770-26:~# chroot /mnt/initfs cal-tool --set-root-device mmcblk0p2
Then if you have problem with mmc later you can select boot from flash in the menu and repair the card.
spycedtx
08-11-2006, 05:02 AM
I do believe it's working! Thank you for all your help and pointers. Now it's my turn to update the wiki.
One thing I've noticed, and I'm not sure if it's a post-fact of creating the 2nd partition on the 1g card, but.. From control panel -> memor, I notice the CPU and Mem load top out (using the cpumem toolbar thingy).. granted, I did turn off swap(extended memory) at one point (when I started this madness, so i could unmount the mmc), but it seems I have to reboot (pop the battery, even) to get my system back. Does it not like my ext2? do I have a circular link somewhere? hrmmm. I'm not sure if I need to do a manual swap file / swapon so I can actually create the virtual memswap from the control panel...
thoughts, suggestions, ideas?
thanks!
EDIT: it sure is nice, tho, to see "2% used.. 14.4MB in use, 596.6M avail"
EDIT 2: created a swap file manually, swapped in on, verified via 'free', control panel/memory still borks the system.
spycedtx
08-11-2006, 05:22 AM
I did notice, running under mmcblk0p2
/dev/mmcblk0p2 on /mnt/inifs type jffs2
...
/dev/mmcblk0p2 on / type ext2
Potential problems?
fanoush
08-11-2006, 06:27 AM
Probably not a problem. And this is not new, it is the same with /dev/mtdblock4 when using flash, it should be /dev/mtdblock3 for initfs. I think this is related to the way initfs mounts and chroots into real root and also to the /dev/root line in /etc/fstab.
df reads /etc/mtab which is wrong but it doesn't matter much, /proc/mounts is correct.
Edit: /proc/mounts and /etc/mtab are same and contain /dev/root for initfs which in fact doesn't exist as a device file in /dev.
fanoush
08-11-2006, 06:37 AM
my memory applet in control panel works as expected with root on mmcblk0p2, maybe you screwed something up with those not-needed modifications and symlinks done before
spycedtx
08-11-2006, 11:30 AM
my memory applet in control panel works as expected with root on mmcblk0p2, maybe you screwed something up with those not-needed modifications and symlinks done before
I double checked my history. I'd put the minireboot/shutdown changes into temp files, and never replaced the existing ones. fstab has the mmc2 mount line commented out.
So, the problem was I had backed up my /home/user directory to mmc1 and it was still there. The control panel seems to have choked on finding it several spots. Once I removed the directory copy, all was well.
Several of the apps I had installed prior seem to be broken somewhat, ie smbclient and samba.. now i'm trying to fix those, but that should be a minimalistic effort.
Thanks again for all your help and guidance.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.