I made some changes like the theme and indeed it’s persistent. The issue is that there is a localhost-live drive with 7.9GB in which all the programs and updates are installed. So there’s not enough space, despite running the --overlay-size-mb 100000 command.
The first thing I tried to install was GIMP flatpak but it couldn’t because there’s no space for it, so it’s somehow not recognizing the 100GB persistent overlay.
I’m guessing the drive itself is larger than that, but at some point the dd method was used to create the live-image so the filesystem is significantly smaller than the disk capacity. The disk will need reformatted (don’t forget to toggle the boot flag on!) to accommodate the overlay size with the live-image.
The disk may have a capacity of 1TB, but the current filesystem the live image is running on only has 7.9GB, so the overlay is invalid. You’ll need to reformat the drive and then recreate the live-image/overlay in order to make use of the rest of the disk’s capacity. Note that reformatting the drive will effectively remove any data that’s on it. If you don’t want to do this, you can also try a more surgical approach to resizing the partition with GParted, which is also available in Fedora.
Thanks. You mean to reformat the whole drive with Gparted and delete all partitions created by livecd-iso-to-disk? What filesystem should I pick? (Also, I forgot to mention the main OS on the system is Windows)
Either are options. If you have unpartitioned free space on the drive, you might try seeing if you can just resize the partition/filesystem for the live image and see if it works. I haven’t done this in over a decade but I think the overlay is thin provisioned, so that might work without needing to re-image it.
Also, have you considered just installing Fedora on the external drive out-right instead of doing a live-image? Fedora is already highly portable, especially if you don’t need proprietary nvidia drivers. Just make sure to any deselect internal drives during installation so it installs the bootloader, etc., properly on the external drive and doesn’t impact your existing stuff.
You probably shouldn’t use --format, or at least you should give it an argument, when you want to set up an external hard drive with a liveCD image that uses an overlay or a persistent home.
Using --format tells the liveCD tool to partition the destination, and without an argument it will do so based on the amount of space it needs for the current files.
However, --format accepts an argument (a size in MB, like the other partition-sizing arguments), so livecd-iso-to-disk --format 100000 --home-size-mb 500000 --overlay-size-mb 400000 Fedora___.iso /dev/sdb would set up the stick with a 100GB filesystem (more than enough room to install anything), along with a 500GB /home/ and 400GB worth of overlay space to store changes to the static root partition.
But as @vwbusguy suggested, an installed Fedora is more robust, since the overlay system adds quite a bit of overhead and should be used sparingly, not as the installation target for lots of additional software. Using a persistent ISO image really isn’t meant for long-term, general use, even on a portable drive.
If you want an installed Fedora that still uses an immutable root partition, that’s called Fedora Silverblue.
See https://fedoraproject.org/wiki/LiveOS_image.
The 7.9 GB partition comes from the rootfs.img embedded in the squashfs.img that was copied during installation to the disk. The Device-mapper overlay cannot enlarge the size of that filesystem.
When installation of large software packages is expected or long-term usage of a LiveOS image is anticipated, an alternate overlay strategy is advised. If storage or memory resources are available, one may take advantage of the --overlayfs option to livecd-iso-to-disk. This option applies a specialized OverlayFS mount to the root filesystem, which allows one to escape from the limitation of the partition size of the embedded rootfs.img (see Booting Live Images).
It’s been a long time since I’ve done it, but I used to do this with a persistent overlay using livecd-iso-to-disk. The big problem with it, is that when it ran out of allocated storage overlay space, it would break and there wasn’t a great way to know when that was going to happen.
It’s not about RAM but allocated storage on the drive. So, the live-iso portion is immutable and any changes made, such as files being written, doing a yum update, etc., gets written to an overlay that’s a designated amount of space on that drive, so it’s not just files that you write, but changes that you make apart from that base image. Once you hit the limit on that overlay allocation, it’ll stop working. That’s the bit limitation with doing it this way.
Speaking of which, if you just want an immutable Fedora, we have that option, too. You could install Silverblue directly on a USB stick without a Live ISO.