Automated building of images

Talk about the project itself, the community, where we are and what we need. Great place to introduce yourself and make friends as well.

Automated building of images

Postby Tenzer » Fri Feb 20, 2015 10:00 pm

Yesterday I got my first ARM machine, a Raspberry Pi 2, and after trying out OpenELEC on it just to compare the performance of it against my existing Nvidia ION machine, I wanted to get Arch Linux installed for playing around with it some more. When I saw in the installation instructions that it required me to write an EXT file system, I figured that wasn't going to happen on my Macbook laptop, at least not directly, so I ended up making a dd-able image on my Arch Linux server.

This made me however think that other people perhaps would like to be able to just download a dd-able image, either to quickly try out Arch Linux, or perhaps just to save the hassle of having to build the image yourself, in order to get to the interesting part: configuring the applications on the system.

I can see images previously was made available from the Raspberry Pi website and there are some opinions on why official dd-able images shouldn't be provided. I do however think that there's some value in providing ready images, especially for new users who just want to try it out, even though the images will have to come with a disclaimer regarding them not being officially supported, and users will have to expand the file system to take up the entire SD card.

From what I can see, it should be a fairly simple job of setting up an automated system to build the images, whenever a new file system version has been pushed to the mirrors it will trigger a script which updates the images.

This is something I would enjoy setting up and maintaining and would be a way for me to contribute to the project, but the question is if it's something there is a need for and if it perhaps already exists but I just haven't come across it yet?
Posts: 2
Joined: Fri Feb 20, 2015 9:12 pm

Re: Automated building of images

Postby WarheadsSE » Sat Feb 21, 2015 2:53 am

There is no way to make these, in this fashion, as of yet.

We do have tarball creation, and per-device alterations down to a science however. As for doing what you speak of, we're not against it, directly. That disclaimer should be in bold, and we expect you to take full responsibility for it, the contents of all images, and the correctness of those contents.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
Posts: 6799
Joined: Mon Oct 18, 2010 2:12 pm

Re: Automated building of images

Postby Tenzer » Sat Feb 21, 2015 12:06 pm

My plan was to set up shell scripts for each tarball type, which generates a new image file when a tarball is updated. Basically something like running this (for the Raspberry Pi 2):

Code: Select all
truncate --size 1G arm.img
sfdisk --force arm.img <<EOF
# partition table of arm.img
unit: sectors

 arm.img1 : start=     2048, size=   204800, Id= c
 arm.img2 : start=   206848, size=  1890304, Id=83
 arm.img3 : start=        0, size=        0, Id= 0
 arm.img4 : start=        0, size=        0, Id= 0
DEVICE=$(sudo losetup --partscan --find --show arm.img)
sudo mkfs.vfat ${DEVICE}p1
sudo mkfs.ext4 ${DEVICE}p2
mkdir boot root
sudo mount ${DEVICE}p1 boot
sudo mount -o noatime ${DEVICE}p2 root
curl --location | sudo bsdtar -xpf - -C root
sudo mv root/boot/* boot/
sudo umount boot root
sudo losetup --detach ${DEVICE}
gzip -1 arm.img

And then make the resulting image available for download. With a proper disclaimer, and probably a link to a source repository where the scripts are hosted, I think it could be a usable service.
Posts: 2
Joined: Fri Feb 20, 2015 9:12 pm

Return to Community

Who is online

Users browsing this forum: No registered users and 1 guest