Ticket #1998 (new defect)

Opened 10 years ago

Last modified 9 months ago

"Unable to mount root fs on unknown-block(179,2)" after hard shutdown

Reported by: denver Owned by: openmoko-devel
Priority: normal Milestone: Om2008.8
Component: unknown Version: Om2008.8
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

Upon restarting after a hard shutdown (removing the battery while device is on), the kernel fails to mount the root filesystem on the microSD card while booting to the microSD card. The following message is printed to the top of the screen at boot time and the system halts:

[    8.075000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

After removing the battery for approximately one minute, re-inserting it, and turning on the unit, it halts at the same point, but provides more information:

[    3.......] Bluetooth: ...
[    3.900000] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    3.980000] pcf50633 0-0073: setting system clock to 2008-09-13 22:37:24 UTC (1221345444)
[    3.985000] Waiting 5sec before mounting root device...
[    4.125000] CRCFAIL 0x1a3f
[    4.530000] CRCFAIL 0x1a3f
[    4.545000] CRCFAIL 0x1a3f
[    4.595000] sdio_wlan 00:01: driver attached
[    4.600000] sdio_wlan 00:01: SDIO device, IDs SD_0001 (active)
[    5.650000] BMI Get Target Info: Exit (ver: 0x20000059 type: 0x1)
[    5.720000] SDIO_INT_CTRL enable IRQ
[    5.730000] AR6000 Reg Code = 0x40000060
[    9.005000] EXT2-fs: mmcblk0p2: couldn't mount because of unsupported optional features (4).
[    9.015000] List of all partitions:
[    9.020000] 1f00       2048 mtdblock0 (driver?)
[    9.025000] 1f01        256 mtdblock1 (driver?)
[    9.030000] 1f02        256 mtdblock2 (driver?)
[    9.040000] 1f03       8192 mtdblock3 (driver?)
[    9.050000] 1f04        640 mtdblock4 (driver?)
[    9.060000] 1f05        256 mtdblock5 (driver?)
[    9.065000] 1f06     252544 mtdblock6 (driver?)
[    9.070000] b300     498176 mmcblk0 driver: mmcblk
[    9.080000]   b301       7836 mmcblk0p1
[    9.085000]   b302     490336 mmcblk0p2
[    9.090000] No filesystem could mount root, tried:  ext2
[    9.100000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

The problem can be corrected by using a microSD card reader on another computer to mount the ext2 partition. After unmounting the partition and inserting it into the FreeRunner?, the operating system boots without issue.

To help diagnose the issue, I copied the contents of the microSD card (dd if=/dev/sdb) before and after mounting it with the microSD card reader. The following is a diff between the hexdumps of the two images:

--- before_mount.hex	2008-09-13 14:40:15.000000000 -0400
+++ after_mount.hex	2008-09-13 14:41:13.000000000 -0400
@@ -496087,13 +496087,13 @@
 007a8000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
 007a8400  00 e0 01 00 60 7b 07 00  c4 5f 00 00 43 a4 04 00  |....`{..._..C...|
 007a8410  6b 70 01 00 01 00 00 00  00 00 00 00 00 00 00 00  |kp..............|
-007a8420  00 20 00 00 00 20 00 00  00 08 00 00 c4 2f cc 48  |. ... ......./.H|
-007a8430  c4 2f cc 48 0f 00 19 00  53 ef 00 00 01 00 00 00  |./.H....S.......|
+007a8420  00 20 00 00 00 20 00 00  00 08 00 00 7d 07 cc 48  |. ... ......}..H|
+007a8430  91 07 cc 48 10 00 19 00  53 ef 00 00 01 00 00 00  |...H....S.......|
 007a8440  17 87 c5 48 00 4e ed 00  00 00 00 00 01 00 00 00  |...H.N..........|
 007a8450  00 00 00 00 0b 00 00 00  80 00 00 00 3c 00 00 00  |............<...|
-007a8460  06 00 00 00 01 00 00 00  83 0e 12 ae d4 47 43 a7  |.............GC.|
+007a8460  02 00 00 00 01 00 00 00  83 0e 12 ae d4 47 43 a7  |.............GC.|
 007a8470  84 73 d1 23 03 52 96 f5  00 00 00 00 00 00 00 00  |.s.#.R..........|
 007a8480  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
 *
 007a84c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 01  |................|

The partition table is as follows (output of "echo p | fdisk /dev/mmcblk0"):

Disk /dev/mmcblk0: 510 MB, 510132224 bytes
8 heads, 7 sectors/track, 17792 cylinders
Units = cylinders of 56 * 512 = 28672 bytes

        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1               1         280        7836+ 83 Linux
/dev/mmcblk0p2             281       17792      490336  83 Linux

This shows that 007a8000, the first line of the above diff, is at the start of mmcblk0p2 (280*28672 = 7a8000). Unfortunately, I don't understand the ext2/3 filesystem headers so I'm not sure what this diff means. It should prove useful to someone that knows a bit more about it, though.

I can provide additional information about the before_mount and after_mount images if you need them.

Presumably the issue is with the Openmoko kernel. It is unable to mount the partition even though another Linux kernel can mount it (the one on the computer with the attached microSD reader). The differences in the ext2/3 filesystem header appear to be causing the problem. Either the filesystem header is being left in an invalid state on a hard shutdown or the kernel is unable to read the valid filesystem header that is present after a hard shutdown. In any case, the kernel should be able to correct the issue at boot time and proceed.

This issue can be reproduced by modifying the filesystem header as described in the above diff. It can also be reproduced by doing a hard shutdown on an Om2008.8 system booted from the 512MB microSD card shipped with the FreeRunner?, although it only occurs sometimes.

Change History

comment:1 Changed 10 years ago by denver

To clarify, I am using the 20080903 kernel, the latest at the time of this writing, which is available at:

http://downloads.openmoko.org/releases/Om2008.8-update/Om2008.8-gta02-20080903.uImage.bin

The output of "uname -a" is:

Linux om-gta02 2.6.24 #1 PREEMPT Wed Sep 3 19:01:18 CST 2008 armv4tl unknown

comment:2 Changed 10 years ago by andy

/*

  • Check feature flags regardless of the revision level, since we
  • previously didn't change the revision level when setting the flags,
  • so there is a chance incompat flags are set on a rev 0 filesystem. */

features = EXT2_HAS_INCOMPAT_FEATURE(sb, ~EXT2_FEATURE_INCOMPAT_SUPP);
if (features) {

printk("EXT2-fs: %s: couldn't mount because of "

"unsupported optional features (%x).\n",
sb->s_id, le32_to_cpu(features));

goto failed_mount;

}

#define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \

EXT2_FEATURE_INCOMPAT_META_BG)

Don't really know what it means, but I never saw it myself and Google is pretty quiet about it, usually a sign it is the outcome of somthing funny.

Note the desktop box is doing a mount from userspace, so it's quite possible it can try multiple times or take corrective action if it sees insanity: we are having one go entirely from kernel so we might be a little more fragile.

Check we are not somehow mixing up rootfstype= between ext2 and ext3, on kernel commandline or in /etc/fstab in the root filesystem for example.

Another angle, IIRC Debian for example has initscript to remount the rootfs rw, it is happy to have ro rootfs initially. I noticed in the ext2 code there are different rules for what it doesn't like if you mount ro. So you might mask this behaviour if you add "ro" to your kernel commandline to get the rootfs mounted read only initially.

comment:3 Changed 13 months ago by RoberMync

Levitra 10 Bucodispersable <a href=http://antabuse.ccrpdc.com/disulfiram-online.php>Disulfiram Online</a> Propecia Liver Function Kosten Levitra Ihre <a href=http://cial1.xyz/purchase-cialis.php>Purchase Cialis</a> Amoxicillin While Breastfeeding 10 Discount On Future Amoxil Orders <a href=http://zol1.xyz/cheap-zoloft-tablets.php>Cheap Zoloft Tablets</a> What Is Keflex Ordered For Silibinin <a href=http://kama1.xyz/buy-cheap-kamagra.php>Buy Cheap Kamagra</a> Viagra 100 Mg For Sale Free Samples Viagra Jellies Uk <a href=http://zol1.xyz/shop-zoloft-online.php>Shop Zoloft Online</a> Amoxicillin For Dogs Side Effects Prescription <a href=http://cial1.xyz/fast-delivery-cialis.php>Fast Delivery Cialis</a> Cialis 10 vs 20 Levitra Eu Versand Rezeptfrei <a href=http://viag1.xyz/internet-order-viagra.php>Internet Order Viagra</a> Vendita Kamagra France American Viagra Store <a href=http://cial1.xyz/buy-tadalafil.php>Buy Tadalafil</a> Achat Kamagra France Dosage For Keflex Pulvules 500 Mg <a href=http://viag1.xyz/low-price-viagra.php>Low Price Viagra</a> Priligy Medikament Cialis (Tadalafil)No Presciption Needed <a href=http://cial1.xyz/cialis-tadalafil.php>Cialis Tadalafil</a> Levitra Horschaden Cialis 5 Mg Order On Line <a href=http://cial5mg.xyz/tadalafil-online.php>Tadalafil Online</a> What Is Amoxicillin For Nexium Coupons For Seniors <a href=http://zol1.xyz/order-zoloft-online.php>Order Zoloft Online</a> Olanzapine Tomar Viagra Jovenes <a href=http://cial5mg.xyz/generic-cialis.php>Generic Cialis</a> Amoxicillin Squirrels Cialis Generico In Farmacia In Italia <a href=http://kama1.xyz/buy-generic-kamagra-online.php>Buy Generic Kamagra Online</a> Doxycycline Pills Black Market Importing Kamagra Into Uk <a href=http://cial5mg.xyz/cheap-cialis-and-viagra.php>Cheap Cialis And Viagra</a> Buy Synthroid No Prescription Propecia Cancer Risk <a href=http://cial1.xyz/buy-generic-cialis-online.php>Buy Generic Cialis Online</a> Benicar Buy Cialis Fast Delivery <a href=http://zol1.xyz/sertraline-no-prescription.php>Sertraline No Prescription</a> Effects Of Alcohol On Amoxicillin Viagra Online Canada Overnight <a href=http://cial1.xyz/order-cialis-tablets.php>Order Cialis Tablets</a> Viagra Bluthochdruck

comment:4 Changed 9 months ago by RonDert

Lowest Price Flagyl Low Price http://cialtobuy.com - cialis Order Progesterone Menopause Medicine
Kamagra Safe Kamagra 100mg Wirkung Buy Overnight Direct Zentel Tab Amex Fedex C.O.D.
Comprar Viagra Generico Espana <a href=http://cialtobuy.com >cialis</a> Genericos De Propecia

Note: See TracTickets for help on using tickets.