Hello
i try to install MH on new DC01. Login with Putty ok, then:
[root@isharing ~]# mount | fgrep USB
/dev/sdb1 on /media/USB1-P1 type vfat (rw,relatime,utf8,dmask=000,fmask=111)
[root@isharing ~]# sh /media/USB1-P1/setup.sh
USB stick mounted as /media/USB1-P1.
Error: No target drive found.
Has someone an idea of that issue ?
Many thanks for your help
Manfred
Setup DC01 with Corsair 30 GB SSD: No Target Drive
Moderator: Mattk
-
- Junior Boarder
- Posts: 36
- Joined: Sun Jan 29, 2012 12:36 pm
Re: Setup DC01 with Corsair 30 GB SSD: No Target Drive
I had the same problem.
At the moment i am on the road without access to my computer but:
Edit the seconde time where it checks for the disk, take out the exit or stop command.
Everything works fine then. I think Linux version of THE dc01 (there are different ones) behaves differently with different disks.
Succes
At the moment i am on the road without access to my computer but:
Edit the seconde time where it checks for the disk, take out the exit or stop command.
Everything works fine then. I think Linux version of THE dc01 (there are different ones) behaves differently with different disks.
Succes
-
- Junior Boarder
- Posts: 36
- Joined: Sun Jan 29, 2012 12:36 pm
Re: Setup DC01 with Corsair 30 GB SSD: No Target Drive
i take out the exit 1 now the script continues, but see no HD:
[root@isharing ~]# fdisk -l
Disk /dev/sda: 30.0 GB, 30016659456 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a6b21
Device Boot Start End Blocks Id System
[root@isharing ~]# sh /media/USB1-P1/setup.sh
USB stick mounted as /media/USB1-P1.
Error: No target drive found.
cat: /sys/class/block//device/model: No such file or directory
cat: /sys/class/block//size: No such file or directory
expr: syntax error
expr: syntax error
Target drive found: ( MB)
Press any key to start setup of target drive...
Copying data to target drive... done
System will shut down. Please wait until power LED
turns off. Detach USB stick and power on again.
[root@isharing ~]# fdisk -l
Disk /dev/sda: 30.0 GB, 30016659456 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a6b21
Device Boot Start End Blocks Id System
[root@isharing ~]# sh /media/USB1-P1/setup.sh
USB stick mounted as /media/USB1-P1.
Error: No target drive found.
cat: /sys/class/block//device/model: No such file or directory
cat: /sys/class/block//size: No such file or directory
expr: syntax error
expr: syntax error
Target drive found: ( MB)
Press any key to start setup of target drive...
Copying data to target drive... done
System will shut down. Please wait until power LED
turns off. Detach USB stick and power on again.
Re: Setup DC01 with Corsair 30 GB SSD: No Target Drive
If the script does not recognize the SSD and you are sure it is "/dev/sda", then replace the "exit 1" by "TARGET=sda".
This sets traget drive manually and the rest of the script should run fine.
I have no clue, why automatic drive detection das not work here.
This sets traget drive manually and the rest of the script should run fine.
I have no clue, why automatic drive detection das not work here.
Re: Setup DC01 with Corsair 30 GB SSD: No Target Drive
I updated "setup.sh" script to allow for a manually defined target drive as optional parameter.
In the case above parameter would be 'sda'.
In the case above parameter would be 'sda'.
Code: Select all
#!/bin/sh
DIR=`dirname "$0"`
echo "USB stick mounted as ${DIR}."
if [ -n "$1" ]
then
TARGET=$1
else
if [ "`cat /sys/class/block/sda/removable`" = "0" ]
then
TARGET=sda
else
if [ "`cat /sys/class/block/sdb/removable`" = "0" ]
then
TARGET=sdb
else
if [ "`cat /sys/class/block/sdc/removable`" = "0" ]
then
TARGET=sdc
else
echo "Error: No target drive found."
echo "Check if target drive is correctly installed and try again."
echo "If error persists and you know the name of the target device,"
echo "call \"sh $0 sdx\" where 'sdx' stands for target device name."
exit 1
fi
fi
fi
fi
MODEL="`cat /sys/class/block/$TARGET/device/model`"
BLOCKS="`cat /sys/class/block/$TARGET/size`"
SIZEKB=`expr $BLOCKS / 2`
SIZEMB=`expr $SIZEKB / 1024`
echo "Target drive found: $MODEL ($SIZEMB MB)"
echo -n "Press any key to start setup of target drive..."
read
umount /dev/$TARGET /dev/${TARGET}1 /dev/${TARGET}2 /dev/${TARGET}4 2>/dev/null
if [ -f $DIR/mhdc01.gz ]
then
echo -n "Copying data to target drive... "
zcat $DIR/mhdc01.gz | dd if=/dev/stdin of=/dev/$TARGET bs=1M >/dev/null 2>/dev/null
echo "done"
echo "System will shut down. Please wait until power LED "
echo "turns off. Detach USB stick and power on again. "
echo ""
echo "On power-on Meteohub will continue setup process."
echo "Please be patient, system will shut down again, "
echo "when setup of Meteohub is complete (approx. 3 minutes)."
echo ""
echo "After that Meteohub shuts down again and is ready"
echo "to use. When you power up Meteohub, the power LED"
echo "will signal its IP by a sequence of purple blinks and"
echo "will finally switch to steady purple, which tells you"
echo "that the system is fully operational and that you can"
echo "login to web interface (user and password 'meteohub')."
sync
shutdown -h now
else
echo "Error: cannot find file $DIR/mhdc01.gz"
exit 1
fi
exit 0
-
- Junior Boarder
- Posts: 36
- Joined: Sun Jan 29, 2012 12:36 pm
Re: Setup DC01 with Corsair 30 GB SSD: No Target Drive
Now:
/media/USB1-P1/setup.sh: line 62: syntax error: unexpected end of file
[root@isharing ~]# line 62: syntax error: unexpected end of file
Thank you
/media/USB1-P1/setup.sh: line 62: syntax error: unexpected end of file
[root@isharing ~]# line 62: syntax error: unexpected end of file
Thank you
Re: Setup DC01 with Corsair 30 GB SSD: No Target Drive
hm, may be a copy&paste error? Attached you find a downloadable and zipped version of "setup.sh" which should do ok.
- Attachments
-
- setup.zip
- (1.04 KiB) Downloaded 400 times
-
- Junior Boarder
- Posts: 36
- Joined: Sun Jan 29, 2012 12:36 pm
Re: Setup DC01 with Corsair 30 GB SSD: No Target Drive
ok now its working, thank you for fast Support.
How much is license for DC01? 59 Euro for Standart HW?
Manfred
How much is license for DC01? 59 Euro for Standart HW?
Manfred