MIHIR SHAH
Posts: 1
Joined: Thu Aug 18, 2016 4:42 pm

Raspberry Pi Boot Time Running

Thu Aug 18, 2016 4:55 pm

Hello,

Please help me to resolve this problem. I have done boot time running programming in Raspberry Pi Model B+. I have made ".SH" file in /etc/init.d. And it works properly. But now i have purchased raspberry pi 2 model B. In this raspberry i have to install new raspbian operating system because old is not working. Now that same program which i have done in Raspberry pi model B+ for boot time running is not working in this my new raspberry pi. .SH file is not working even that program is totally same. Please help me for this problem.

Thank You and Regards.

hal8000
Posts: 187
Joined: Fri Oct 04, 2013 5:22 pm

Re: Raspberry Pi Boot Time Running

Sun Aug 21, 2016 7:18 pm

Posting like this makes your post unanswerable.

You need to copy and paste the contents of your shell script so
that someone can see what your scipt is doing and what you
are trying to measure.

"Boot time running" is not a standard term, so I'm going to
interpret this as "measure the boot time". If thats not what you
mean then try posting again.

In Debian Jessie, the standard image for Pi Model 2, the boot process
now uses SystemD. System D loads boot services in parallel, You can
measure the boot time from a terminal with:

Code: Select all

systemd-analyze
To find out what services take longest time use

Code: Select all

systemd-analyze blame

User avatar
CarlRJ
Posts: 599
Joined: Thu Feb 20, 2014 4:00 am
Location: San Diego, California

Re: Raspberry Pi Boot Time Running

Mon Aug 22, 2016 2:11 am

hal8000 wrote:"Boot time running" is not a standard term, so I'm going to interpret this as "measure the boot time". If thats not what you mean then try posting again.
I'm guessing the OP is simply looking to have a script run at boot time, to start some service; I don't think measurements enter into it.

Mihir, please post the full path of the exact filename of your file you are having trouble with, the contents of the file, and any error messages that may be showing up in the logs (at a minimum, try "sudo fgrep your_script_name /var/log/syslog" to see if anything appears). Then we may be able to help - as it is, there's not enough information in your post.

If your script is at least getting started in the boot process, you can add a line like this near the top, to get a better idea what is going wrong (assuming it's written in sh or bash):

Code: Select all

exec >/tmp/debug_output 2>&1
Then reboot the system, and see if anything interesting shows up in the file /tmp/debug_output.

klricks
Posts: 6852
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Raspberry Pi Boot Time Running

Mon Aug 22, 2016 2:21 am

hal8000 wrote:....."Boot time running" is not a standard term, so I'm going to
interpret this as "measure the boot time". ....
I think this is what the OP is asking...
The OP wants to auto-start a script program at boot time. The OP had it working with Raspbian Wheezy on an old RPi but now can't get it working with Raspbian Jessie on a new RPi 2.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Raspberry Pi Boot Time Running

Mon Aug 22, 2016 7:29 am

Matt Hawkins wrote a nice page on how to run a script on boot with the "new" systemd method in Jessie...

http://www.raspberrypi-spy.co.uk/2015/1 ... g-systemd/
Alex Eames RasPi.TV, RasP.iO

Return to “General discussion”