ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] Re: Startup problem


From: Mr Junk
Subject: Re: [Ltib] Re: Startup problem
Date: Tue, 12 Aug 2008 17:39:17 -0700

Vadim,

Thanks for your insistence.

I specifically made a path that included /usr/bin and put it in rc.config:

address@hidden:~/work/ltib/rootfs/etc/rc.d$ more rc.conf
all_services="hostname devfsd filesystems syslog network depmod modules inetd portmap dropbear boa smb dhcpd settime qtopia watchdog" all_services_r="watchdog qtopia settime dhcpd smb boa dropbear portmap inetd modules depmod network syslog filesystems devfsd hostname"

cfg_services="hostname filesystems syslog network depmod modules inetd dropbear boa settime "

cfg_services_r=" settime boa dropbear inetd modules depmod network syslog filesystems hostname"

export PATH="/bin:/sbin:/usr/bin:/usr/sbin"

export HOSTNAME="dataprism"
export NTP_SERVER="ntp.cs.strath.ac.uk"
export MODLIST=""
export RAMDIRS=""
export TMPFS="tmpfs"
export TMPFS_SIZE="512k"
export READONLY_FS=""
export INETD_ARGS=""
export BOA_ARGS="-c /etc"
export SMBD_ARGS=""
export NMBD_ARGS=""
export DHCP_ARG=""
export DEPLOYMENT_STYLE="NFS"
export SYSCFG_DHCPC_CMD="udhcpc -b -i "
# net interface 0
export SYSCFG_IFACE0=y
export INTERFACE0="eth0"
export IPADDR0="10.0.1.190"
export NETMASK0="255.255.255.0"
--More--(91%)

