emon cms on rpi does not discover external harddrive????

has the automatic discovery of external usb drives been disabled in the latest image?

also it says that log are at minimal to minimize sd card wear... how to i turn it on again? my plan is to move the root file system to the external drive

 

i have done it on the pi i use for desktop and here usb drives give me a popup and i can see it with: df -h but not on the pi with emoncms

 

/bo

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

if running of the sd card no problem... but as soon i mod the the card so that  the boot partition is on the card and the rest is on the harddrive it refuses to boot....

the mod has worked for the wheezy image from raspberian... i have even mounted the card on this system in read only so there is no wear at all

 

 

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

as a fault search i replaced the pi but kept same sd card and external HDD.. runs fine so the pi itself is ok.

 

the external drive i use is a powered one so should not draw power from the pi.

 

again is there something turned off on the emon cms image that will prevent booting in this way? i might try the older image and see how that goes

Paul Reed's picture

Re: emon cms on rpi does not discover external harddrive????

Bo, I found the following to work for me, and I'm using the latest image.

1) Expand the rootfs on your SD card if you have not already done so.  $ sudo raspi-config

2) Presumably your external drive is quite large, and before starting it may be worthwhile partitioning it, so that you can use the drive for other purposes too. I partitioned my external drive as 853Gb (formattted as NTFS and is currently used as NAS), 21Gb (formatted as ext4 and used as Raspberry Pi root), and finally about 102Gb (formatted as NTFS but currently unused).

3) If you do partition your ext drive, format the new RaspPi root partition as ext4 format

4) Identify the name assigned to the partition
$ sudo fdisk -l
In my case, it was the second partition on the ext drive, so it is called sda2

5) As per article, use dd to copy the root system from your SD card (mmcblk0p2) to your new root system partition (sda2 or whatever). (However, I did this by using my laptop & cardreader, as errors can occur if copying a 'running' system & database).

6) Despite what the article say's, don't mount the new partition in fstab, it's unnecessary, just leave it as it is. (However once you get everything working OK, you can comment out the /dev/mmcblk0p2 (old SD card root) in fstab if you wish - although not necessary).

7) Finally, connect your RaspPi & ext drive, and power it up, edit the /boot/cmdline.txt as per the article, in my case root=/dev/sda2 and reboot. If your RaspPi boots OK, you should be running from the external drive.

Paul

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

hi... i ended up doing the from scratch way... now the only problem is that is says it has not recived data in last 30 sec even thou i have set my temp node to transmit every 5 sec

 

 

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

oh a reboot of theyhe pi helped now led is bliniknking every 5 sec

Paul Reed's picture

Re: emon cms on rpi does not discover external harddrive????

So is the root filesystem now running from your external drive?

Paul

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

i spoke to fast... the led is blinking but from the emon cms it sad running.. now its not

 

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

no. i still have to move the filsesystem... somethings strange here.... it cant see the external drive

doing a df  -h does not show it

Paul Reed's picture

Re: emon cms on rpi does not discover external harddrive????

Bo, my advice to you is to download the latest image from OEM, write it to your SD card, and follow my post above.

Paul

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

did i not see someone else having troulbe that the script halts pretty quickly? ie led blinks but emoncms says no data?

ext drive now shows up... so will move root filesystem and see how it goes
 

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

at the

dd if=/dev/mmcblk0p2 of=/dev/sda1 bs=512

step.

 

.. who said stron coffee :-D

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

so i edited cmdline.txt and now it will not boot ...

 

 

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

back to

/dev/mmcblk0p2

 

i think there is an issue hardware related, the ext drive does not not show up again. will look at that after a nights sleep

 

 

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

downloading latest image, hope it at least will keep the script running so i can collect  data... led still blinking...

 

i just fear i never will be able to get that ext drive working... works every where else... could it relly be that it needs a powered hub oven thou the drive are power from a 230v adapter?

Paul Reed's picture

Re: emon cms on rpi does not discover external harddrive????

Did you follow every step of my post above Bo?

Paul

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

yep... the problem with booting must be related to something hardware as that ext harddrive most of the time fails to show up.

 

