Kernel Panic while booting from SD

Hi,

I've recently got my BeagleBoard and yesterday I tried to install the
Linux kernel. I've followed all the procedures described at the
BeagelBoard wiki and used the precompiled version of the kernel. After
saving all the required files in the SD card, plugging it and powering
up the board it crashes because it could not mount the root
filesystem. Here's the output:

Texas Instruments X-Loader 1.41
Starting on with MMC
Reading boot sector

717372 Bytes Read from MMC
Starting OS Bootloader from MMC...

U-Boot 1.3.3 (Jul 10 2008 - 16:30:47)

OMAP3530-GP rev 2, CPU-OPP2 L3-165MHz
OMAP3 Beagle Board + LPDDR/NAND
DRAM: 128 MB
NAND: 256 MiB
In: serial
Out: serial
Err: serial
Audio Tone on Speakers ... complete
Hit any key to stop autoboot: 0
reading uimage

1856680 bytes read
## Booting kernel from Legacy Image at 80000000 ...
   Image Name: Linux-2.6.22.18-omap3
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 1856616 Bytes = 1.8 MB
   Load Address: 80008000
   Entry Point: 80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing
Linux..........................................................................................................................
done, booting the kernel.
<5>Linux version 2.6.22.18-omap3 (root@fedoraserver) (gcc version
4.2.1 (CodeSourcery Sourcery G++ Lite 2007q3-51)) #1 Thu Jul 24
15:29:36 IST 2008
CPU: ARMv7 Processor [411fc082] revision 2 (ARMv7), cr=00c5387f
Machine: OMAP3 Beagle board
Memory policy: ECC disabled, Data cache writeback
<7>On node 0 totalpages: 32768
<7> DMA zone: 256 pages used for memmap
<7> DMA zone: 0 pages reserved
<7> DMA zone: 32512 pages, LIFO batch:7
<7> Normal zone: 0 pages used for memmap
<6>OMAP3430ES1
<6>SRAM: Mapped pa 0x40200000 to va 0xd7000000 size: 0x100000
CPU0: D VIPT write-through cache
CPU0: cache: 768 bytes, associativity 1, 8 byte lines, 64 sets
Built 1 zonelists. Total pages: 32512
<5>Kernel command line: console=ttyS2,115200n8 ramdisk_size=8192 root=/
dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M nohz=0ff
<6>GPMC revision 5.0
<6>IRQ: Found an INTC at 0xd8200000 (revision 4.0) with 96 interrupts
<6>Total of 96 interrupts on 1 active controller
<6>OMAP34xx GPIO hardware version 2.5
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
<6>Memory: 128MB 0MB = 128MB total
<5>Memory: 117760KB available (3496K code, 312K data, 132K init)
<7>Calibrating delay loop... 499.92 BogoMIPS (lpj=1949696)
Mount-cache hash table entries: 512
<6>CPU: Testing write buffer coherency: ok
<6>NET: Registered protocol family 16
<3>twl4030: I2C Client[3] is not initialized[515]
<3>twl4030: I2C Client[3] is not initialized[464]
<6>SmartReflex driver initialized
<6>OMAP DMA hardware revision 4.0
<6>OMAP Display hardware version 2.0
<6>i2c_omap i2c_omap.1: bus 1 rev3.12 at 2600 kHz
<6>i2c_omap i2c_omap.2: bus 2 rev3.12 at 100 kHz
<6>i2c_omap i2c_omap.3: bus 3 rev3.12 at 400 kHz
<6>TWL4030: TRY attach Slave TWL4030-ID0 on Adapter OMAP I2C adapter
[1]
<6>TWL4030: TRY attach Slave TWL4030-ID1 on Adapter OMAP I2C adapter
[1]
<6>TWL4030: TRY attach Slave TWL4030-ID2 on Adapter OMAP I2C adapter
[1]
<6>TWL4030: TRY attach Slave TWL4030-ID3 on Adapter OMAP I2C adapter
[1]
<6>TWL4030 Power Companion Active
<6><6>TWL4030: Driver registration complete.
<6>TWL4030 GPIO Demux: IRQ Range 376 to 386, Initialization Success
<6>Initialized TWL4030 USB module<5>SCSI subsystem initialized
<6>usbcore: registered new interface driver usbfs
<6>usbcore: registered new interface driver hub
<6>usbcore: registered new device driver usb
<6>musb_hdrc: version 2.2a/db-0.5.2, pio, otg (peripheral+host),
debug=0
<7>musb_hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine (X),
bulk split (X), HB-ISO Rx (X), HB-ISO Tx (X), SoftConn)
<7>musb_hdrc: MHDRC RTL version 1.400
<7>musb_hdrc: setup fifo_mode 4
<7>musb_hdrc: 29/31 max ep, 15424/16384 memory
<7>musb_hdrc: hw_ep 0shared, max 64
<7>musb_hdrc: hw_ep 1tx, max 512
<7>musb_hdrc: hw_ep 1rx, max 512
<7>musb_hdrc: hw_ep 2tx, max 512
<7>musb_hdrc: hw_ep 2rx, max 512
<7>musb_hdrc: hw_ep 3tx, max 512
<7>musb_hdrc: hw_ep 3rx, max 512
<7>musb_hdrc: hw_ep 4tx, max 512
<7>musb_hdrc: hw_ep 4rx, max 512
<7>musb_hdrc: hw_ep 5tx, max 512
<7>musb_hdrc: hw_ep 5rx, max 512
<7>musb_hdrc: hw_ep 6tx, max 512
<7>musb_hdrc: hw_ep 6rx, max 512
<7>musb_hdrc: hw_ep 7tx, max 512
<7>musb_hdrc: hw_ep 7rx, max 512
<7>musb_hdrc: hw_ep 8tx, max 512
<7>musb_hdrc: hw_ep 8rx, max 512
<7>musb_hdrc: hw_ep 9tx, max 512
<7>musb_hdrc: hw_ep 9rx, max 512
<7>musb_hdrc: hw_ep 10tx, max 512
<7>musb_hdrc: hw_ep 10rx, max 512
<7>musb_hdrc: hw_ep 11tx, max 512
<7>musb_hdrc: hw_ep 11rx, max 512
<7>musb_hdrc: hw_ep 12tx, max 512
<7>musb_hdrc: hw_ep 12rx, max 512
<7>musb_hdrc: hw_ep 13tx, max 512
<7>musb_hdrc: hw_ep 13rx, max 512
<7>musb_hdrc: hw_ep 14shared, max 1024
<7>musb_hdrc: hw_ep 15shared, max 1024
<6>musb_hdrc: USB OTG mode controller at c8800000 using PIO, IRQ 92
<6>Time: 32k_counter clocksource has been installed.
<6>Switched to high resolution mode on CPU 0
<6>NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
<6>TCP: Hash tables configured (established 4096 bind 4096)
<6>TCP reno registered
<6>checking if image is initramfs...it isn't (bad gzip magic numbers);
looks like an initrd
<6>Freeing initrd memory: 8192K
<3>Power Management for TI OMAP.
<6>cpuidle: using driver omap3_idle
<3>create_proc_entry succeeded
<3>create_proc_entry succeeded
<4>NetWinder Floating Point Emulator V0.97 (double precision)
<5>VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
<6>JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
<6>io scheduler noop registered
<6>io scheduler anticipatory registered (default)
<6>io scheduler deadline registered
<6>io scheduler cfq registered
<7>omap2_disp_outLCD panel 1024x768
<4>timeout waiting for frame-done interrupt
<7>omap2_disp_outTV 640x480 interlaced
<6>omap24xxfb: Options "<NULL>"
Console: switching to colour frame buffer device 128x48
<6>omap24xxfb: fb0 frame buffer device
<6>omap24xxfb: display mode 1024x768x16 hsync 22kHz vsync
28Hz<6>omap_rng omap_rng: OMAP Random Number Generator ver. 70
<6>OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
<6>Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing
enabled
<6>serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
<6>serial8250.0: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
<6>serial8250.0: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
Linux version 2.6.22.18-omap3 (root@fedoraserver) (gcc version 4.2.1
(CodeSourcery Sourcery G++ Lite 2007q3-51)) #1 Thu Jul 24 15:29:36 IST
2008
CPU: ARMv7 Processor [411fc082] revision 2 (ARMv7), cr=00c5387f
Machine: OMAP3 Beagle board
Memory policy: ECC disabled, Data cache writeback
OMAP3430ES1
SRAM: Mapped pa 0x40200000 to va 0xd7000000 size: 0x100000
CPU0: D VIPT write-through cache
CPU0: cache: 768 bytes, associativity 1, 8 byte lines, 64 sets
Built 1 zonelists. Total pages: 32512
Kernel command line: console=ttyS2,115200n8 ramdisk_size=8192 root=/
dev/ram0 rw rootfstype=ext2 initrd=0x81600000,8M nohz=0ff
GPMC revision 5.0
IRQ: Found an INTC at 0xd8200000 (revision 4.0) with 96 interrupts
Total of 96 interrupts on 1 active controller
OMAP34xx GPIO hardware version 2.5
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB 0MB = 128MB total
Memory: 117760KB available (3496K code, 312K data, 132K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
twl4030: I2C Client[3] is not initialized[515]
twl4030: I2C Client[3] is not initialized[464]
SmartReflex driver initialized
OMAP DMA hardware revision 4.0
OMAP Display hardware version 2.0
i2c_omap i2c_omap.1: bus 1 rev3.12 at 2600 kHz
i2c_omap i2c_omap.2: bus 2 rev3.12 at 100 kHz
i2c_omap i2c_omap.3: bus 3 rev3.12 at 400 kHz
TWL4030: TRY attach Slave TWL4030-ID0 on Adapter OMAP I2C adapter [1]
TWL4030: TRY attach Slave TWL4030-ID1 on Adapter OMAP I2C adapter [1]
TWL4030: TRY attach Slave TWL4030-ID2 on Adapter OMAP I2C adapter [1]
TWL4030: TRY attach Slave TWL4030-ID3 on Adapter OMAP I2C adapter [1]
TWL4030 Power Companion Active
<6>TWL4030: Driver registration complete.
TWL4030 GPIO Demux: IRQ Range 376 to 386, Initialization Success
Initialized TWL4030 USB module<5>SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
musb_hdrc: version 2.2a/db-0.5.2, pio, otg (peripheral+host), debug=0
musb_hdrc: USB OTG mode controller at c8800000 using PIO, IRQ 92
Time: 32k_counter clocksource has been installed.
Switched to high resolution mode on CPU 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
checking if image is initramfs...it isn't (bad gzip magic numbers);
looks like an initrd
Freeing initrd memory: 8192K
Power Management for TI OMAP.
cpuidle: using driver omap3_idle
create_proc_entry succeeded
create_proc_entry succeeded
NetWinder Floating Point Emulator V0.97 (double precision)
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
timeout waiting for frame-done interrupt
omap24xxfb: Options "<NULL>"
Console: switching to colour frame buffer device 128x48
omap24xxfb: fb0 frame buffer device
omap24xxfb: display mode 1024x768x16 hsync 22kHz vsync 28Hz<6>omap_rng
omap_rng: OMAP Random Number Generator ver. 70
OMAP Watchdog Timer Rev 0x31: initial timeout 60 sec
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing
enabled
serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
serial8250.0: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
serial8250.0: ttyS2 at MMIO 0x49020000 (irq = 74) is a ST16654
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
<6>loop: module loaded
loop: module loaded
<6>usbcore: registered new interface driver asix
usbcore: registered new interface driver asix
<6>usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver cdc_ether
<6>usbcore: registered new interface driver net1080
usbcore: registered new interface driver net1080
<6>usbcore: registered new interface driver cdc_subset
usbcore: registered new interface driver cdc_subset
<6>usbcore: registered new interface driver zaurus
usbcore: registered new interface driver zaurus
<6>Linux video capture interface: v2.00
Linux video capture interface: v2.00
<6>omap24xxvout: registered device video1 [v4l2]
omap24xxvout: registered device video1 [v4l2]
<6>omap24xxvout: registered device video2 [v4l2]
omap24xxvout: registered device video2 [v4l2]
<6>sn9c102: V4L2 driver for SN9C1xx PC Camera Controllers v1:1.47pre49
sn9c102: V4L2 driver for SN9C1xx PC Camera Controllers v1:1.47pre49
<6>usbcore: registered new interface driver sn9c102
usbcore: registered new interface driver sn9c102
<6>i2c /dev entries driver
i2c /dev entries driver
<6>omap2-nand driver initializing
omap2-nand driver initializing
<6>NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND
256MiB 1,8V 16-bit)
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND 256MiB
1,8V 16-bit)
<5>Creating 5 MTD partitions on "omap2-nand.0":
Creating 5 MTD partitions on "omap2-nand.0":
<5>0x00000000-0x00080000 : "X-Loader-NAND"
0x00000000-0x00080000 : "X-Loader-NAND"
<5>0x00080000-0x00260000 : "U-Boot-NAND"
0x00080000-0x00260000 : "U-Boot-NAND"
<5>0x00260000-0x00280000 : "Boot Env-NAND"
0x00260000-0x00280000 : "Boot Env-NAND"
<5>0x00280000-0x00780000 : "Kernel-NAND"
0x00280000-0x00780000 : "Kernel-NAND"
<5>0x00780000-0x10000000 : "File System - NAND"
0x00780000-0x10000000 : "File System - NAND"
<5>usbmon: debugfs is not available
usbmon: debugfs is not available
<6>usbcore: registered new interface driver cdc_acm
usbcore: registered new interface driver cdc_acm
<6>drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model
driver for USB modems and ISDN adapters
drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver
for USB modems and ISDN adapters
<6>Initializing USB Mass Storage driver...
Initializing USB Mass Storage driver...
<6>usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usb-storage
<6>USB Mass Storage support registered.
USB Mass Storage support registered.
<4>ether gadget: using random self ethernet address
ether gadget: using random self ethernet address
<4>ether gadget: using random host ethernet address
ether gadget: using random host ethernet address
<6>usb0: Ethernet Gadget, version: May Day 2005
usb0: Ethernet Gadget, version: May Day 2005
<6>usb0: using musb_hdrc, OUT ep1out IN ep1in STATUS ep2in
usb0: using musb_hdrc, OUT ep1out IN ep1in STATUS ep2in
<6>usb0: MAC 86:51:ab:63:44:ee
usb0: MAC 86:51:ab:63:44:ee
<6>usb0: HOST MAC da:2b:be:45:a5:29
usb0: HOST MAC da:2b:be:45:a5:29
<6>usb0: RNDIS ready
usb0: RNDIS ready
<6>musb_hdrc musb_hdrc.0: MUSB HDRC host driver
musb_hdrc musb_hdrc.0: MUSB HDRC host driver
<6>musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number
1
musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1
<6>usb usb1: configuration #1 chosen from 1 choice
usb usb1: configuration #1 chosen from 1 choice
<6>hub 1-0:1.0: USB hub found
hub 1-0:1.0: USB hub found
<6>hub 1-0:1.0: 1 port detected
hub 1-0:1.0: 1 port detected
<6>mice: PS/2 mouse device common for all mice
mice: PS/2 mouse device common for all mice
<6>usbcore: registered new interface driver usbhid
usbcore: registered new interface driver usbhid
<6>drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
<6>Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31
09:03:25 2007 UTC).
Advanced Linux Sound Architecture Driver Version 1.0.14 (Thu May 31
09:03:25 2007 UTC).
<6>OMAP3430 TWL4030 Audio Support: OMAP3430 TWL4030 Audio Support:
Chip Rev[0x2f] Initialized
Chip Rev[0x2f] Initialized
<6>audio support initialized
audio support initialized
<6>usbcore: registered new interface driver snd-usb-audio
usbcore: registered new interface driver snd-usb-audio
<6>ALSA device list:
ALSA device list:
<6> #0: TWL4030
  #0: TWL4030
