gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

raw minimal pi , autorun

Wed Sep 11, 2019 6:43 am

I want to autorun the program ./first on the booting card , or the script first.sh.
In a directory where everything is free to read/write/execute.
And no user input, like passwords are required.
No HDMI,no audio,no keyboard,no mouse,no USB,no ethernet,no WIFI, no bluetooth,
no utilities, no graphics needed. Just a raw small 64-bit Ubuntu operation system that can run
programs which read and write to the current directory on SD.
The card should be accessible by Windows NTFS for creating the files "first" or first.sh
on the desktop and collecting the written data from SD later.
The LED could blink when the program or script finished or shut down
Running first.exe with wine would also be nice.
First autocompiling first.c and then running it would also be nice.
LED signal on compilation error.
----------------------------------
editing (sudo nano) /etc/xdg/lxsession/LXDE-pi/autostart
--------------------------------------
created a script for the autorun and added on the .bashrc, but the script only starts when
connecting a GUI or start new SSH session, it won't automatically start in headless mode
----------------------------------------
tried using ~/.bashrc, but that only works if I manually op
--------------------------------------
/etc/xdg/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
point-rpi
@firstfor 32-bit raspian ?

User avatar
neilgl
Posts: 958
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: raw minimal pi , autorun

Wed Sep 11, 2019 9:55 am

Ah, how is the Windows NTFS going to access the card if you have no WiFi or Ethernet?
For a headless pi to run something on startup I usually use cron. Edit crontab

Code: Select all

@reboot python /home/pi/scripts/onoff.py &
The example here runs a python script that does something forever.

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: raw minimal pi , autorun

Thu Sep 12, 2019 2:36 am

manually removing the card from the pi and inserting it into the PC with an USB-adapter

what means "headless" ?

I don't know python , just DOS , a bit Linux

PhatFil
Posts: 1368
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: raw minimal pi , autorun

Thu Sep 12, 2019 3:03 am

gsgs wrote:
Thu Sep 12, 2019 2:36 am
manually removing the card from the pi and inserting it into the PC with an USB-adapter

what means "headless" ?

I don't know python , just DOS , a bit Linux
headless refers to a puter without any direct i/o attached. No monitor or keyboard/mouse, connected to via remote access (ssh/vnc). Pi computers often run headless serving up networked services and web interfaces for access/admin examples include Node Red, Pi-Hole, Home Assistant, Open media vault, and numerous others..

If you put your Pi system sd card into a widows computer only the boot partition which is a fat partition will be visible without installing 3rd party s/w and or drivers to view/write ext2,3,4 drives..

fwiw i have downloaded and installed ext2fsd https://sourceforge.net/projects/ext2fsd/ which can read ext2,3 partitions, Stretch uses ext3 partitions, ? not sure about Buster, thats a look up for you ...

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: raw minimal pi , autorun

Thu Sep 12, 2019 8:57 am

thanks for headless explanation. But headless still has internet access ?!
------------------------------------------
"only the boot partition visible" , is that enough to read/write/execute small files
from Windows and raw-pi ?
-------------------------------------------
with my minimality sufficiency it should be easily possible to make
on that microSD-card or eMMc or SSD with micro-SD-adapter (does it exist ?)
an operation system, a small booting image and a partition/folder
that can be accessed by that "operation system" as well as "normal"
Windows,DOS,Linux from another computer.

Or not ?

fruitoftheloom
Posts: 20720
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: raw minimal pi , autorun

Thu Sep 12, 2019 9:17 am

gsgs wrote:
Thu Sep 12, 2019 8:57 am
thanks for headless explanation. But headless still has internet access ?!
------------------------------------------
"only the boot partition visible" , is that enough to read/write/execute small files
from Windows and raw-pi ?
-------------------------------------------
with my minimality sufficiency it should be easily possible to make
on that microSD-card or eMMc or SSD with micro-SD-adapter (does it exist ?)
an operation system, a small booting image and a partition/folder
that can be accessed by that "operation system" as well as "normal"
Windows,DOS,Linux from another computer.

Or not ?


As stated in your other posts, the best way to find out is to actually try it, we are all Volunteers here and do have other things going on in life than trying to decipher your rambling posts.


Though will state one thing, MS DOS / Windows NT have considerable differences to Linux. You should master Linux first on your Raspberry Pi SBC whatever Operating System it is now running.


There are better sites such as computing.net for MS DOS / Windows conundrums......

:roll:
Retired disgracefully.....

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: raw minimal pi , autorun

Thu Sep 12, 2019 9:32 am

