当前位置: 技术问答>linux和unix
内核加载文件系统失败?(帮顶有分)
来源: 互联网 发布时间:2016-07-03
本文导语: 我在配置内核时,设置initrd,并且设置了文件系统路径,因此生成的内核镜像,还包括了一个文件系统在里面。 我的启动脚本是: set serverip 192.168.1.11; set ipaddr 192.168.1.12; set bootargs root=/dev/ram rw ip=192.168.1.12::::...
我在配置内核时,设置initrd,并且设置了文件系统路径,因此生成的内核镜像,还包括了一个文件系统在里面。
我的启动脚本是:
set serverip 192.168.1.11;
set ipaddr 192.168.1.12;
set bootargs root=/dev/ram rw ip=192.168.1.12::::motfcc0:off console=ttyS1,115200
tftp 0xf00000 cdma-cpio.dtb
tftp 0x500000 uImage
bootm 0x500000 - 0xf00000
结果启动内核的时候,到了VFS文件系统加载,就出问题了(前面的打印信息供参考,主要是最后一句):
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Bytes transferred = 1427317 (15c775 hex)
## Booting image at 00500000 ...
Image Name: Linux-2.6.21.7-EMBSYS-CGEL-3.06.
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1427253 Bytes = 1.4 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using the fdt at 0xf00000
Loading Device Tree to 007fc000, end 007fd73a ... OK
Using MPC8572 PC machine description
Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.21.7-EMBSYS-CGEL-3.06.10.P2.F0.B2 (guoqixin@zte-guoqixin) (gcc
version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP PREEMPT Wed Sep 16 11:35:51 2
009
setup_arch: bootmem
mpc85xx_ds_setup_arch()
Found MPC85xx PCI host bridge at 0x00000000ffe08000. Firmware bus number: 0->255
Found MPC85xx PCI host bridge at 0x00000000ffe09000. Firmware bus number: 0->255
Found MPC85xx PCI host bridge at 0x00000000ffe0a000. Firmware bus number: 0->255
MPC85xx PC board from Freescale Semiconductor
arch: exit
Zone PFN ranges:
DMA 0 -> 131072
Normal 131072 -> 131072
HighMem 131072 -> 131072
early_node_map[1] active PFN ranges
0: 0 -> 131072
Built 1 zonelists. Total pages: 130048
system bbx : start(phy)=0x72b000 ,start(vir)=0xc072b000 , size = 0x5ffc
Kernel command line: root=/dev/ram rw console=ttyS0,115200
mpic: Setting up MPIC " OpenPIC " version 1.2 at ffe40000, max 2 CPUs
mpic: ISU size: 108, shift: 7, mask: 7f
mpic: Initializing for 108 sources
hwtimer: Added openpic_timer (PowerPC kernel OpenPIC timer) at index=0
PID hash table entries: 2048 (order: 11, 8192 bytes)
Using MPC8572 PC machine description
Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.21.7-EMBSYS-CGEL-3.06.10.P2.F0.B2 (guoqixin@zte-guoqixin) (gcc
version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP PREEMPT Wed Sep 16 11:35:51 2
009
Found MPC85xx PCI host bridge at 0x00000000ffe08000. Firmware bus number: 0->255
Found MPC85xx PCI host bridge at 0x00000000ffe09000. Firmware bus number: 0->255
Found MPC85xx PCI host bridge at 0x00000000ffe0a000. Firmware bus number: 0->255
MPC85xx PC board from Freescale Semiconductor
Zone PFN ranges:
DMA 0 -> 131072
Normal 131072 -> 131072
HighMem 131072 -> 131072
early_node_map[1] active PFN ranges
0: 0 -> 131072
Built 1 zonelists. Total pages: 130048
system bbx : start(phy)=0x72b000 ,start(vir)=0xc072b000 , size = 0x5ffc
Kernel command line: root=/dev/ram rw console=ttyS0,115200
mpic: Setting up MPIC " OpenPIC " version 1.2 at ffe40000, max 2 CPUs
mpic: ISU size: 108, shift: 7, mask: 7f
mpic: Initializing for 108 sources
hwtimer: Added openpic_timer (PowerPC kernel OpenPIC timer) at index=0
PID hash table entries: 2048 (order: 11, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 516096k/524288k available (2848k kernel code, 7780k reserved, 88k data,
150k bss, 160k init)
Mount-cache hash table entries: 512
mpic: requesting IPIs ...
Processor 1 found.
Synchronizing timebase
Got ack
score 299, offset 1000
score 299, offset 500
score 299, offset 250
score 299, offset 125
score 299, offset 62
score 299, offset 31
score 299, offset 15
score 299, offset 7
score -299, offset 3
score -299, offset 5
score -149, offset 6
Min 6 (score -151), Max 7 (score 299)
Final offset: 6 (297/300)
Brought up 2 CPUs
NET: Registered protocol family 16
PCI: Probing PCI hardware
Generic PHY: Registered new driver
NET: Registered protocol family 2
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 786432 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
audit: initializing netlink socket (disabled)
audit(1.240:1): initialized
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Time: timebase clocksource has been installed.
Generic RTC Driver v1.07
Macintosh non-volatile memory driver v1.1
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO map 0xffe04500 mem 0xe1004500 (irq = 42) is a 16550A
serial8250.0: ttyS1 at MMIO map 0xffe04600 mem 0xe1006600 (irq = 42) is a 16550A
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
Copyright (c) 1999-2006 Intel Corporation.
Gianfar MII Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0a
eth0: Running with NAPI enabled
eth0: 256/256 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0b
eth1: Running with NAPI enabled
eth1: 256/256 RX/TX BD ring size
eth2: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0c
eth2: Running with NAPI enabled
eth2: 256/256 RX/TX BD ring size
eth3: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0d
eth3: Running with NAPI enabled
eth3: 256/256 RX/TX BD ring size
Vitesse VSC8244: Registered new driver
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
/cygdrive/d/KIDE/target/kernel-version/cgel3.0/linux/drivers/rtc/hctosys.c: unab
le to open rtc device (rtc0)
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Rebooting in 180 seconds..
我的启动脚本是:
set serverip 192.168.1.11;
set ipaddr 192.168.1.12;
set bootargs root=/dev/ram rw ip=192.168.1.12::::motfcc0:off console=ttyS1,115200
tftp 0xf00000 cdma-cpio.dtb
tftp 0x500000 uImage
bootm 0x500000 - 0xf00000
结果启动内核的时候,到了VFS文件系统加载,就出问题了(前面的打印信息供参考,主要是最后一句):
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Bytes transferred = 1427317 (15c775 hex)
## Booting image at 00500000 ...
Image Name: Linux-2.6.21.7-EMBSYS-CGEL-3.06.
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 1427253 Bytes = 1.4 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using the fdt at 0xf00000
Loading Device Tree to 007fc000, end 007fd73a ... OK
Using MPC8572 PC machine description
Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.21.7-EMBSYS-CGEL-3.06.10.P2.F0.B2 (guoqixin@zte-guoqixin) (gcc
version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP PREEMPT Wed Sep 16 11:35:51 2
009
setup_arch: bootmem
mpc85xx_ds_setup_arch()
Found MPC85xx PCI host bridge at 0x00000000ffe08000. Firmware bus number: 0->255
Found MPC85xx PCI host bridge at 0x00000000ffe09000. Firmware bus number: 0->255
Found MPC85xx PCI host bridge at 0x00000000ffe0a000. Firmware bus number: 0->255
MPC85xx PC board from Freescale Semiconductor
arch: exit
Zone PFN ranges:
DMA 0 -> 131072
Normal 131072 -> 131072
HighMem 131072 -> 131072
early_node_map[1] active PFN ranges
0: 0 -> 131072
Built 1 zonelists. Total pages: 130048
system bbx : start(phy)=0x72b000 ,start(vir)=0xc072b000 , size = 0x5ffc
Kernel command line: root=/dev/ram rw console=ttyS0,115200
mpic: Setting up MPIC " OpenPIC " version 1.2 at ffe40000, max 2 CPUs
mpic: ISU size: 108, shift: 7, mask: 7f
mpic: Initializing for 108 sources
hwtimer: Added openpic_timer (PowerPC kernel OpenPIC timer) at index=0
PID hash table entries: 2048 (order: 11, 8192 bytes)
Using MPC8572 PC machine description
Memory CAM mapping: CAM0=256Mb, CAM1=256Mb, CAM2=0Mb residual: 0Mb
Linux version 2.6.21.7-EMBSYS-CGEL-3.06.10.P2.F0.B2 (guoqixin@zte-guoqixin) (gcc
version 4.1.2 20070626 (Red Hat 4.1.2-14)) #1 SMP PREEMPT Wed Sep 16 11:35:51 2
009
Found MPC85xx PCI host bridge at 0x00000000ffe08000. Firmware bus number: 0->255
Found MPC85xx PCI host bridge at 0x00000000ffe09000. Firmware bus number: 0->255
Found MPC85xx PCI host bridge at 0x00000000ffe0a000. Firmware bus number: 0->255
MPC85xx PC board from Freescale Semiconductor
Zone PFN ranges:
DMA 0 -> 131072
Normal 131072 -> 131072
HighMem 131072 -> 131072
early_node_map[1] active PFN ranges
0: 0 -> 131072
Built 1 zonelists. Total pages: 130048
system bbx : start(phy)=0x72b000 ,start(vir)=0xc072b000 , size = 0x5ffc
Kernel command line: root=/dev/ram rw console=ttyS0,115200
mpic: Setting up MPIC " OpenPIC " version 1.2 at ffe40000, max 2 CPUs
mpic: ISU size: 108, shift: 7, mask: 7f
mpic: Initializing for 108 sources
hwtimer: Added openpic_timer (PowerPC kernel OpenPIC timer) at index=0
PID hash table entries: 2048 (order: 11, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 516096k/524288k available (2848k kernel code, 7780k reserved, 88k data,
150k bss, 160k init)
Mount-cache hash table entries: 512
mpic: requesting IPIs ...
Processor 1 found.
Synchronizing timebase
Got ack
score 299, offset 1000
score 299, offset 500
score 299, offset 250
score 299, offset 125
score 299, offset 62
score 299, offset 31
score 299, offset 15
score 299, offset 7
score -299, offset 3
score -299, offset 5
score -149, offset 6
Min 6 (score -151), Max 7 (score 299)
Final offset: 6 (297/300)
Brought up 2 CPUs
NET: Registered protocol family 16
PCI: Probing PCI hardware
Generic PHY: Registered new driver
NET: Registered protocol family 2
IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
TCP established hash table entries: 65536 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 7, 786432 bytes)
TCP: Hash tables configured (established 65536 bind 65536)
TCP reno registered
audit: initializing netlink socket (disabled)
audit(1.240:1): initialized
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Time: timebase clocksource has been installed.
Generic RTC Driver v1.07
Macintosh non-volatile memory driver v1.1
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO map 0xffe04500 mem 0xe1004500 (irq = 42) is a 16550A
serial8250.0: ttyS1 at MMIO map 0xffe04600 mem 0xe1006600 (irq = 42) is a 16550A
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
Copyright (c) 1999-2006 Intel Corporation.
Gianfar MII Bus: probed
eth0: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0a
eth0: Running with NAPI enabled
eth0: 256/256 RX/TX BD ring size
eth1: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0b
eth1: Running with NAPI enabled
eth1: 256/256 RX/TX BD ring size
eth2: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0c
eth2: Running with NAPI enabled
eth2: 256/256 RX/TX BD ring size
eth3: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0d
eth3: Running with NAPI enabled
eth3: 256/256 RX/TX BD ring size
Vitesse VSC8244: Registered new driver
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
/cygdrive/d/KIDE/target/kernel-version/cgel3.0/linux/drivers/rtc/hctosys.c: unab
le to open rtc device (rtc0)
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Rebooting in 180 seconds..
|
这个没错的哇,我们基本都这么写的,不知道是不是initrd要设一下的
我们一般的bootargs 是console=ttyS0,115200n8 initrd=2g,1 root=/dev/ram
|
会不会是硬盘驱动问题
现在硬盘都是串口的,所以内核要配置SATA那块
现在硬盘都是串口的,所以内核要配置SATA那块