
On Thu, Mar 21, 2024 at 11:19:34AM -0400, Steve Petrie via talk wrote:
Hello Lennart,
Thank you for your speedy explanation that, probably the Debian live linux overlayfs mechanism is using a non-persistent tempfs ramdisk to store data written to the root filesystem.
Your explanation could also explain why some Debian packages I install, disappear every time I boot my linux PC, which is often daily. So, I sometimes find myself occasionally re-installing a disappeared Debian package.
* * * * * *
I use a live Debian linux image booted from a USB memory stick, because the original Debian 9 linux installed on the 1.8 TB hard disk, was ruined when I ran a "fix broken packages" operation, on the advice of a web page, while I was trying to install some Debian package.
This "fix" removed a zillion packages and left me with a minimal linux that would only boot to a command line.
After struggling unsuccessfully to repair the broken Debian 9 on the 1.8 TB hard drive, I landed on the solution of booting Debian 11 live from a USB memory stick. (In an earlier post to GTALUG I described how I built the USB live boot stick from a Debian 11 CD image.)
* * * * * *
I would like to explore ways to change the writeable root ovwelay filesystem, from non-persistent tempfs ramdisk, to persistent hard disk storage.
This would: (1) eliminate significant RAM consumption by the overlayfs, and (2) (presumably) eliminate the current nuisance of having Debian packages disappear, every time the linux PC is booted.
According to the df -l report (below), it looks to me like the current tempfs ramdisk providing writeable root filesystem space, could occupy up to 7.8 GB of RAM.
Right now the free command shows RAM in 1KB units: ... user@debian:~$ free total used free shared buff/cache available Mem: 16258232 1925004 10446368 1758144 3886860 12276760 Swap: 0 0 0 user@debian:~$ ...
So the linux PC has a total of 16 GB of RAM. Assuming my interpretation of the free command output is correct, the tempfs ramdisk is currently using ("shared") approximately 1.7 GB of RAM (about 10 percent of total RAM), but could (presumably) grow to consume up to 7.8 GB of RAM (per df command output). At 7.8 GB this would mean the tempfs ramdisk would consume almost 50 % of total RAM..
My Debian live linux PC occasionally crashes, with the LED on the USB live stick flashing furiously, notably when I have many Firefox browser windows open. Maybe these crashes occur when the tempfs ramdisk gobbles up lots of RAM ??
* * * * * *
According to the df -l report (below), the 1.8 TB hard drive still has 958 GB of free space available. So, moving the maximum 7.8 GB volatile tempfs overlay filesystem, from ramdisk to the 1.8 TB drive would consume only 0.81 percent (7.8 / 958) of the available space on the 1.8 TB drive.
Scary to move the tempfs overlay filesystem to a new partition on the 1.8 TB drive ??
As I was trying to discover where the overlay filesystem is mapped, I read that some of the command line tools I was using, provide ways to RE-PARTITION disk drives.
I am a VERY PARANOID ancient IT dude, who would NOT ENJOY doing some FINGERS CROSSED messing around with the partitioning on the 1.8 TB drive.
Perhaps the stress-free way to move the overlay filesystem to (permanent) hard drive space, would be to add a second huge SATA hard drive to the linux PC ??
* * * * * *
Before buying another hard drive, I would research technical details of how to tell the Debian 11 live linux, to map the overlay filesystem to a partition on the new hard drive ??
Naturally I will look into this question myself, but I would gratefully appreciate suggestions from GTALUG members :)
Well my understanding is that the Debian Live is only intended as a trial system and optionally an installer. It is not meant to be persistent at all. Now having a quick look there is a page on the debian wiki with some short instructions on how to add persistence to DebianLive. https://live-team.pages.debian.net/live-manual/html/live-manual/customizing-... It seems to explain how one can make Debian live have persistent storage on a USB key. -- Len Sorensen