Install additional packages to other partition

Hi,

The factory image for Raspberry PI4 comes with only 104MB, which is not enough at all. I don’t like exroot solution or expand the partition after firmware upgraded, because I have to do it every time I upgrade the firmware. I wonder if there is a way to install user packages to another partition. For example, I have 16GB SD card and there are plenty room left after firmware upgrade.

Is it possible?

What's wrong with extroot ?

You can use owut to create a custom image, where the rootfs is 1GB.

1 Like

extroot is always a quite major complication in regards to upgrades, I personally avoid it at all costs.

Using the imagebuilder to (always!) set a different partition size (and including the packages you'd normally install at runtime) would be my way out of this -- if you really need all that much stuff (it's a router, not a general purpose server - but I do know that f2fs has an enormous fs overhead on a 104 MB fs, so…).

--
…and mere data goes into a dedicated partition.

1 Like

I also have a pi4b. What works best for me is when first setting up the sd card I do the normal dd=if and once that's done I fire up kde partition manager to expand the 104mb partition to 1024. Then I create a new partition in the unused free space of the sd card for storing extra junk. Finally after I get the pi up and running I set the owut to keep the root partition at 1024mb after an upgrade.
Probably there is better/easier ways to automate this but I am not super technical and this works for me, which is what matters.

In /etc/opkg.conf you can add 3rd source for packages.

Nothing wrong with exroot, just tried to do this every time.

owut seems good idea, never use it, will give a try. Thanks

Yes, I use image builder in the past, it just takes too long to build.

I just wonder how the factory image was built, can the person responsible for PI4 image set default rootfs to 512M instead of 104?

I think owut is good idea

I have opkg.conf:

dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
option check_signature

You mean I can add a line “dest” to some directory?

After install owut and update AttendedSysupgrade package to latest version, I am able to set rootfs_size to 470M in /etc/config/attendedsysupgrade:

config server 'server'
	option url 'https://sysupgrade.openwrt.org'

config client 'client'
	option upgrade_packages '1'
	option auto_search '0'
	option advanced_mode '1'

config owut 'owut'
	option rootfs_size '470'

and then I am able to use AttendedSysupgrade to build image with all needed packages. Upgrade went smoothly from v23 to v24. Thanks all!

1 Like

Then I create a new partition in the unused free space of the sd card for storing extra junk.

  • My extra junk partition got wiped during owut upgrade. Does anyone knows if there is a way to prevent it from happening?

Image builder or full compilation?
Because image builder does not need one minute when using a nvme or tmpfs. (If you have the packages downloaded already)

This one bothers me too, I backup the partition before upgrading, then I re-create partition and restore the data after upgrading.

I have NVME disk, but compiling still takes hours. If there is error, compiling needs to be re-initialized.

The image builder does not compile source to binary it just compiles all binarys into a firmware image. And this just takes one minute..it's the same thing used as the other upgrade helper so use.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.