Hi guys, flashed today 8.09.2 and spent some time reading several (outdated) topics but cannot get my nslu2 booting properly, hopefully can get a hint from you guys:
When I boot my nslu2 at this stage it shows the following " df -h" :
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.4M 1.4M 0 100% /
/dev/root 1.4M 1.4M 0 100% /rom
/dev/mtdblock5 4.9M 1.1M 3.7M 23% /jffs
mini_fo:/jffs 1.4M 1.4M 0 100% /
These steps have been executed so far for Kamikaze 8.09-2
upslug2 -i openwrt-nslu2-squashfs.bin
telnet 192.168.1.1
vi /etc/config/network
config interface lan
option ifname eth0
option proto static
option ipaddr 192.168.178.77
option netmask 255.255.255.0
option gateway 192.168.178.1
vi /etc/resolv.conf
nameserver 192.168.178.1
vi /etc/hostname
passwd
/etc/init.d/network restart
Unplug LAN cable and put both pc/laptop and nslu2 on router
Open a new terminal and log in to kamikaze on new address specified
?
opkg update
opkg install e2fsprogs tune2fs fdisk kmod-usb-corekmod-usb2 kmod-scsi-core kmod-usb-storage kmod-fs-ext3
opkg remove -recursive ppp-mod-pppoe wireless-tools
vi /etc/modules.d/60-usb-storage ( for multicard readers )
scsi_mod max_sci_luns=8
sd_mod
usb-storage
dmesg to see if usb device is registered:
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb 3-2: new high speed USB device using ehci_hcd and address 2
usb 3-2: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: [sda] 1007616 512-byte hardware sectors (516 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 1007616 512-byte hardware sectors (516 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
usb-storage: device scan complete
kjournald starting. Commit interval 5 seconds
EXT3 FS on sda1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
fdisk -l ( should show /dev/sda1 )
fdisk /dev/sda
( make EXT3 partition without any swap )
reboot
umount /dev/sda1
mke2fs -j /dev/sda1
tune2fs -c0 -i0 /dev/sda1
( if reboot executed: umount -f /home )
mount -t ext3 /dev/sda1 /mnt
mkdir /tmp/root
mount -o bind /rom /tmp/root
cp /tmp/root/* /mnt -a
umount /tmp/root
umount /mnt
vi /etc/init.d/pivotroot
#!/bin/sh
boot_dev="/dev/sda1"
/sbin/hotplug2 --override -persistent --max-children 1 --no-coldplug &
for module in usbcore ehci-hcd scsi_mod usb-storage jbd ext3; do {
insmod $module
}; done
killall hotplug2
# mount the usb stick
sleep 10s
mount "$boot_dev" /mnt
# if everything looks ok, do the pivot root
[ -x /mnt/sbin/init ] && {
mount -o move /proc /mnt/proc && \
pivot_root /mnt /mnt/mnt && {
mount -o move /mnt/dev /dev
mount -o move /mnt/tmp /tmp
mount -o move /mnt/jffs /jffs 2>&-
mount -o move /mnt/sys /sys 2>&-
}
}
chmod +x /etc/init.d/pivotroot
vi /etc/init.d/rcS
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
run_scripts() {
for i in /etc/rc.d/$1*; do
[ -x $i ] && $i $2 2>&1
done | $LOGGER
}
LOGGER="cat"
[ -x /usr/bin/logger ] && LOGGER="logger -s -p 6 -t sysinit"
#
# Switch to pivoroot if available
#
if [ "$2" == "boot" -a -x /etc/init.d/pivotroot ] ; then
echo "[`date`]: Pivot root log created." > /tmp/pivotroot.log
/etc/init.d/pivotroot >> /tmp/pivotroot.log
fi
if [ "$1" = "S" ]; then
run_scripts "$1" "$2" &
else
run_scripts "$1" "$2"
fi
cat /tmp/pivotroot.log
oot@OpenWrt:~# cat /tmp/pivotroot.log
[Sun Feb 14 15:02:32 UTC 2010]: Pivot root log created.
root@OpenWrt:~#
root@OpenWrt:~# ls -last /etc/init.d/pivotroot
1 -rwxr-xr-x 1 root root 895 Feb 14 14:52 /etc/init.d/pivotroot
root@OpenWrt:~#
Like to know what I am doing wrong here as when I execute the pivotroot manually things start to roll:
root@OpenWrt:~# /etc/init.d/pivotroot
insmod: cannot insert '/lib/modules/2.6.26.8/usbcore.ko': File exists (-1): File exists
insmod: cannot insert '/lib/modules/2.6.26.8/ehci-hcd.ko': File exists (-1): File exists
insmod: cannot insert '/lib/modules/2.6.26.8/scsi_mod.ko': File exists (-1): File exists
insmod: cannot insert '/lib/modules/2.6.26.8/usb-storage.ko': File exists (-1): File exists
insmod: cannot insert '/lib/modules/2.6.26.8/jbd.ko': File exists (-1): File exists
insmod: cannot insert '/lib/modules/2.6.26.8/ext3.ko': File exists (-1): File exists
root@OpenWrt:/mnt/root# cat /tmp/pivotroot.log
[Sun Feb 14 15:02:32 UTC 2010]: Pivot root log created.
root@OpenWrt:/mnt/root#
root@OpenWrt:/mnt/root# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 470.9M 14.7M 431.9M 3% /
/dev/root 1.4M 1.4M 0 100% /mnt/rom
/dev/mtdblock5 4.9M 1.1M 3.7M 23% /mnt/jffs
mini_fo:/jffs 1.4M 1.4M 0 100% /mnt
/dev/sda1 470.9M 14.7M 431.9M 3% /
root@OpenWrt:/mnt/root#
When I don't execute steps from " vi /etc/init.d/pivotroot " and below I get:
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 1.4M 1.4M 0 100% /
/dev/root 1.4M 1.4M 0 100% /rom
/dev/mtdblock5 4.9M 1.1M 3.7M 23% /jffs
mini_fo:/jffs 1.4M 1.4M 0 100% /
/dev/sda1 470.9M 14.7M 431.9M 3% /home
root@OpenWrt:~#
All I am trying to achieve is to boot from USB Stick, write all settings and packages to USB stick instead of flash so I can build my own little system. Did things changes since 8.09.2?
Please awaiting your answers!