<6>TCP cubic registered
TCP cubic registered
<6>NET: Registered protocol family 1
NET: Registered protocol family 1
<6>NET: Registered protocol family 17
NET: Registered protocol family 17
<6>NET: Registered protocol family 15
NET: Registered protocol family 15
<6>VFP support v0.3: VFP support v0.3: implementor 41 architecture 3
part 30 variant c rev 1
implementor 41 architecture 3 part 30 variant c rev 1
<6>cpuidle: using governor menu
cpuidle: using governor menu
<5>RAMDISK: Couldn't find valid RAM disk image starting at 0.
RAMDISK: Couldn't find valid RAM disk image starting at 0.
List of all partitions:
List of all partitions:
1f00 512 mtdblock01f00 512 mtdblock0 (driver?)
(driver?)
1f01 1920 mtdblock11f01 1920 mtdblock1 (driver?)
(driver?)
1f02 128 mtdblock21f02 128 mtdblock2 (driver?)
(driver?)
1f03 5120 mtdblock31f03 5120 mtdblock3 (driver?)
(driver?)
1f04 254464 mtdblock41f04 254464 mtdblock4 (driver?)
(driver?)
No filesystem could mount root, tried: No filesystem could mount root,
tried: ext2 ext2

<0>Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-
block(1,0)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-
block(1,0)

