PDA

View Full Version : wl500gx: keeps mounting hd, including swap partition on /tmp/harddisk...



jensm
31-07-2007, 20:38
Hi,

I have some experience with the wl500gx, and have had it running with various drives for a while. Now, for some reason, I can't get the drive partitions set up as I want them to.


/usr/local/sbin/post-boot:

#!/bin/sh
dropbear
# wait for /opt to mount

mount /dev/discs/disc0/part2 /opt
mount /dev/discs/disc0/part3 /tmp/harddisk
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done

killall stupid-ftpd

# Activate swap
swapon /dev/discs/disc0/part1

# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung


Whatever I do the, the result remains:


[admin@wl500gx root]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2880 2880 0 100% /
/dev/discs/disc0/part2 60733 4127 53470 7% /opt
/dev/discs/disc0/part3 2006752 371200 1635552 18% /tmp/harddisk
/dev/discs/disc0/part1 2006752 371200 1635552 18% /tmp/harddisk
[admin@wl500gx root]$

I.e., the swap partition on part1 is mounted on /tmp/harddisk along with a data partition, which obviously messes things up.

The usb drive is partitioned as follows:


[admin@wl500gx root]$ fdisk -l /dev/discs/disc0/disc

Disk /dev/discs/disc0/disc: 2055 MB, 2055208960 bytes
16 heads, 32 sectors/track, 7840 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

Device Boot Start End Blocks Id System
/dev/discs/disc0/part1 1 64 16368 82 Linux swap
/dev/discs/disc0/part2 65 309 62720 83 Linux
/dev/discs/disc0/part3 310 7840 1927936 83 Linux
[admin@wl500gx root]$


I suspect that something is wrong with the router, as I have had problems with several disks, doing things that "used to work". I have tried soft and hard reset to defaults, installing stock Asus FW and then going back to Oleg.

Any ideas, before I cast myself into the arms of OpenWRT?

Thanks a lot,

Jens

jensm
02-08-2007, 09:12
I've built filesystems and swap on the partitions without error messages.

/Jens

jensm
03-08-2007, 22:49
I recreated partitions and file systems on an Ubuntu box. It works now, though I have no idea why.

/Jens