Plop Forum

General Category => Plop Linux => Topic started by: The_Raven on August 04, 2026, 10:09:26 AM

Title: copy2ram broken in Plop 26.2
Post by: The_Raven on August 04, 2026, 10:09:26 AM
Hello

copy2ram script is broken in Plop 26.2.
The problem is this line:
mem_kb=$(free | grep Mem | cut -b 30-40)This should be changed to:
mem_kb=$(free | grep Mem | cut -b 35-45)
It is always problematic to "cut" the command. It would be better to "awk" it:
mem_kb=$(free | grep Mem | awk '{print $4}')
But "awk" is not part of busybox. And simply copy it to the initramfs does also not work because of missing librarys.
I am not sure how to fix it smoothly.  ::)
Title: Re: copy2ram broken in Plop 26.2
Post by: cloakedboing on September 22, 2026, 09:58:22 AM
Yeah, using awk would definitely be cleaner, but I see the problem with adding it to the initramfs. Hopefully there's a simple BusyBox-compatible way to handle the memory value without relying on fixed character positions.
Title: Re: copy2ram broken in Plop 26.2
Post by: Elmar on September 24, 2026, 08:08:39 AM
Quote from: cloakedboing on September 22, 2026, 09:58:22 AMYeah, using awk would definitely be cleaner, but I see the problem with adding it to the initramfs. Hopefully there's a simple BusyBox-compatible way to handle the memory value without relying on fixed character positions.

It is already fixed since Plop Linux 26.3. without awk and not relying on fixed characters. I fixed it with my own smart solution.