problem with script running at boot

Started by RFranta, January 03, 2015, 07:25:20 PM

Previous topic - Next topic

RFranta

Hi!

I made a python script that copy one file from sd-card part that has just 16mb and uImage file and save it to main part of sd.
Script works as it should when running from terminal, it copy the desired file from that small part of sd to desired location.
I want this script run at boot so I put the execute command in /etc/rc.local. But I found that it work only when
the file that has to be copied is in the bigger part of sd card (part that has all folders like home, network, etc) not when the file is copied from the sd part with uImage file. But I really need the file to be copied from this part of the SD on the boot. What can be the problem?

I tried to change privileges by CHMOD, I tried to do the same by cron. Nothing works.

Thanks for all answers!

Gerrit

It does not work because that partition is not mounted at the moment you want to copy the file, adding an entry in /etc/fstab should do the trick, first create the /mnt/p1 directory

/dev/mmcblk0p1 /mnt/p1 auto defaults 0 0

RFranta

Hi,

thanks for answer, I tried that, first time problem was that after changes you suggested the small part of SD wasn't mounted at all when I changed the code to mmcblk0p2 that part of sd was mounted again but dont know if thats a good solution. But that script doesnt work still so I dont know whats the problem yet.


RFranta

Now I found that it works. I just didnt realized that sd is now mounted in the /mnt folder not /media like before :)

Thank you very much for your help!