pibakery-raspbian icon indicating copy to clipboard operation
pibakery-raspbian copied to clipboard

Ability to add custom packages prior to first boot.

Open huhlig opened this issue 8 years ago • 10 comments

Feature Request to add packages prior to the first boot so when first boot occurs the binaries can already be in place and NOT require an internet connection.

Side note: This is awesome.

huhlig avatar Sep 08 '16 06:09 huhlig

I presume you're talking about the "Install Package"block with this - although this would be a very nice feature to have, it won't work with the current block system I've got, where no block code is actually run by PiBakery rather it's all run by the Raspberry Pi.

The only workaround for now is for popular packages to make individual blocks for them that have the package included (like I did for the "VNC Server" block) which would make them run offline.

If I ever do change the block system (which is a bit unlikely as I want to try and make all new blocks compatible with previous PiBakery versions) I'll be sure to add this in.

davidferguson avatar Sep 08 '16 07:09 davidferguson

Actually I was more thinking something along the lines of using the same interface to build the image itself.

Base Install Java 8 SDK Custom Package X

it would just build the filesystem image with the scripts and packages pre installed. Leveraging QEMU where necessary.

huhlig avatar Sep 08 '16 16:09 huhlig

I've never used QEMU, although I understand what you're saying with this. It's not something I'm considering at the moment, as right not I'm concentrating on block requests, bug fixes, and adding support for Raspbian lite, but in the future I'll have a look and see if it's possible.

If, however, you have an idea of how this could be achieved, the code for the PiBakery application is also on GitHub, and you're welcome to have a play with it.

davidferguson avatar Sep 08 '16 17:09 davidferguson

@huhlig It sounds more like you're looking for https://github.com/RPi-Distro/spindle which AFAIK is what is used to build the Raspbian images found on https://www.raspberrypi.org/downloads/raspbian/

lurch avatar Sep 08 '16 17:09 lurch

It looks like Its based on this instead. Might be worth adding a new root block that can run and build a custom image. Basically you have a Initial Image block with the same things that will run the bootstrap, then first boot and every boot stuff.

huhlig avatar Sep 21 '16 17:09 huhlig

It looks like Its based on this instead.

Looks like you're right.

Might be worth adding a new root block that can run and build a custom image.

IMHO that's way way outside of the scope of PiBakery. But it's all open source, so I'm sure it'll be fascinating to see what you're able to come up with :-)

lurch avatar Sep 21 '16 17:09 lurch

IMHO that's way way outside of the scope of PiBakery. But it's all open source, so I'm sure it'll be fascinating to see what you're able to come up with :-)

Agreed, PiBakery won't ever support that unless someone else writes that for me. I'm also assuming that it doesn't work on Windows, which is the main userbase for PiBakery.

davidferguson avatar Sep 21 '16 17:09 davidferguson

I'm also assuming that it doesn't work on Windows

Indeed - spindle and pi-gen both rely on loopback-mounts and ext4 filesystems, neither of which Windows supports.

lurch avatar Sep 22 '16 10:09 lurch

A variation would be add the packages to the image and install them using dpkg, this way you could install packages without internet connection

jdevora avatar Oct 28 '16 12:10 jdevora

...but I guess for that to work reliably, PiBakery would need to be able to download and parse the APT package lists, so it could also download any packages the 'requested' package depends on? ;)

lurch avatar Oct 28 '16 12:10 lurch