ext4 rootfs not booting

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

ext4 rootfs not booting

In an attempt to solve my own questions (http://gumstix.8.n6.nabble.com/data-writing-to-file-causing-intermittent-hanging-td4966278.html) I want to implement an ext4 filesystem on rootfs.

Looking around it seems Kernel version 2.6.39 has this capability, but doesn't seem to recognize the filesystem on boot. I updated the NAND variables such that 'mmcrootfstype=ext4 rootwait' but it's still not happy. Getting: Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2) .

I'm using the stable release pre-built image from Gumstix.org (August 2011). Do I need to update the uboot to a more recent version?

Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: ext4 rootfs not booting

I've made a card that had the rootfs partition formatted as ext2 and went through the same steps except that I changed the the environment variable to  "ext2 rootwait" and it seemed to boot fine. Not sure about ext4 though...
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: ext4 rootfs not booting

In reply to this post by qmay123
"mmcrootfstype" variable is not related to NAND filesystem, isn't it ?

I enabled "CONFIG_MTD_PARTITIONS" in menuconfig, and build kernel image.


Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: ext4 rootfs not booting

So I built the most recent MLO/u-boot/uImage and omap3-console-image using OE.

Getting the infamous : Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

I partitioned my microSD card as per http://gumstix.org/create-a-bootable-microsd-card.html, but made an ext4 rootfs partition. I'll double check the process using ext3 on the same card. In the meantime, here is the boot screen

Hit any key to stop autoboot:  0
reading boot.scr

** Unable to read "boot.scr" from mmc 0:1 **
reading uImage

3432208 bytes read
Booting from mmc ...
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Angstrom/3.2/overo
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3432144 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.2.0 (dan@LaGuerta-laptop) (gcc version 4.3.3 (GCC) ) #1 PREEMPT Wed Dec 26 21:56:21 EST 2012
CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Gumstix Overo
Reserving 12582912 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP3430/3530 ES3.1 (l2cache iva sgx neon isp )
Clocking rate (Crystal/Core/MPU): 26.0/332/500 MHz
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 126976
Kernel command line: console=ttyO2,115200n8 mpurate=500 vram=12M omapfb.mode=dvi:1024x768MR-16@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
allocated 2097152 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 500MB = 500MB total
Memory: 497752k/497752k available, 26536k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xe0800000 - 0xf8000000   ( 376 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc0659774   (6470 kB)
      .init : 0xc065a000 - 0xc0693000   ( 228 kB)
      .data : 0xc0694000 - 0xc06ee190   ( 361 kB)
       .bss : 0xc06ee1b4 - 0xc077b168   ( 564 kB)
IRQ: Found an INTC at 0xfa200000 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
OMAP clockevent source: GPTIMER1 at 32768 Hz
sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999ms
Console: colour dummy device 80x30
Calibrating delay loop... 497.82 BogoMIPS (lpj=1941504)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys debug
Initializing cgroup subsys cpuacct
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys perf_event
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
print_constraints: dummy:
NET: Registered protocol family 16
GPMC revision 5.0
OMAP GPIO hardware version 2.5
omap_mux_init: Add partition: #1: core, flags: 0
Reprogramming SDRC clock to 332000000 Hz
dpll3_m2_clk rate change failed: -22
Found NAND on CS0
Registering NAND on CS0
hw-breakpoint: debug architecture 0x4 unsupported.
 omap-mcbsp.2: alias fck already exists
 omap-mcbsp.3: alias fck already exists
Calibrating delay loop (skipped) already calibrated this CPU
Switched to new clocking rate (Crystal/Core/MPU): 26.0/332/500 MHz
OMAP DMA hardware revision 4.0
bio: create slab <bio-0> at 0
print_constraints: vads7846: 3300 mV
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
omap_i2c omap_i2c.1: bus 1 rev1.3.12 at 2600 kHz
twl4030: PIH (irq 7) chaining IRQs 368..375
twl4030: power (irq 373) chaining IRQs 376..383
twl4030: gpio (irq 368) chaining IRQs 384..401
print_constraints: VUSB1V5: 1500 mV normal standby
print_constraints: VUSB1V8: 1800 mV normal standby
print_constraints: VUSB3V1: 3100 mV normal standby
twl4030_usb twl4030_usb: Initialized TWL4030 USB module
print_constraints: VMMC1: 1850 <--> 3150 mV at 3150 mV normal standby
print_constraints: VDAC: 1800 mV normal standby
print_constraints: VDVI: 1800 mV normal standby
omap_i2c omap_i2c.3: bus 3 rev1.3.12 at 400 kHz
Advanced Linux Sound Architecture Driver Version 1.0.24.
Switching to clocksource 32k_counter
musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
musb-hdrc musb-hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
audit: initializing netlink socket (disabled)
type=2000 audit(0.156:1): initialized
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
Registering unionfs 2.5.10 (for 3.1.0-rc4)
JFFS2 version 2.2. (NAND) (SUMMARY)  Â© 2001-2006 Red Hat, Inc.
fuse init (API version 7.17)
msgmni has been set to 972
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered (default)
OMAP DSS rev 2.0
omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 72) is a OMAP UART0
omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 73) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x49020000 (irq = 74) is a OMAP UART2
console [ttyO2] enabled
brd: module loaded
loop: module loaded
twl4030_madc twl4030_madc: clk disabled, enabling
omap2-nand driver initializing
ONFI flash detected
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xbc (Micron NAND 512MiB 1,8V 16-bit)
Creating 5 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000080000 : "xloader"
0x000000080000-0x000000240000 : "uboot"
0x000000240000-0x000000280000 : "uboot environment"
0x000000280000-0x000000680000 : "linux"
0x000000680000-0x000020000000 : "rootfs"
smsc911x: Driver version 2008-10-21
smsc911x-mdio: probed
smsc911x smsc911x.0: eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)
smsc911x smsc911x.0: eth0: MAC Address: 00:15:c9:28:e3:b6
smsc911x: Driver version 2008-10-21
usbcore: registered new interface driver asix
usbcore: registered new interface driver cdc_ether
cdc_ncm: 04-Aug-2011
usbcore: registered new interface driver cdc_ncm
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OMAP-EHCI Host Controller
usb usb1: Manufacturer: Linux 3.2.0 ehci_hcd
usb usb1: SerialNumber: ehci-omap.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
twl_rtc twl_rtc: rtc core: registered twl_rtc as rtc0
i2c /dev entries driver
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
omap-iommu omap-iommu.0: isp registered
usbcore: registered new interface driver snd-usb-audio
overo SoC init
asoc: twl4030-hifi <-> omap-mcbsp-dai.1 mapping ok
ALSA device list:
  #0: overo
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
NET: Registered protocol family 15
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 1
ThumbEE CPU extension supported.
sr_init: No PMIC hook to init smartreflex
smartreflex smartreflex.0: omap_sr_probe: SmartReflex driver initialized
smartreflex smartreflex.1: omap_sr_probe: SmartReflex driver initialized
clock: disabling unused clocks to save power
registered taskstats version 1
fbcvt: 1024x768@60: CVT Name - .786M3-R
Console: switching to colour frame buffer device 128x48
regulator_init_complete: VDAC: incomplete constraints, leaving on
regulator_init_complete: vads7846: incomplete constraints, leaving on
twl_rtc twl_rtc: setting system clock to 2000-01-01 00:03:40 UTC (946685020)
Waiting for root device /dev/mmcblk0p2...
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368 SDU8G 7.45 GiB
 mmcblk0: p1 p2 p3
VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2)
Please append a correct "root=" boot option; here are the available partitions:
1f00             512 mtdblock0  (driver?)
1f01            1792 mtdblock1  (driver?)
1f02             256 mtdblock2  (driver?)
1f03            4096 mtdblock3  (driver?)
1f04          517632 mtdblock4  (driver?)
b300         7822336 mmcblk0  driver: mmcblk
  b301           65472 mmcblk0p1 00000000-0000-0000-0000-000000000mmcblk0p1
  b302         7756800 mmcblk0p2 00000000-0000-0000-0000-000000000mmcblk0p2
  b303              63 mmcblk0p3 00000000-0000-0000-0000-000000000mmcblk0p3
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: ext4 rootfs not booting

Just checked and using the same card with p2 formatted to ext3 works.  

Are there any kernel mods I need to make? Am I missing something?

I'm going to ext4 to try to solve data writing issues that I think might be due to journaling style in ext3. I tested my code by writing to a ramfs and everything worked without errors leading me to believe its an fs writing issue. Should I be looking at other fs types?
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: ext4 rootfs not booting

Scott Ellis
This post was updated on .
Do you have EXT4 support built into your kernel?

It's probably not unless you explicitly changed the default config.

../recipes-kernel/linux/linux-sakoman-3.2/overo$ grep EXT4 defconfig
# CONFIG_EXT4_FS is not set

You can also check your config by looking at /proc/config.gz on the Gumstix.
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: ext4 rootfs not booting

Thanks! You were right, I needed to enable ext4_fs in the kernel.

FYI I followed the kernel configuration instructions here:

I also had to change the mmcrootfstype in NAND to ext4 so that

mmcrootfstype = ext4 rootwait

Also, quick note, I used Ubuntu 12.04, I had to install the 'screen' package. If it seems like the menuconfig command hangs, I opened a new terminal and typed 'screen -r' and was able to get to the kernel configuration GUI.

I'll follow up on my original  post about inconsistent data writing to see if ext4 made a difference.

Thanks for the help!
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: ext4 rootfs not booting

Realized I never followed up on this old post, but saw someone else had issues with ext3 journaling. Moving to ext4 did indeed help with rapid continued writing to the SD card.