"RPC: sendmsg returned error 101" 解决方法

近日在开发一款DM6467的网络摄像机的程序,内核文件和NFS文件系统都是摄像机厂家发来的,但无论如何配置U-boot,MontaVista Linux始终启动不起来,启动信息如下:

Booting PSP Boot Loader Starting NAND Copy Booting Application @ 0x81080000 U-Boot 1.2.0 (Aug 19 2009 - 15:14:44) I2C: ready DRAM: 256 MB unknown vendor=0 Flash: 0 kB NAND: 128 MiB In: serial Out: serial Err: serial ARM Clock :- 297MHz DDR Clock :- 297MHz Hit any key to stop autoboot: 3  2  1  0 Loading from NAND 128MiB 3,3V 8-bit, offset 0x100000 Image Name: Linux-2.6.10_mvl401-EVM_2010_06_ Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1350212 Bytes = 1.3 MB Load Address: 80008000 Entry Point: 80008000 ## Booting image at 80700000 ... Image Name: Linux-2.6.10_mvl401-EVM_2010_06_ Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1350212 Bytes = 1.3 MB Load Address: 80008000 Entry Point: 80008000 Verifying Checksum ... OK OK Starting kernel ... Uncompressing Linux.......................................................................................... done, booting the kernel. Linux version 2.6.10_mvl401-EVM_2010_06_22T (richard@youyq) (gcc version 3.4.3 (MontaVista 3.4.3-25.0.104.0600975 2006-07-06)) #358 Wed Jul 28 15:03:17 CST 2010 CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ) CPU0: D VIVT write-back cache CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets Machine: DaVinci DM6467 DevKit Memory policy: ECC disabled, Data cache writeback DM6467 Built 1 zonelists Kernel command line: console=ttyS0,115200n8 noinitrd rw ip=dhcp root=/dev/nfs nfsroot=192.168.0.71:/home/davinci/workdir/filesys,nolock mem=96M PID hash table entries: 512 (order: 9, 8192 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: 96MB = 96MB total Memory: 94336KB available (2162K code, 574K data, 160K init) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) CPU: Testing write buffer coherency: ok spawn_desched_task(00000000) desched cpu_callback 3/00000000 ksoftirqd started up. desched cpu_callback 2/00000000 desched thread 0 started up. NET: Registered protocol family 16 DaVinci: 48 gpio irqs Registering platform device 'serial8250.0'. Parent at platform Registering platform device 'musb_hdrc'. Parent at platform Registering platform device 'nand_davinci.0'. Parent at platform DaVinci I2C DEBUG: 10:04:08 Jul 19 2010 Registering platform device 'i2c'. Parent at platform SCSI subsystem initialized usbcore: registered new driver usbfs usbcore: registered new driver hub musb_hdrc: version 2.2a/db-0.4.8 [cppi-dma] [host] [debug=0] musb_hdrc: ConfigData=0x06 (UTMI-8, dyn FIFOs, SoftConn) musb_hdrc: MHDRC RTL version 1.500 musb_hdrc: USB Host mode controller at c6800000 using DMA, IRQ 13 musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1 hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected devfs: 2004-01-31 Richard Gooch ([email protected]) devfs: boot_options: 0x1 NTFS driver 2.1.22 [Flags: R/W DEBUG]. yaffs Jul 19 2010 10:03:55 Installing. usb 1-1: new high speed USB device using musb_hdrc and address 2 watchdog: TI DaVinci Watchdog Timer: timer margin 32 sec Serial: 8250/16550 driver $Revision: 1.90 $ 3 ports, IRQ sharing disabled Registering platform device 'serial8250'. Parent at platform ttyS0 at MMIO 0x1c20000 (irq = 40) is a ST16654 ttyS1 at MMIO 0x1c20400 (irq = 41) is a ST16654 ttyS2 at MMIO 0x1c20800 (irq = 42) is a ST16654 io scheduler noop registered io scheduler anticipatory registered RAMDISK driver initialized: 8 RAM disks of 16384K size 1024 blocksize Registering platform device 'ti_davinci_emac'. Parent at platform TI DaVinci EMAC: MAC address is 00:0e:99:12:34:04 TI DaVinci EMAC Linux version updated 5.0 TI DaVinci EMAC: Installed 1 instances. i2c /dev entries driver Linux video capture interface: v1.00 elevator: using anticipatory as default io scheduler nand_davinci nand_davinci.0: Using 1-bit hardware ECC NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB 3,3V 8-bit) Scanning device for bad blocks Creating 5 MTD partitions on "nand_davinci.0": 0x00000000-0x000c0000 : "uboot" 0x000c0000-0x00100000 : "params" 0x00100000-0x00500000 : "kernel" 0x00500000-0x04500000 : "root" 0x04500000-0x08000000 : "user" nand_davinci nand_davinci.0: hardware revision: 2.2 Initializing USB Mass Storage driver... scsi0 : SCSI emulation for USB Mass Storage devices usbcore: registered new driver usb-storage USB Mass Storage support registered. mice: PS/2 mouse device common for all mice NET: Registered protocol family 2 IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 8192 bind 16384) NET: Registered protocol family 1 NET: Registered protocol family 17 Sending DHCP requests .., OK IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.0.78 IP-Config: Complete: device=eth0, addr=192.168.0.78, mask=255.255.255.0, gw=192.168.0.1, host=192.168.0.78, domain=, nis-domain=(none), bootserver=0.0.0.0, rootserver=192.168.0.71, rootpath= Looking up port of RPC 100003/2 on 192.168.0.71 Looking up port of RPC 100005/1 on 192.168.0.71 VFS: Mounted root (nfs filesystem). Mounted devfs on /dev Freeing init memory: 160K Vendor: Kingmax Model: USB2.0 FlashDisk Rev: 1100 Type: Direct-Access ANSI SCSI revision: 00 SCSI device sda: 7864320 512-byte hdwr sectors (4027 MB) sda: Write Protect is off sda: assuming drive cache: write through SCSI device sda: 7864320 512-byte hdwr sectors (4027 MB) sda: Write Protect is off sda: assuming drive cache: write through /dev/scsi/host0/bus0/target0/lun0: p1 Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0 Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0, type 0 INIT: version 2.85 booting 0 Mounting a tmpfs over /dev...done. Creating initial device nodes...cat: /proc/ide/*/media: No such file or directory cat: /proc/ide/*/media: No such file or directory done. 0 Activating swap...done. Remounting root filesystem...done. Mounting local filesystems: mount none on /var/run type tmpfs (rw) none on /tmp type tmpfs (rw,sync) Starting hotplug subsystem: usb usb [success] isapnp isapnp [success] ide ide [success] input input [success] scsi scsi [success] done. Starting portmap daemon.... RPC: sendmsg returned error 101 nfs: RPC call returned error 101 RPC: sendmsg returned error 101 nfs: RPC call returned error 101 RPC: sendmsg returned error 101 nfs: RPC call returned error 101 RPC: sendmsg returned error 101 nfs: RPC call returned error 101 RPC: sendmsg returned error 101 nfs: RPC call returned error 101 RPC: sendmsg returned error 101 nfs: RPC call returned error 101 RPC: sendmsg returned error 101 nfs: RPC call returned error 101 /etc/init.d/rcS: 72: mount: Network RPC: sendmsg returned error 101 is unreachable nfs: RPC call returned error 101 RPC: sendmsg returned error 101 nfs: RPC call returned error 101 RPC: sendmsg returned error 101

先检查了DHCP、NFS和TFTP服务都没有问题,动态IP已获取成功,NFS系统也挂上了。最后查出来是NFS文件系统中/etc/rc.d/rc.local文件中有一句:

ifconfig eth0 192.168.1.68

在挂上NFS文件系统后,将IP地址改掉了,而且是不同网段的,所以后来的网络相关服务都启动失败了。

查询了一下Linux的启动过程,读取系统引导配置文件 /etc/inittab后,会执行系统初始化脚本 /etc/init.d/rcS:

# Boot-time system configuration/initialization script. # This is run first except when booting in emergency (-b) mode. si::sysinit:/etc/init.d/rcS

rcS则会运行/etc/rc.d下的脚本,其中包括rc.local:

# Run /etc/rc.d/rc.local if it exists [ -x /etc/rc.d/rc.local ] && /etc/rc.d/rc.local

rc.local执行本地的其他启动配置。

你可能感兴趣的:(linux,image,cache,table,callback,filesystems)