The permissions for [ in /usr/bin look like this:
drwxr-xr-x  2 root   root     36K 2008-08-10 10:57 .
drwxr-xr-x 12 root   root    4.0K 2008-08-07 09:33 ..
-rwxr-xr-x  1 root   root     25K 2007-09-29 05:51 [
-rwxr-xr-x  1 root   root     351 2007-09-21 13:21 822-date
-rwxr-xr-x  1 root   root    101K 2007-12-04 01:18 a2p
-rwxr-xr-x  1 root   root     13K 2007-09-03 19:52 aconnect
-rwxr-xr-x  1 root   root     11K 2007-08-15 07:34 acpi
-rwxr-xr-x  1 root   root    3.8K 2007-09-19 02:50 acpi_fakekey

Is there a special way to copy the root partition to an SD card?

I use cp -a ~/work/ltib/rootfs/* /media/root

root is the name of the card.

I have also tried tarring the rootfs and then untarring it in the proper place in case some meta data wasn't being carried by cp.

root is UID 0 on both my Ubuntu box and on my dev board so that shouldn't be a problem.

Funny, I changed something in the ltib config and ran again and this time busybox (which can be found ) can't find rcS:

RedBoot(tm) bootstrap and debug environment [ROMRAM]
Non-certified release, version v2_0 - built 08:14:43, Aug 22 2006

Platform: Cirrus Logic EDB9302 Board (ARM920T) Rev A
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x00000000-0x02000000, 0x00041e68-0x01fdd000 available
FLASH: 0x60000000 - 0x61000000, 128 blocks of 0x00020000 bytes each.
== Executing boot script in 5.000 seconds - enter ^C to abort
RedBoot> fis load zImage
RedBoot> exec -c "console=ttyAM root=/dev/mmcblk0p1 rootdelay=5"
Using base address 0x00080000 and length 0x002095c8
Uncompressing Linux ...................................................................................................... done , booting the kernel. Linux version 2.6.24.7 (address@hidden) (gcc version 4.1.1) #3 PREEMPT Tue Aug 5 01:22:45 PDT 2008
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
Machine: Cirrus Logic EDB9302 Evaluation Board
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8016
Kernel command line: console=ttyAM root=/dev/mmcblk0p1 rootdelay=5
PID hash table entries: 128 (order: 7, 512 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 8MB 8MB 8MB 8MB = 32MB total
Memory: 29140KB available (2932K code, 268K data, 104K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 64 bytes
NET: Registered protocol family 16
ep93xx: PLL1 running at 400 MHz, PLL2 at 192 MHz
ep93xx: FCLK 200 MHz, HCLK 100 MHz, PCLK 50 MHz
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 2, 20480 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NetWinder Floating Point Emulator V0.97 (extended precision)
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered (default)
Serial: AMBA driver $Revision: 1.41 $
apb:uart1: ttyAM0 at MMIO 0x808c0000 (irq = 52) is a AMBA
console [ttyAM0] enabled
apb:uart2: ttyAM1 at MMIO 0x808d0000 (irq = 54) is a AMBA
apb:uart3: ttyAM2 at MMIO 0x808e0000 (irq = 55) is a AMBA
loop: module loaded
nbd: registered device at major 43
usbcore: registered new interface driver catc
drivers/net/usb/catc.c: v2.8 CATC EL1210A NetMate USB Ethernet driver
drivers/net/usb/rtl8150.c: rtl8150 based usb-ethernet driver v0.6.2 (2004/08/27)
usbcore: registered new interface driver rtl8150
usbcore: registered new interface driver rtl8187
Driver 'sd' needs updating - please use bus_type methods
physmap platform flash device: 01000000 at 60000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
RedBoot partition parsing not available
ep93xx-spi ep93xx-spi.0: SPI Controller initalized
ep93xx-ohci ep93xx-ohci: EP93xx OHCI
ep93xx-ohci ep93xx-ohci: new USB bus registered, assigned bus number 1
ep93xx-ohci ep93xx-ohci: irq 56, io mem 0x80020000
usb usb1: configuration #1 chosen from 1 choice
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.
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver
ep93xx-rtc ep93xx-rtc: rtc core: registered ep93xx as rtc0
i2c /dev entries driver
ep93xx_wdt: EP93XX watchdog, driver version 0.3 (nCS1 disable detected)
mmc_spi spi0.43: ASSUMING SPI bus stays unshared!
mmc_spi spi0.43: MMC/SD card detection IRQ 81 assigned.
mmc_spi spi0.43: MMC/SD card detection IRQ 82 assigned.
mmc_spi spi0.43: Serial EEPROM AT25F1024 disabled.
mmc_spi spi0.43: SD/MMC host mmc0, no DMA, no poweroff
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 10
NET: Registered protocol family 17
NET: Registered protocol family 15
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
ieee80211: 802.11 data/management/control stack, git-1.1.13
ieee80211: Copyright (C) 2004-2005 Intel Corporation <address@hidden > ep93xx-rtc ep93xx-rtc: setting system clock to 1970-01-01 00:00:14 UTC (14)
Waiting 5sec before mounting root device...
mmc0: new SD card on SPI
mmcblk0: mmc0:0000 SA01G 995328KiB
 mmcblk0: p1
kjournald starting.  Commit interval 5 seconds
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
EXT3 FS on mmcblk0p1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem).
Freeing init memory: 104K
init started:  BusyBox v1.1.3 (2008.08.12-05:30+0000) multi-call binary
Bummer, could not run '/etc/rc.d/rcS': No such file or directory


        Welcome to Freescale Semiconductor Embedded Linux Environment

(none) login: root
Password:
Jan  1 00:01:00 login[166]: root login  on `ttyAM0'

login: cannot run /bin/sh: No such file or directory


        Welcome to DataPrism Embedded Linux Environment

(none) login:


Notice that when I log in it can't find /bin/sh either, and I can see that /etc/rc.d/rcS is there with proper permissions.

These are the directories from the card:

address@hidden:/media/root$ l
total 68K
drwxr-xr-x 17 root root 4.0K 2008-08-11 23:34 .
drwxr-xr-x  5 root root 4.0K 2008-08-12 17:32 ..
drwxr-xr-x  2 root root 4.0K 2008-08-11 23:30 bin
drwxr-xr-x  2 root root 4.0K 2004-08-13 07:37 boot
drwxr-xr-x  6 root root 4.0K 2008-08-11 21:50 dev
drwxr-xr-x  5 root root 4.0K 2008-08-11 23:30 etc
drwxr-xr-x  2 root root 4.0K 2002-05-06 06:00 home
drwxr-xr-x  3 root root 4.0K 2008-08-11 22:34 lib
lrwxrwxrwx  1 root root   11 2008-08-11 23:32 linuxrc -> bin/busybox
drwxr-xr-x  7 root root 4.0K 2008-08-11 21:50 mnt
drwxr-xr-x  2 root root 4.0K 2002-05-06 06:01 opt
drwxr-xr-x  2 root root 4.0K 2002-05-06 05:59 proc
drwxr-xr-x  2 root root 4.0K 2004-08-13 07:39 root
drwxr-xr-x  2 root root 4.0K 2008-08-11 19:23 sbin
drwxr-xr-x  2 root root 4.0K 2005-06-13 02:09 sys
drwxrwxrwt  3 root root 4.0K 2004-08-13 07:39 tmp
drwxr-xr-x 13 root root 4.0K 2008-08-11 19:35 usr
drwxr-xr-x 11 root root 4.0K 2008-08-11 22:34 var

address@hidden:/media/root/etc$ l
total 152K
drwxr-xr-x  5 root root 4.0K 2008-08-11 23:30 .
drwxr-xr-x 17 root root 4.0K 2008-08-11 23:34 ..
lrwxrwxrwx  1 root root   13 2008-08-11 23:32 boa.conf -> conf/boa.conf
-rw-r--r--  1 root root   49 2008-08-11 22:34 busybox.conf
drwxr-xr-x  2 root root 4.0K 2008-08-11 21:50 conf
-rw-r--r--  1 root root 5.3K 2006-11-01 07:35 devfsd.conf
drwxr-xr-x  2 root root 4.0K 2008-08-11 19:33 dropbear
-rw-r--r--  1 root root    0 2000-01-12 15:18 exports
-rw-r--r--  1 root root  738 2006-04-26 07:37 fstab
-rw-r--r--  1 root root  652 2005-06-13 04:03 group
-rw-r--r--  1 root root   17 2004-08-13 07:56 host.conf
-rw-r--r--  1 root root  269 2007-06-18 06:37 hosts
-rw-r--r--  1 root root  161 2004-08-13 07:57 hosts.allow
-rw-r--r--  1 root root  347 2004-08-13 07:57 hosts.deny
-rw-r--r--  1 root root 3.6K 2005-11-28 07:19 inetd.conf
-rw-r--r--  1 root root  202 2008-08-11 21:50 inittab
-rw-r--r--  1 root root  709 2004-08-13 07:57 inputrc
-rw-r--r--  1 root root   58 2008-08-11 21:52 issue
-rw-r--r--  1 root root   59 2008-08-11 21:52 issue.net
-rw-r--r--  1 root root  239 2008-08-11 21:50 ltib-release
-rw-r--r--  1 root root  13K 2005-03-15 06:01 mime.types
-rw-r--r--  1 root root 1.2K 2002-07-22 06:31 nsswitch.conf
-rw-r--r--  1 root root 1.6K 2005-09-30 07:48 passwd
-rw-r--r--  1 root root  289 2004-08-13 07:58 printcap
-rw-r--r--  1 root root   62 2005-06-10 09:43 profile
-rw-r--r--  1 root root 2.6K 2002-05-06 06:11 protocols
drwxr-xr-x  3 root root 4.0K 2008-08-11 22:34 rc.d
-rw-r--r--  1 root root   24 2002-04-29 07:36 resolv.conf
-rw-r--r--  1 root root  122 2006-04-26 07:35 securetty
-rw-r--r--  1 root root 5.8K 2002-05-06 06:15 services
-r--r--r--  1 root root 1.1K 2006-04-26 07:35 shadow
-rw-r--r--  1 root root   93 2002-07-19 10:04 shells
-rw-r--r--  1 root root 1.9K 2007-06-05 05:39 sysctl.conf
-rw-r--r--  1 root root 3.0K 2006-11-01 07:35 udhcpd.conf
-rw-r--r--  1 root root 4.0K 2008-08-11 19:34 wgetrc

address@hidden:/media/root/etc/rc.d$ l
total 32K
drwxr-xr-x 3 root root 4.0K 2008-08-11 22:34 .
drwxr-xr-x 5 root root 4.0K 2008-08-11 23:30 ..
drwxr-xr-x 2 root root 4.0K 2008-08-11 22:34 init.d
-rw-r--r-- 1 root root 1.1K 2008-08-12 17:22 rc.conf
-rwxr-xr-x 1 root root  259 2008-08-11 21:50 rc.local
-rwxr-xr-x 1 root root   18 2000-05-01 14:56 rc.modules
-rwxr-xr-x 1 root root  797 2006-02-09 03:43 rcS
-rwxr-xr-x 1 root root   18 2000-05-01 14:56 rc.serial

address@hidden:/media/root/bin$ l
total 5.6M
drwxr-xr-x  2 root root 4.0K 2008-08-11 23:30 .
drwxr-xr-x 17 root root 4.0K 2008-08-11 23:34 ..
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 addgroup -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 adduser -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 ash -> busybox
-rwsr-xr-x  1 root root 716K 2008-08-11 22:34 busybox
-rwxr-xr-x  1 root root 119K 2008-08-11 19:23 cat
-rwxr-xr-x  1 root root 225K 2008-08-11 19:23 chgrp
-rwxr-xr-x  1 root root 214K 2008-08-11 19:23 chmod
-rwxr-xr-x  1 root root 228K 2008-08-11 19:23 chown
-rwxr-xr-x  1 root root 276K 2008-08-11 19:23 cp
-rwxr-xr-x  1 root root 223K 2008-08-11 19:23 date
-rwxr-xr-x  1 root root 189K 2008-08-11 19:23 dd
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 delgroup -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 deluser -> busybox
-rwxr-xr-x  1 root root 214K 2008-08-11 19:23 df
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 dmesg -> busybox
-rwxr-xr-x  1 root root 107K 2008-08-11 19:23 echo
lrwxrwxrwx  1 root root    4 2008-08-11 23:32 egrep -> grep
-rwxr-xr-x  1 root root  98K 2008-08-11 19:23 false
lrwxrwxrwx  1 root root    4 2008-08-11 23:32 fgrep -> grep
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 getopt -> busybox
-rwxr-xr-x  1 root root 371K 2008-08-11 19:32 grep
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 gunzip -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 gzip -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 hostname -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 ipaddr -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 iplink -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 iproute -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 kill -> busybox
-rwxr-xr-x  1 root root 142K 2008-08-11 19:23 ln
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 login -> busybox
-rwxr-xr-x  1 root root 383K 2008-08-11 19:23 ls
-rwxr-xr-x  1 root root 138K 2008-08-11 19:23 mkdir
-rwxr-xr-x  1 root root 119K 2008-08-11 19:23 mknod
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 mktemp -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 more -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 mount -> busybox
-rwxr-xr-x  1 root root 310K 2008-08-11 19:23 mv
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 netstat -> busybox
-rwxr-xr-x  1 root root 101K 2008-08-11 19:20 ntpclient
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 ping -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 ps -> busybox
-rwxr-xr-x  1 root root 122K 2008-08-11 19:23 pwd
-rwxr-xr-x  1 root root 230K 2008-08-11 19:23 rm
-rwxr-xr-x  1 root root 107K 2008-08-11 19:23 rmdir
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 run-parts -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 sed -> busybox
-rwxr-xr-x  1 root root 134K 2008-08-11 22:35 sh
-rwxr-xr-x  1 root root 132K 2008-08-11 19:23 sleep
-rwxr-xr-x  1 root root 156K 2008-08-11 19:23 stty
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 su -> busybox
-rwxr-xr-x  1 root root 105K 2008-08-11 19:23 sync
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 tar -> busybox
-rwxr-xr-x  1 root root 177K 2008-08-11 19:23 touch
-rwxr-xr-x  1 root root  98K 2008-08-11 19:23 true
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 umount -> busybox
-rwxr-xr-x  1 root root 105K 2008-08-11 19:23 uname
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 usleep -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 vi -> busybox
lrwxrwxrwx  1 root root    7 2008-08-11 23:32 zcat -> busybox


Thanks for spending the effort to stay on this with me.

Best,
Mark Lacas

On Aug 12, 2008, at 2:30 PM, Vadim Lebedev wrote:

Mark

Sorry to insist?

But Did you check permissions on /usr/bin/[ and are you sure that it is in the $PATH at this moment?
On some systems /usr/bin is not in PATH at the boot


Thanks
Vadim


Le 12 août 08 à 23:13, Mr Junk a écrit :

Vadim,

Thanks for the idea.

I had already checked that to make sure, and [ was where it was supposed to be and operational.

After that, just to make sure, I had LTIB rebuild the rootfs from scratch to make sure everything was virgin.

No good news yet.

I tried copying a rootfs from another dev board onto the sd card and that one worked perfectly with my kernel and everything else.

It seems this is only happening with the rootfs generated by LTIB.

Never seen anything like this before.

Still diggin.
ml

On Aug 12, 2008, at 10:14 AM, Vadim Lebedev wrote:

Mark,

Please check that you have /usr/bin/[    installed

Thanks
Vadim

Mr Junk wrote:
Stuart,
It is vanilla ext3 and can be be read and written fine by both the dev board and the host system when moving files to it.

Very weird that the kernel can call /sbin/init to get busy box working but then can't span the fs to get other stuff.

It does find and run rcS, the failure is finding and running [.

If I comment out the line using [ the script run to the next level.

Weird.

Hoped for some silver bullet.  I'll keep digging.

Thanks for the response with all you email load.

I hope you had a great time in the Alps, very beautiful and wonderful place to be.

I miss them.

Best,
ml





On Aug 12, 2008, at 1:29 AM, Stuart Hughes wrote:

Hi Mark,

The only educated guess I can give is that there's some kind of problem
with the SD card driver related to the filesystem.

Regards, Stuart


On Tue, 2008-08-12 at 00:20 -0700, Mr Junk wrote:
Hello,

My kernel compiles and runs fine.

My rootfs compiles and builds fine

My kernel starts up, finds the rootfs and starts init (busybox) fine,
but then these errors occur in rcS:

It seems that the "test" [ is not being found in /usr/bin. . .I added
a path statement in rcS with no change.

aiting 5sec before mounting root device...
mmc0: new SD card on SPI
mmcblk0: mmc0:0000 SA01G 995328KiB
mmcblk0: p1
kjournald starting.  Commit interval 5 seconds
EXT3 FS on mmcblk0p1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem).
Freeing init memory: 104K
/etc/rc.d/rcS: /etc/rc.d/rcS: 14: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 24: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 29: [: not found
/etc/rc.d/rcS: /etc/rc.d/rcS: 37: [: not found

Has anyone ever seen this before?

Any clues?

Thanks,
ml






_______________________________________________
LTIB home page: http://bitshrine.org

Ltib mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/ltib












reply via email to

[Prev in Thread] Current Thread [Next in Thread]