:: Re: [DNG] Solving simple problems i…
Página Inicial
Delete this message
Reply to this message
Autor: Dr. Nikolaus Klepp
Data:  
Para: dng
Assunto: Re: [DNG] Solving simple problems in amazingly complicated ways
Anno domini 2020 Thu, 12 Mar 19:03:14 -0500
John Morris scripsit:
> On Thu, 2020-03-12 at 21:45 +0000, Rainer Weikusat via Dng wrote:
> > - the sole purpose of this text is for the amusement of people who
> > ever
> >   had to find a (preferably simple) solution for a complicated problem
> > -
> >
> > Problem I had to deal with since yesterday: Some Debian 10 system (use
> > of systemd mandated) installation I've created was to be captured by a
> > certain image capturing tool running on Windows. As it turned out to
> > be,
> > this capturing tool has no support for Linux swap partitions and thus,
> > tries to capture them by doing a sector-by-sectory copy of random junk
> > which won't ever be of any use again.
> >
> > Proposed solution: Turn that into an ext4 filesystem, record the UUID,
> > run a script at boot to convert it back to a swap partition. This
> > could
> > have been solved by suitable manipulation of /etc/rcS-symlinks but the
> > mere thought of something as unsophisticated at that would cause
> > systemd
> > developers to start spinning until the reach escape velocity, never to
> > be seen again - and who could possibly want that.
>
> How about a simpler solution?
> On shutdown:
> 1. Capture the label and UUID of the swap partition.
> 2. Do a swapoff.
> 3. Zero out the swap partition.
> 4. Remake it with the same label and UUID.
>
> It will still get a sector by sector copy but assuming it is compressed
> it will be of trivial size.


LOL ... to make things more interesting, I'd suggest this:
- on shutdown: remove the swap-partition from the partition table
- on boot: create an entry in the partition table for swap and use it
Noe there might be interestring sideeffects :)

--
Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ...