Reply
Thread Tools
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#191
Originally Posted by terrencegf View Post
I tried various partition sizes for the DOS and the ext2 partitions. I tried both FAT16 and FAT32 for the DOS partition. Nothing worked. I could copy the root filesystem over just fine, and even mount it and see the files. But when I tried to boot from it, it would fail and then boot to internal flash. I also tried updating the kernel to the patched version that allows for faster access to the mmc cards. No difference.
This is strange. It shouldn't be related to the card size at all. If you can mount the card and see the data, it should be same at boot time. Which partition you used for ext2, /dev/mmcblk0p2 or something higher like p4,p5..?

You can edit/create bootmenu.conf (not .sh) and add
Code:
dmesg >/tmp/dmesg.out
as a last line and after boot see if there is anything suspicious in kernel log early at boot time. You can also see kernel log after it failed and booted from flash but the beginning is cut off.

You may also try to test if it is some limitation/bug of uclibc system in initfs. As root you may run
Code:
chroot /mnt/initfs
this will switch to the system used at early boot time so you can try mounting the card there and see if everything works too.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 
terrencegf's Avatar
Posts: 221 | Thanked: 182 times | Joined on Jul 2007 @ Central Illinois
#192
Originally Posted by fanoush View Post
This is strange. It shouldn't be related to the card size at all. If you can mount the card and see the data, it should be same at boot time. Which partition you used for ext2, /dev/mmcblk0p2 or something higher like p4,p5..?
I did two partitions, /dev/mmcblk0p1 as FAT16 or FAT32 (depending on the size I chose) and /dev/mmcblk0p2 as ext2.

Originally Posted by fanoush View Post
You can edit/create bootmenu.conf (not .sh) and add
Code:
dmesg >/tmp/dmesg.out
as a last line and after boot see if there is anything suspicious in kernel log early at boot time. You can also see kernel log after it failed and booted from flash but the beginning is cut off.
The resulting /tmp/dmesg.out file doesn't seem to show any errors. But I have noticed something I didn't see before. It tried to boot from mmc, failed and booted from flash; I then mounted /dev/mmcblk0p2 on /opt and did "ls", which gave me an "input/output" error on /opt/bin. So it looks like it tried to read from the mmc card's bin directory but failed, which created something bad in the filesystem. Doing "fsck /dev/mmcblk0p2" would fix any errors, but the errors would return upon next reboot.

Originally Posted by fanoush View Post
You may also try to test if it is some limitation/bug of uclibc system in initfs. As root you may run
Code:
chroot /mnt/initfs
this will switch to the system used at early boot time so you can try mounting the card there and see if everything works too.
Doing this seems to generate zero errors. I'm thinking more and more it's a compatibility problem with the card itself. I'm going to order a different brand of 8gb SDHC card and see if it makes any difference.
 
ArnimS's Avatar
Posts: 1,107 | Thanked: 720 times | Joined on Mar 2007 @ Germany
#193
Originally Posted by fanoush View Post
You can edit/create bootmenu.conf (not .sh) and add
Code:
dmesg >/tmp/dmesg.out
as a last line and after boot
This will be interesting to check out.

~thank you~ fanoush (and the guy who wrote the 'EASILY' howtos)!


It is wonderful to be able to make image backups and not go through system reconfig. It's so convenient now! For example,

To back up:
dd bs=1M if=/dev/mmcblk0p2 | gzip > /media/mmc1/images/IT2006_2.2_Working.gz
To restore:
gzip -dc /media/mmc1/images/IT2006_2.2_Working.gz | dd of=/dev/mmcblk0p2 obs=1M
It's uh, not super fast with a stock kernel :P
 
Posts: 43 | Thanked: 4 times | Joined on May 2007 @ Vancouver, WA
#194
a note on booting from the MMC...at least with the FrogPad bluetooth keyboard...it breaks it...

boot the same system from the original flash on the n800 and it works...pairs and connects fine...

boot from the MMC and it pairs but does NOT connect...

Any thoughts on the cause of this?
 