I'm kind of a newbie in this so I'm asking if anybody encountered
this problem and what is to do to fix it ?

Thanks !

dspman wrote:

No filesystem could mount root, tried: No filesystem could mount root,
tried: ext2 ext2

Make sure the bootargs variable is set up properly in u-boot. I didn't see enough about your SD card setup to recommend exact settings.

If you have a dual-partition setup, look for instructions that include root=/dev/mmcblk0p2

If you are using u-boot to load a filesystem to ram (in addition to uImage), look for instructions based around root=/dev/ram0

Thank you for your quick reply !

Make sure the bootargs variable is set up properly in u-boot. I didn't see
enough about your SD card setup to recommend exact settings.

My SD card is a 1G panasonic FAT32 formatted using the same HP
application recommended in the BeagleBoard wiki. No dual partition.
What is the bootargs variable ?

Thanks again !

dspman wrote:

My SD card is a 1G panasonic FAT32 formatted using the same HP
application recommended in the BeagleBoard wiki. No dual partition.
What is the bootargs variable ?

The only reference I saw to HP on Beagleboard:Main Page - eLinux.org pointed me to Google Code Archive - Long-term storage for Google Code Project Hosting. It shows two different bootargs depending on whether your filesystem is a single compressed file (.bin in their example) expanded as a ramdisk, or a full filesystem (/etc, /bin, /usr, and so on) on the mmc card. Search the page for 'setenv bootargs' if it's not jumping out at you.

Since it is a single partition card formatted as FAT, you'd need to read a ramdisk off of it, since Linux cannot practically use a FAT (or FAT32) formatted partition for the root file system (that would typically have case-sensitive content and complex file permissions).

Ok. I've restarted the whole process and repartitioned my SD card as
suggested by Jason. Doing what is described in the wiki (pointed out
by JustinLove, thank you again), I was able to get the kernel booting
and running. Now I can start the real stuff !!

Thank you all for your time and patience!

dspman