please, don't let such posts discourage us.
I think it's an interesting and important topic for the pi-community.
Apparantly not yet addressed and solved.
The difference to the other thread "multiple pis from desktop"
is that I allow manual datatransfer by inserting and removing cards here.
Just in case the wireless thing is too difficult.
I may have posted here about similar things before in the
times of the pi2, but figured out that the pi was not competitive
at that time , so I went with ~50 Intel-Atom-X86 tablets for chess analysis.
Times have changed. The pi4B is more powerful than those now.

fruitoftheloom
Posts: 20720
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: raw minimal pi , autorun

Thu Sep 12, 2019 9:35 am

gsgs wrote:
Thu Sep 12, 2019 9:32 am
please, don't let such posts discourage us.
I think it's an interesting and important topic for the pi-community.
Apparantly not yet addressed and solved.
The difference to the other thread "multiple pis from desktop"
is that I allow manual datatransfer by inserting and removing cards here.
Just in case the wireless thing is too difficult.
I may have posted here about similar things before in the
times of the pi2, but figured out that the pi was not competitive
at that time , so I went with ~50 Intel-Atom-X86 tablets for chess analysis.
Times have changed. The pi4B is more powerful than those now.

I am an unbeliever and a sceptic !!

I am out of here..........
Retired disgracefully.....

User avatar
neilgl
Posts: 958
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: raw minimal pi , autorun

Thu Sep 12, 2019 9:48 am

Yes and an easy way to do that is install raspbian lite on a pi (no GUI or other stuff) and connect it via wifi (or ethernet cable) to your home router. It will then have internet access and other PCs / ipad / Android phone can see it over the network, and copy files to it. The pi can then "compile" that file or run a script (e.g. at boot).

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: raw minimal pi , autorun

Thu Sep 12, 2019 9:58 am

the disadvantage is that wifi has to be configured, it's probably not so easily automized.
Ethernet gives additional cables -:(
And raspian has no 64-bit for reduced computation power (~70%,I guess)

User avatar
neilgl
Posts: 958
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: raw minimal pi , autorun

Thu Sep 12, 2019 7:43 pm

WiFi configuration would be the same for all the pis (wpa_supplcant).
64 bit - depends what you are trying to run?

User avatar
rin67630
Posts: 540
Joined: Fri Mar 04, 2016 10:15 am

Re: raw minimal pi , autorun

Fri Sep 13, 2019 1:44 am

gsgs wrote:
Thu Sep 12, 2019 9:58 am
the disadvantage is that wifi has to be configured
That is easily done on the PC-readable boot partition, wpa_supplicant.conf is your friend.

User avatar
rin67630
Posts: 540
Joined: Fri Mar 04, 2016 10:15 am

Re: raw minimal pi , autorun

Fri Sep 13, 2019 1:56 am

gsgs wrote:
Thu Sep 12, 2019 9:58 am
raspian has no 64-bit for reduced computation power (~70%,I guess)
??? "64-bit for reduced computation power", can you elaborate please?

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: raw minimal pi , autorun

Fri Sep 13, 2019 3:00 am

"for" = resulting in ,
it was maybe bad English

no 64-bit ==> reduced computation pewer

User avatar
rin67630
Posts: 540
Joined: Fri Mar 04, 2016 10:15 am

Re: raw minimal pi , autorun

Fri Sep 13, 2019 9:48 am

gsgs wrote:
Fri Sep 13, 2019 3:00 am
no 64-bit ==> reduced computation pewer
Not necessarily.
2 x 32bit cores are frequently more efficient than a single 64bit core. It just depends, what you do with it.

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: raw minimal pi , autorun

Sun Sep 15, 2019 8:24 am

yes, for most purposes it doesn't presumably matter much.
But in the back of my head I had chess-analysis,
that's why I checked and compared the
pi4B(1850kn/s in Gentoo),
the odroidN2,(2400kn/s in Android,4 cores)
the Z3735 tablets (1600kn/s in Android).
And modern chess programs use bit-boards where 64bit
is almost twice as fast as 32bit.
Last edited by gsgs on Sun Sep 15, 2019 8:28 am, edited 1 time in total.

gsgs
Posts: 134
Joined: Sun Dec 13, 2015 6:48 pm
Location: Germany
Contact: Website

Re: raw minimal pi , autorun

Sun Sep 15, 2019 8:25 am

so, are any autostart images available for ARM ?
Just commandline, no graphics,no keyboard, no mouse,
no USB, no bluetooth, no Internet, no screen, no HDMI.
No file system just reading/writing raw sectors/blocks to the card.

As we could _easily_ do with DOS and autoexec.bat 30 years ago
on a 1MB floppy.

Return to “General discussion”