Gotta script'em all!

A project log for Raspbian Squeezed

How I automate the slaughter of the Official Raspberry Pi's Debian-based OS to create reliable headless, embedded systems

Yann Guidon / YGDESYann Guidon / YGDES 09/27/2015 at 23:286 Comments

The last version was quick and dirty and as it could be expected, it has a few shortcomings. So much in fact that it's better to do it all over, it's faster than trying to fix it.

The second time I do something, I don't want to have to do it by hand a 3rd time, which is ... likely. So I make more efforts and instead of just writing things down, I simply write a set of scripts. Like in the old times of LFS :-D

The problem is that there are now 2 platforms to run (host and Pi), so 2 sets of scripts. A new challenge for me, I'll see how I'll handle that gracefully :-D

Hopefully the 2nd version will be better, faster, maybe even smaller...


I have now a set of bash scripts to safely automate the first parts, the easy ones. It runs on Linux and now uses a new trick to reduce the number of manipulations : simple data are changed or uploaded from the host computer by loop-mounting the image before it is written to Flash and booted.
The big issue is still the management of the debian/apt packages and so far this can only be done from the booted system. Similarly, the raspi-config part can't be automated yet, so more manual operations...

At least the set of scripts is modular and new steps can be added to provide more functionalities, on demand, for each project. Just "su" and run each script in order :-)


chirkoot1 wrote 10/01/2015 at 02:39 point

Thanks for update, I'm really interested in hardening it to avoid SD card corruption + disk save would be really great and keeping it light weight.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 10/01/2015 at 02:57 point

I'm still on it right now.

I'm more and more tempted by @Jarrett's suggestion with DietPi but the idea of giving up when facing adversity kicked my pride... So I found a fast 16GB SDcard and I'm trying to solve these size issues. I can't resize the new filesystem format with my host OS. Hopefully I can do it from inside the Pi...

"Hardening" happens at the last step, when the system is cleaned up and I'm not there yet. The project's page has a link to the first logs with the previous image, it shows my method, but it is still evolving :-)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 10/01/2015 at 03:40 point

resize2fs: On-line shrinking not supported

In other words, no Raspbian for you if you don't have at least a 8GB SDcard...

  Are you sure? yes | no

chirkoot1 wrote 09/30/2015 at 04:34 point


Do you have script to share?

thanks for good work

  Are you sure? yes | no

Yann Guidon / YGDES wrote 09/30/2015 at 04:41 point

Hi, I have a first set that downloads and tunes a few bits then writes to SD.

I'm working on solving a few issues with the second set (running on Pi) because my first version removed too many packages...

It takes 10x more time to script than to manipulate things directly, but it's well invested time :-)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 09/30/2015 at 08:14 point

While testing the scripts I found that the Jessie release is out

so I have to load it and restart all the tests... Sorry for the delay!

  Are you sure? yes | no