tolou's Avatar
Posts: 87 | Thanked: 1 time | Joined on Mar 2006
#195
Originally Posted by fanoush View Post
When I like current stable system in flash (after clean reflashing and tweaking it a bit) I boot from mmc and do a backup
Code:
mount -t jffs2 /dev/mtdblock4 /opt
./mkfs.jffs2 -r /opt -o /media/mmc1/rootfs.jffs2 -e 128 -l -n
umount /opt
then when I want to restore system in flash I boot from mmc and do
Code:
./flash_eraseall -j /dev/mtd4
./nandwrite -a -p /dev/mtd4 /media/mmc1/rootfs.jffs2
Be sure to use correct device name (/dev/mtd4 for rootfs) and never ever use -j option of nandwrite. Also never ever erase or flash /dev/mtd1 or mtd0. By doing this you can seriously screw your device to the point that reflashing will not help you (and won't be posible at all).
Iīm currently running the system on MMC only and wonder how I can restore the backup to the card instead, in case I will need this in the future. Whatīs the (short?)device name for the boot partition, /dev/mmcblk0p2 or what?

I also concerned about the different filesystems as I have the ext2 on the card. Having run the
Code:
mount /dev/mmcblk0p2 /opt
./mkfs.jffs2 -r /opt -o /media/mmc1/rootfs.jffs2 -e 128 -l -n
produced what seems to be a compressed image of my card. But can I really mix the system types like this? What happens when I want to restore the jff2 image to my ext2 card again?
Can I run something like this from the flash system then even though itīs ext2?
Code:
./flash_eraseall -j /dev/mmcblk0p2
./nandwrite -a -p /dev/mmcblk0p2 /media/mmc1/rootfs.jffs2
__________________
Naboo
__________________
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#196
Originally Posted by tolou View Post
Whatīs the (short?)device name for the boot partition, /dev/mmcblk0p2 or what?
Yes if you boot from second partition.

Originally Posted by tolou View Post
I also concerned about the different filesystems as I have the ext2 on the card. Having run the
Code:
mount /dev/mmcblk0p2 /opt
./mkfs.jffs2 -r /opt -o /media/mmc1/rootfs.jffs2 -e 128 -l -n
produced what seems to be a compressed image of my card. But can I really mix the system types like this? What happens when I want to restore the jff2 image to my ext2 card again?
mkfs.jffs2 is for creating flashable image suited for internal flash, you can do it like above but you can't restore the result to mmc card, only to internal flash (provided the result it is not too large to fit).

If you want to make backup suitable for extracting to mmc card later you can use GNU tar i.e. to make backup to FAT partition on mmc card run something like this
Code:
mount /dev/mmcblk0p2 /opt
cd /opt
/path/to/gnu/tar -zcvf /media/mmc1/backup.tar.gz .
then you can later restore it by formating mmc partition (mke2fs), mounting it and extracting via tar again
Code:
mount /dev/mmcblk0p2 /opt
cd /opt
/path/to/gnu/tar -zxvf /media/mmc1/backup.tar.gz

Originally Posted by tolou View Post
Can I run something like this from the flash system then even though itīs ext2?
Code:
./flash_eraseall -j /dev/mmcblk0p2
./nandwrite -a -p /dev/mmcblk0p2 /media/mmc1/rootfs.jffs2
No.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 
sparkbox's Avatar
Posts: 51 | Thanked: 7 times | Joined on Jul 2007 @ Powell, OH
#197
I am probably going to get scolded for this question but why does this tutorial set you up with 2 partitions to boot of the flash card?

I did a search but could not find answer for my question

Thanks in advance!
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#198
The first parition is VFAT to ensure compatability with Windows - when you put your memory card in a Windows PC it only mounts the first partition and only understands FAT (possibly NTFS too). Creating and using a second partition means you can still use the memory card in your PC to copy music etc. If you only had a single ext2 partition on the card Windows would no longer recognise your card.

Having two partitionts isn't essential, but it does make life a little more convenient.
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#199
It is also for better compatibility with Nokia system. It expects first partition as vfat too so it is a bit confused when it is not there. The partition is mounted to /media/mmcX and shown as "Memory card" in File Manager. It is also exported over USB when you attach it to PC. And you can have swap file there too.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.

Last edited by fanoush; 2007-09-21 at 15:15.
 
Moonshine's Avatar
Posts: 469 | Thanked: 88 times | Joined on Sep 2007 @ Montana
#200
Fanoush, we need your supreme skills again!

Any chance you could update initfs_flash for the new relase that came out today? (4.2007.38-2)

I'd be forever thankful...
 
Reply


 
Forum Jump


All times are GMT. The time now is 03:15.