aristosv
Posts: 159
Joined: Mon Dec 08, 2014 7:47 pm

run on first boot without messing with the root partition

Sun Mar 29, 2020 1:28 pm

To enable ssh on first boot, I place a file named "ssh" on the boot partition
To enable Wi-Fi on first boot I place a file named "wpa_supplicant.conf" with my Wi-Fi configuration on it.

Is there a way to run a script on first boot, by placing it in the boot partition?

I want to run a few commands on first boot, on a clean installation, without having to mount the root partition on a Linux machine, or use ext4 readers in Windows.

Is there a way to do this?
Thanks

User avatar
DougieLawson
Posts: 38825
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: run on first boot without messing with the root partition

Sun Mar 29, 2020 2:01 pm

There isn't a way to do that.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

jahboater
Posts: 5647
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: run on first boot without messing with the root partition

Sun Mar 29, 2020 2:16 pm

aristosv wrote:
Sun Mar 29, 2020 1:28 pm
I want to run a few commands on first boot, on a clean installation, without having to mount the root partition on a Linux machine, or use ext4 readers in Windows.
If you have Windows 10, could you mount the ext4 partition in WSL ??

Or use a spare Raspberry Pi ....
Pi4 8GB running PIOS64

RonR
Posts: 1193
Joined: Tue Apr 12, 2016 10:29 pm
Location: US

Re: run on first boot without messing with the root partition

Sun Mar 29, 2020 6:07 pm

aristosv wrote:
Sun Mar 29, 2020 1:28 pm
Is there a way to run a script on first boot, by placing it in the boot partition?

I want to run a few commands on first boot, on a clean installation, without having to mount the root partition on a Linux machine, or use ext4 readers in Windows.

Is there a way to do this?

RPi-Init

Return to “General discussion”