Bekijk de volledige versie : Router is not responding on restart with usb drive
Hi,
My router stops responding after a reboot. The activity lights are still on but I cant connect to ssh/telnet, even the setup page won't load.
This only happens if the external usb drive is plugged in.
If I remove the usb drive then replug the router, It works properly.
I can only use the router + usb drive again if I remove the swap and opt partition then reinstall all the packages from the start.
When i plug the same usb drive on my ubuntu computer the drive is working properly.
I'm running wl500g premium on oleg + wdc 500gb essentials.
This setup is working properly before.
Need help Thanks.
Hi,
Could you post your post-boot script here..
Maybe it waits and waits for the mounting of the drive,
(I have the exact same drive and never had problems with it.)
Im using the posted post-boot on wengi's guide (http://wl500g.info/showthread.php?t=10307).
modified to use with usb hdd and a fourth partition.
I'm thinking that this problem started after I've added the mount for a fourth partition.
something like
mount /dev/discs/disc0/part3 /mnt
mount /dev/discs/disc0/part4 /tmp/harddisk
btw: is it ok to mount at /mnt?
I cant post the exact post-boot file now because I'm at work now and accessing ssh remotely. Ive issued a reboot then I can't access ssh anymore.
I'll post the post-boot file later when i got home.
Thanks much, at least I have a new lead now on what is causing this problem.
btw: is it ok to mount at /mnt?
Yep, that's ok, I've mounted my data partition to /mnt also.
What you can do is this.
disable the post-boot file (flush al it's contents except the dropbear command), flash/reboot,
login,
and then start entering the commands which were in the post-boot file manually in the console, This should give you a lead, which commands work, and which don't/give you an error.
One last question... (and I have a feeling this is it, )
is your post-boot script executable ? Because you're telling me that after a reboot you cannot login with SSH (and the post-boot starts the dropbear which is needed for SSH). otherwise, chmod +x your post-boot, and don't forget to flash/reboot after this.
If this is the case you still should be able to login using telnet, not ssh.
HTH
Thanks, I'm getting a lot of progress here. Just a little more...
I've modified post-boot to just
#!/bin/sh
# Start SSH service
dropbear
And issued the commands one line at a time.
I'm having errors on.
mount /dev/discs/disc0/part4 /tmp/harddisk
As there is no /tmp/harddisk on reboot. (is that normal?, there was before.)
Everything works now and I can even reboot properly, except i need to run the commands again manually.
Some more clues,
here are my old post-boot:
#!/bin/sh
# Start SSH service
dropbear
# test if USB disc has been attached
# if not - then insert needed modules
if [ ! -d /dev/discs ]
then
insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fi
# Wait for /opt to mount
mount /dev/discs/disc0/part2 /opt
mount /dev/discs/disc0/part3 /mnt
mount /dev/discs/disc0/part4 /tmp/harddisk
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
# Activate swap
swapon /dev/discs/disc0/part1
#to let midnight commander run on terminals, make alias for colored mc
echo "export TERMINFO=/opt/share/terminfo">>/etc/profile
echo "alias mc=\"mc -c\"">>/etc/profile
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
Using my old post-boot, when I reboot the router with the usb-hdd plugged-in and try to connect to ssh quickly, I can manage to enter my username and password then issue at least one command before the router stops responding.
Also using the old post-boot, when i reboot with no usb-hdd plugged in, the operation is normal (except for the missing packages), then I'll plug the usb-hdd. When the usb-hdd starts spinning thats when the router then stops responding.
This also happens, even if the /opt partition is empty.
I think there is something in the issued commands on my old post-boot that does that. As it doesn't happens now when using the post-boot with dropbear only.
Another question:
Does the usb-hdd auto mounts to the router?
I'm thinking thats where the router stops responding when i'm using the old post-boot.
Thanks ^^
Hi,
in your old post-boot file, part 3, 4 aren't mounted properly., you should place them outside the mountig of /opt
mount them after you've activated the swap.
so cut the lines
mount /dev/discs/disc0/part3 /mnt
mount /dev/discs/disc0/part4 /tmp/harddisk
and paste them under
# Activate swap
swapon /dev/discs/disc0/part1
so I took your old post-boot file and modified it to something that should work in your situation
#!/bin/sh
dropbear
# test if USB disc has been attached
# if not - then insert needed modules
#
# uncoment the following 4 lines if using an USB HDD.
if [ ! -d /dev/discs ]
then
insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fi
#Wait for /opt to mount
mount /dev/discs/disc0/part2 /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done
# Activate swap
swapon /dev/discs/disc0/part1
#mount /data shares
mount /dev/discs/disc0/part3 /mnt
mount /dev/discs/disc0/part4 /tmp/harddisk
#to let midnight commander run on terminals, make alias for colored mc
echo "export TERMINFO=/opt/share/terminfo">>/etc/profile
echo "alias mc=\"mc -c\"">>/etc/profile
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
Thanks raas,
It's working properly now. I just have to add mkdir /tmp/harddisk before the mount, I dont know why /tmp/harddisk is missing. But it works now.
Thanks.
Thanks raas,
It's working properly now. I just have to add mkdir /tmp/harddisk before the mount, I dont know why /tmp/harddisk is missing. But it works now.
Thanks.
Hi,
yeah.. happend to me one time, don't know either why /tmp/harddisk is missing.
what you could do, is create the folder and then a flash/reboot, then it should survive a reboot.
But I'm happy to hear it's working now.