This is a consequence of PnP. So, it's normal behavior.If I make any changes and have to reboot the box, sometimes one of the drive is mounted under /tmp/harddisk/part1 and other times it's /tmp/harddisk/part2.
IMHO you can do the following:
I'm not aware of the method how you can avoid automounting, therefore let it go through, after that in post-boot you unmount everything what was automounted (you may simply use all possible combinations of disc/part)
Then make some attempt and analyse result, and mount all the needed in the right places
So, finally you'll get something like this in your post-boot:
I haven't tested this script, so it might need some tune up.PHP Code:
#!/bin/sh
dropbear
insmod scsi_mod 2> /dev/null && insmod sd_mod && insmod usb-storage
#Wait for hdd to spin-up
sleep 15s
umount /dev/discs/disc0/part1 2> /dev/null
umount /dev/discs/disc0/part2 2> /dev/null
umount /dev/discs/disc0/part3 2> /dev/null
umount /dev/discs/disc1/part1 2> /dev/null
umount /dev/discs/disc1/part2 2> /dev/null
umount /dev/discs/disc1/part3 2> /dev/null
# Let's make an attempt
if [ swapon /dev/discs/disc0/part1 2> /dev/null ] ;
then
mount /dev/discs/disc0/part2 /opt
mount /dev/discs/disc0/part3 /tmp/harddisk
mount /dev/discs/disc1/part1 /tmp/harddisk/part1
else
swapon /dev/discs/disc1/part1
mount /dev/discs/disc1/part2 /opt
mount /dev/discs/disc1/part3 /tmp/harddisk
mount /dev/discs/disc0/part1 /tmp/harddisk/part1
fi
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
Especially check that all partitions are really unmounted.