how i found that: with a freash image not modded to boot from ext drive but with everything running of the ad.. i tried to plug in the drive... it blinked a bit as you would normal expect... but it does not show in the system.

if i then take that drive to this pi, which have everything usb connected via a powered hub the drive shows up every time...

now i could not sleep so i have the latest image and going to start with that then follow your guide... first thing after first boot will be checking that the drive shows up... no point in going on if it does not

Paul Reed's picture

Re: emon cms on rpi does not discover external harddrive????

The drive will only show up in $ fdisk -l    because it's not mounted.

No point in running  $ df -h  because it wont show up.

Paul

 

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

just booted of the sd card with latest image... external drive not visible with df -h

 

 

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

tried another usb cable for the drive, but still the same... but started to look at emon cms... great stuff....

 

only that my outdoor temp shows as 1700 and not 17 and battery is the same... should i divide by 100 on the emontx or can it be done on emoncms?

Paul Reed's picture

Re: emon cms on rpi does not discover external harddrive????

Bo,

1) did you read my post of 23:13hrs last night? Or the 20:09hrs post? In both posts I've advised you how to see if the drive is detected, yet you are disregarding the advice and running df instead, which obviously won't detect a unmounted partition. There is little point in posting here if you don't follow the advice given!

2) have you read the setup instructions?

Paul

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

i did read them.... the drive was not detected in any  way... and what i did to test i have done it right was to take the drive to the pi running emon cms.. it did not detect it there at all..

 

then i took the drive to this pi and it was detected right away... only difference between the 2 pi's are that this one has a powered hub where everything is connected through.

i have yet to take the powered hub to the system that runs emoncms and see if that makes a difference

now let me read those 2 posts again to make sure i did as your told...

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

the one at 00:13 i did not see at all.. must have been to tired at that time... will deff check it that way

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

you where right....... it does show up with a sudo fdisk -l

sudo  fdisk -l

Disk /dev/mmcblk0: 3980 MB, 3980394496 bytes
4 heads, 16 sectors/track, 121472 cylinders, total 7774208 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00014d34

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            8192      122879       57344    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          122880     7744511     3810816   83  Linux

Disk /dev/sda: 1000.2 GB, 1000204885504 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525167 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00014d34

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  1953523711   976760832   83  Linux
 

i just thought that stuff would auto mount, or has that been turned off?

 

will read that link for setup. have the system running off a sd for now but should be easy to transfer

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

i have poked arround in my 2 pi systems... on this one i use as desktop the external drive is not mounted either, but still the system can boot of it. its not the emoncms image but just the sd card from raspi org.

now i relly are scratching my head as why the emoncms pi cant boot off the drive, the images are not that different... or are there some components left out on the emoncms image that makes the boot process different?

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

my cmdline.txt on the desktop pi

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda1 rootfstype=ext4 elevator=deadline rootwait

 

on the emoncms its set to:

dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
 

and as discovered df -h does show the drive on either system... just makes me wonder and i cant figure whats the difference is that makes it so different

 

Paul Reed's picture

Re: emon cms on rpi does not discover external harddrive????

....'now i relly are scratching my head as why the emoncms pi cant boot off the drive'

Bo, it doesn't boot from the external drive. It boots from the SD card fat32 partition, and thereafter runs the operating system on the external drive.

You do have the SD card in the Raspberry Pi, don't you?

Paul

boelle's picture

Re: emon cms on rpi does not discover external harddrive????

Hi, sorry for the delay

 

but yes sd card in the pi... it also boots from there.... but at the point where it should start to run of the external drive it halts....

 

and i have done excatly the same on the pi i use for monitoring as i have done on this pi i use for desktop...

 

finaly i found out that it was the usb case the external drive was mounted in that was the culprit... i simply took the usb case from the desktop pi and it worked fine.... send in the case as faulty and it has just been send back, they just said it was ok, but no word on how they tested it... it did pop up fine in windows etc... even on the pi i could dd an image to the drive

 

i did that as a way of eleminating faults... so i wrote same image to hdd and sd... changed root filesystem to be hdd... it boots half way and halts where it should start reading from hdd

 

could it relly be the hdd case that is at fault? or should i look soemwhere else once i get it back?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.