Bargepole
Posts: 5
Joined: Thu Feb 12, 2015 1:09 pm

ING + Script on a new SD Card

Thu Feb 12, 2015 1:20 pm

Hello,
I have created a SD card and got every thing up and running on the RPi..

Then I had an idea - because I am intrinsically lazy I was wondering if one could perform the following:
1) Create the image file on SD on my PC
2) add a couple of files and scripts that could be manually executed
after the systemhas booted up. I want to create a script that will - after the raspi-config and reboot has been performed - update the /etc/network/interfaces and install some programmes and perform some tasks. Ihe idea being to automatically create a WLAN and installions automatically.

Is the somehow possible?

Just an idea.

B

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

Re: ING + Script on a new SD Card

Thu Feb 12, 2015 6:07 pm

Item 2 is difficult because your PC can't read the Linux SDCard (unless it's running Linux).

Item 3 is easy because /usr/bin/raspi-config is a plain text shell script and easily modified.
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.

Bargepole
Posts: 5
Joined: Thu Feb 12, 2015 1:09 pm

Re: ING + Script on a new SD Card

Thu Feb 12, 2015 6:40 pm

Hello,

The Win PC can read the SD card after the image has been installed - at least I get the contents listed.
But since I have only one SD card at the moment I am not to keen to write a file to it to see what would happen
just in case I ruin the SD.

I'll have though that/usr/bin/ raspi-config was a non-modifiable exe. So I'll look at that aspect and add
extra lines to update the /etc/´network/interfaces .
So I'll explore both ways, the extra file to the SD card - which may well be a bit wobbly AND changing rasp-config.
That should keep me busy.

Return to “General discussion”