Thanks for your response Roland,
On 18/02/24 23:04, Roland Clobus wrote:
Hello Alex,
On 17/02/2024 04:33, Alex King wrote:
I'm wanting to use a debian-live image to wipe the disks on some
systems being decommissioned. To do that, I believe I need to copy
filesystem.squashfs into ram so it isn't sitting on a disk to be wiped.
Why do you need to have filesystem.squashfs in RAM? If you boot from a
USB or DVD/CD-ROM medium, the filesystem.squashfs resides there, and
there is no need to have a copy in RAM.
After the live system has been booted, you can wipe all disks as you
want.
The computers to be wiped are servers in a datacenter. I can't use
CDROM or USB without expensive remote hand time. PXEBOOT is the normal
method we would use, but due to some problems specific to our setup,
PXEBOOT is currently a little painful to use (involving several manual
steps which are not easily scripted, due to brokenness that should be
fixed but...)
<snip>
I tried live-boot(7)"toram" paramater. This actually worked on my
test machine, but to my surprise it copied the whole 4G root
filesystem to ram instead of just filesystem.squashfs. While it
worked on this system (albeit wasting a lot of time and RAM from the
16G on this machine), it would not work in other cases where the root
filesystem may be 500G and RAM only 4G.
On the live images nearly all of the size is used by
filesystem.squashfs, so you wouldn't win a lot if you copy only that
file to RAM.
If you need something with a smaller footprint, you can use the
'standard' image, which does not contain a graphical environment.
If you want to have your own set of packages in the live image, I
would recommend to build you own. See [1] and [2].
Yes, I have already build my own image, including only the packages I
want. That works well.
My interim solution is to create an lvm lv of 1G in size and download
filesystem.squashfs to that, with the copy-to-ram option. This works
well for most servers that have lvm VGs set up, however there are some
servers where this is not the case and we'll need to do some manual disk
re-organising prior (or use the PXE method).
I am happy to contribute such a "copy filesystem.squashfs only to RAM"
option to the code if wanted. I had a quick look and did not find where
I would add that. Would you be able to point me to the correct place?
Thanks,
Alex
With kind regards,
Roland Clobus
[1]
https://live-team.pages.debian.net/live-manual/html/live-manual/index.en.html
[2] https://wiki.debian.org/ReproducibleInstalls/LiveImages