GizmoB73
Posts: 80
Joined: Fri Jan 27, 2012 12:51 pm

Re: How to make some initial setup scripts?

Tue Apr 17, 2012 2:16 pm

As a relative noob to Linux and the Pi, I find myself starting with yet another fresh SD Card image of Debian on the Pi.

I seem to always start by editing the /etc/apt/sources.list file to add in some extra repo's.

Then I install some packages, which will probably grow with time.

This is a very tedious and repetitive process, so I was wondering if I could keep some of these files on my local NAS and perhaps run a script from which will copy them onto the Pi and run install stuff?

Perhaps I will have to do a wget or something to get a script onto the Pi in the first place, and then run it to pull down more files from the NAS and install things?

Anyway, I was wondering what the simplest recommended process would be?

Thanks

Gary

User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: How to make some initial setup scripts?

Tue Apr 17, 2012 3:01 pm

using a USB HDD as a shared repository for use by multiple SD card images is a nice idea - I may well set something up similar.

It just needs a bit of thought around image names on the SD cards and a directory structure set up on the HDD.
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: How to make some initial setup scripts?

Tue Apr 17, 2012 3:19 pm

Or, once you have an SD card with everything on it you want, dump it using DD to an image on a PC somewhere. Then when you reimage your SD card you use your own custom image.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: How to make some initial setup scripts?

Tue Apr 17, 2012 3:42 pm

James:

I think the idea is that you might have lots of different images - different distros, different this, different that - but they will all end up having a lot in common.  So, it is not just a question of fixing one particular SD card image.

I find this sort of phenomenon in my dealings in setting up any sort of OS.  For example, the first thing I do on any Windows system is install VIM.  The second thing I do is install a bunch of tools - ZIP, UNZIP, etc.  I have often thought it would be nice if I didn't have to do this over and over - every time I start working on a new/different Windows installation.  Having it all on some server (or even a portable hard disk) and just being able to hook up to it, would be very nice.  My reading of the OP is along these lines.

P.S.  The above is also true with Linux - bunch of stuff I need to install on Linux to make it usable.  And (on both/all systems), of course, there is all the system settings (environment variables, etc) - which are actually more intractable than just plain files.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

GizmoB73
Posts: 80
Joined: Fri Jan 27, 2012 12:51 pm

Re: How to make some initial setup scripts?

Tue Apr 17, 2012 3:54 pm

JamesH said:


Or, once you have an SD card with everything on it you want, dump it using DD to an image on a PC somewhere. Then when you reimage your SD card you use your own custom image.



I have done that a bit, but I am using 8GB SD Cards and that can take up a lot of space with multiple images.  Also, what I was trying to achieve was a really clean install.  Just the base image plus some specific tried and tested files and commands.

I had also thought about the USB thumb drive/HDD option although I have been having stability issues with them recently.  This may be due to the fact I have just discovered that I was running at 3.9v across TP1 and TP2.  After I have re-rigged my power arrangements that might be an option again, but I am sure there must be a smarter option that the Linux guru's are aware of?

Return to “Beginners”