Page 1 of 1

ING + Script on a new SD Card

Posted: Thu Feb 12, 2015 1:20 pm
by Bargepole
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

Re: ING + Script on a new SD Card

Posted: Thu Feb 12, 2015 6:07 pm
by DougieLawson
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.

Re: ING + Script on a new SD Card

Posted: Thu Feb 12, 2015 6:40 pm
by Bargepole
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.