NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
ewidance
Oct 15, 2017Aspirant
RNDP2210 ReadyNas Pro 2 failed to boot : ERROR: Could not find internal flash host!
Hello Everybody;
I own a RNDP2210 who suddently stopped to boot properly. I've attached a serial console and saw :
SYSLINUX 3.31 v1.07 Tue Feb 15 11:31:02 PST 2011 0078 Copyright (C) 1994-2005 H. Peter Anvin Debug Serial Port Enabled Normal FactoryDefault OSReinstall TechSupport SkipVolCheck MemoryTest TestDisks Loading 18 1B NETGEAR ReadyNAS 09/08/2010 ReadyNAS-ProUltra2 V1.4 kernel............................................................. Loading initrd.gz.............................Ready. ▒sky2 0000:01:00.0: Fall back to sk98lin instead. sky2 0000:03:00.0: Fall back to sk98lin instead. Starting the boot process... Loading kernel modules...done Bringing up RAID arrays...done Bringing up network...done searching for boot flash host.............ERROR: Could not find internal flash host! Extracting supplemental utilities...searching for boot flash host.............ERROR: Could not find internal flash host! /bin/ash: can't access tty; job control turned off
I already tried USB recovery with no luck. It boots on my USB Key, but after kernel and initrd load, mounting of external flash device also fails :
SYSLINUX 3.73 2009-01-25 Copyright (C) 1994-2008 H. Peter Anvin 0078 Loading kernel............................................ Loading initrd.gz...........................................ready. ▒Searching for external boot flash device...Could not find external boot flash! ERROR: Could not find external flash device!! /bin/ash: can't access tty; job control turned off
To fo further, surpringly, /dev/ does not shows sdx1 devices. I have to wait at least 30s and type "mdev -s" to make internal flash appears as an sda1 device. If i try to mdev before the 30s, device is not listed.
So i mounted it on /tmp/sda1 : "mkdir /tmp/sda1; mount /dev/sda1 /tmp/sda1" to see what happens.
# ls LDLINUX.SYS initrd.gz memtest supplmnt.tlz version.txt csums.md5 kernel root.tlz syslinux.cfg vpd
All boot files à there. I also tried to put in place files extracted from RAIDiator-x86-4.2.31 :
dd if=RAIDiator-x86-4.2.31 bs=16384 skip=1 2>/dev/null | tar x
Unfortunately, init from the normal boot is a binary, and i'm not able to see how it works and what fails.
I'm a little bit more lucky with USB recovery boot, who is in text mode :
#!/bin/sh
# $Revision: 1.2 $
DBG="/dev/null"
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devpts devpts /dev/pts
echo 3 > /proc/sys/kernel/printk
mdev -s
SYSTYPE=$(awk '/model[^a-z]*:/ { if($3==21) print "NVX"; else print "NV6"; exit; }' /proc/cpuinfo)
if [ $SYSTYPE = "NV6" ]; then
# 3100/3200/4200 don't have a Marvell NIC
awk '{ if($2 ~ "11ab.*") exit 1; }' /proc/bus/pci/devices
if [ $? -eq 0 ]; then
if grep -q 3100 /sys/class/dmi/id/product_version; then
SYSTYPE=3100
elif grep -q 4200v2 /sys/class/dmi/id/product_version; then
SYSTYPE="3200V2"
else
SYSTYPE=3200
fi
fi
# Ultra 2
if grep -q 808627c1 /proc/bus/pci/devices; then
SYSTYPE="ULTRA2"
fi
fi
# Reuseable functions
show_error() {
echo "ERROR: ${1}!"
/bin/ash
sleep 300
poweroff -f
}
find_boot_device() {
echo -n "Searching for internal boot flash device..."
for i in `seq 1 60`; do
# This should be the path for the internal USB port
if [ $SYSTYPE = "NV6" ]; then
DEV_PATH=/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host*/target*/*/block/*
elif [ $SYSTYPE = "NVX" -o $SYSTYPE = "ULTRA2" ]; then
DEV_PATH=/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-1/1-1:1.0/host*/target*/*/block/*
elif [ $SYSTYPE = "3100" ]; then
DEV_PATH=/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1:1.0/host*/target*/*/block/*
elif [ $SYSTYPE = "3200" ]; then
DEV_PATH=/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-4/2-4:1.0/host*/target*/*/block/*
elif [ $SYSTYPE = "3200V2" ]; then
DEV_PATH=/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.5/2-1.5:1.0/host*/target*/*/block/*
else
echo "I do not know the internal boot flash location!"
DEV_PATH="*"
break
fi
BOOT_FLASH=$(basename $DEV_PATH)
grep -q ${BOOT_FLASH}$ /proc/partitions && break
usleep 250000
done
if [ "$BOOT_FLASH" = "*" ]; then
echo "Did not find boot flash!"
show_error "Could not find internal flash device!"
fi
mdev -s
echo "$BOOT_FLASH"
BOOT_FLASH="/dev/${BOOT_FLASH}"
}
find_external_boot_device() {
echo -n "Searching for external boot flash device..."
for i in `seq 1 60`; do
# This should be the path for the front USB port
for sd in /sys/block/sd?; do
EXTERNAL_FLASH=$(basename $sd)
echo $BOOT_FLASH | grep -q $EXTERNAL_FLASH && continue
if grep -q ${EXTERNAL_FLASH}1 /proc/partitions; then
mdev -s
if ! mount -t vfat /dev/${EXTERNAL_FLASH}1 /sysroot >/dev/null 2>/dev/null; then
rm -f /dev/${EXTERNAL_FLASH}1
continue
fi
IMAGE=`ls /sysroot/RAIDiator-x86-* 2>/dev/null | head -n1`
if [ ! -s "$IMAGE" ]; then
umount /sysroot
continue
fi
break
fi
done
[ -s "$IMAGE" ] && break
usleep 250000
done
if [ $i -eq 60 ]; then
echo "Could not find external boot flash!"
show_error "Could not find external flash device!"
fi
umount /sysroot
echo "$EXTERNAL_FLASH"
EXTERNAL_FLASH="/dev/${EXTERNAL_FLASH}"
}
update_flash() {
MD5SUM=$(dd if=$IMAGE bs=16384 count=1 2>/dev/null | grep -a info:: | sed -e 's/.*md5sum=//' -e 's/,.*//')
if ! [ "$MD5SUM" = "`dd if=$IMAGE bs=16384 skip=1 2>/dev/null | md5sum | awk '{ print $1 }'`" ]; then
show_error "flash image checksum does not match!"
fi
cd /tmp/flash
dd if=$IMAGE bs=16384 skip=1 2>/dev/null | tar x || show_error "OS image extraction failed!"
rm -rf bios loader
mount -t msdos ${BOOT_FLASH}1 /boot_flash
if ! [ -s "syslinux.cfg" ]; then
cp /sysroot/syslinux.cfg .
fi
if [ $SYSTYPE = "NVX" ]; then
rm -f kernel
mv kernel.up kernel
else
rm -f kernel.up
fi
cp * /boot_flash || show_error "could not update flash device!"
umount /boot_flash
cd /
}
write_flash() {
find_external_boot_device
find_boot_device
if mount -t msdos ${BOOT_FLASH}1 /boot_flash; then
mkdir /tmp/flash
cp /boot_flash/vpd /tmp/flash/
umount /boot_flash
fi
echo "Formatting USB boot flash device..."
mkdiskimage $BOOT_FLASH
blockdev --rereadpt $BOOT_FLASH
mdev -s
mkdosfs ${BOOT_FLASH}1 > /dev/null
syslinux ${BOOT_FLASH}1
# Copy back VPD as first order
mount -t msdos ${BOOT_FLASH}1 /boot_flash
[ -f /tmp/flash/vpd ] && cp /tmp/flash/vpd /boot_flash/
umount /boot_flash
echo -e "\ndone"
mount -t vfat ${EXTERNAL_FLASH}1 /sysroot || show_error "could not mount external flash"
IMAGE=`ls /sysroot/RAIDiator-x86-* | head -n1`
[ -s "$IMAGE" ] || show_error "no source flash image found"
echo -n "Writing internal USB boot flash device..."
update_flash
echo "done"
}
netup() {
udhcpc -q -n -i eth0
udhcpc -q -n -i eth1
}
write_flash
poweroffSYSTYPE is beeing detected as an ULTRA2.
In "find_external_boot_device", my front usb key is not detected.
In "find_boot_device", internal flash is not detected.
if i play with mdev -s, at least 30 seconds after boot, internal flash is detected. I decided to format erxternally and copy RAIDiator-x86-4.2.31, then mount it on readynas. This allowed me to carefully reformat and rebuild internal flash, typing line by line all necessary stuff (save vpd, mkdiskimage, mkdosfs, syslinux, restore vpd then extract and copy files RAIDiator-x86-4.2.31).
This did not changed anything, always the "ERROR: Could not find internal flash host!"
Dear Gurus, any ideas? Just in case, you'll find below dmesg output (with USB recovery booted).
1 Reply
Replies have been turned off for this discussion
- ewidanceAspirant
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!