Monday, February 10, 2025

Sharing Swap space between distributions

I just booted EndevourOS (ARCH based) and looked at the partition table using Gparted of my NUC.

MX Linux had labelled the two SWAP partitions as MX Linux.

I reformatted both Swap partitions. Then, I booted MX Linux to see it hangs up at booting (re-formatting SAWP partition). It did not but booted as usual.

Lot of these facts, I did not know. I have three distributions in my NUC and two Swap Partitions. My only concern is the speed of booting and smooth functioning when running. I won't install a distribution until I have tested it on a live USB, many a times. I write a piece in this blog site and review each new and past comments I have made. The other major concern is the compatibility of the Debian's GRUB file. 

I shun all distribution that run on root mode and Ubuntu is one of them I shun the most. 

DeepIn from China included.

It is mandatory one should run on a user level always unless one is doing some maintenance work.

I depend on chron jobs and deamons and do not run my NUC 24/7 like a server.

One who runs a Server should be very cautious, since even a Linux guy can become promised by another Linux guy with a hacker mentality. I never use Kali and Parrot OS, If I need any investigation. Tails has fallen out of my domain and Gparted does not have a Live CD iso probably due to concerns raised above. One has to install it as an application which I always do.

So I cannot format or erase SWAP partitions even if I wish to do so. Worse scenario I can mount an old Puppy Linux and format any partition at will. I used to do that with Knoppix and Knoppix cannot mount my integrated graphic card of my NUC in a live session.

I am not paranoid anyway.


Sharing Swap space between distributions

Sharing-is-caring asks: Is it possible to share swap space between multiple distros? Is it safe?

DistroWatch answers: Yes, it is possible to share the same swap partition across Linux distributions. Whichever distribution is running will keep track of where it writes data to the swap partition and ignore anything else in the swap space. Assuming each distribution is only running one at a time and you're not sharing a swap partition between two operating systems running in parallel, perhaps on virtual machines, there will be no problems with two distributions sharing the same swap space.

The question asked if sharing a swap partition is safe and I'm guessing the concern is with information leaking out from one operating system to another. This could happen, but it can happen whether the operating systems are sharing the same swap partition or if they're using separate swap partitions. Whichever operating system is running has full access to your hardware, meaning data written to one distro's swap partition can be read by another distro.

Let's say you have one trusted distribution (called Distro A) and one distribution with untrusted software running on it (Distro B). When Distro A is running it might write sensitive information, such as a password, to swap space. When Distro B runs a malicious program could scan the swap partition and find the password. This is true whether the two distributions share the same swap space or not. Any partition connected to the computer will be visible to both distributions and therefore still vulnerable to malicious programs running on Distro B.


If you're concerned about one distribution reading and compromising security by reading data left in your swap space, you can detach the swap partition and wipe it clean just before you shutdown your computer. Let's look at an example.

First, we need to determine on which partition our swap space is located. We can do this with the swapon command:

$ swapon -s
Filename Type Size Used Priority
/dev/sda2 partition20479962816-2
In this example we discover the swap partition is located at /dev/sda2. We will detach this swap partition with the swapoff command:
$ sudo swapoff /dev/sda2
Finally, we overwrite the swap partition (sda2 in this example) with random data. We can do this with the dd command:
$ sudo dd if=/dev/urandom of=/dev/sda2
At this point, if we restart the computer, whichever distribution we boot will not be able to see what was previously written to the swap partition.

SZBOX S7 and Mini Stick with Linux

SZBOX S7 and Mini Stick with Linux
 
It is time to retire all the bulky and heavy LAPTOPS with batteries hard to come by with mini PC and mini USB sticks.
I am glad I did not publish my book on Linux Essentials.
I need to expand the chapter with HiGOLE mini PC.
SZBOX S7 is a hand held mini PC which looks like a cellphone.
In fact, a cellphone/tablet and mini PC combo.
Price around $500/= when upgraded but bare born is 270.
7" inch scree Alder Lake-N
INTEL inside.
16GB DDR5 and 128GB NVMe SATA without and operating system in which I can install Linux.
It is really worth for the price quoted.
It is portable.
Compact with a kick stand.
It is productive with enough video capability.
Impressive array of ports for connectivity.
Ideal for students and data handlers.
Dave space, save money and save energy.
Money saved can be used for a monitor of your choice.
7200 mill Ampere battery which last for 7 to 8 hour without changing requirement.
Intel WiFi 6 with Bluetooth 5 and Audio and HDMI video ports.
This is the perfect niche market product for a digital nomad or old potato-couch tech enthusiast like me. 
However, with some visual handicap, I prefer a bigger screen but with ability increas fond size I can make a blog piece on the fly.
Thank You guy for YouTube presentation and the tech guys who design these products.
Sky is the limit if you put mind into a productive and portable tool.

SZBOX-S1 is a DDR5 RAM in a USB stick Frame is even smaller. This stick is meant to be attached to a monitor with HDMI IO port. It is not suitable for games but ideal for a workspace where space is limited. It can hide behind the big TV but switching on and off will be cumbersome. I think if you have a portable mini TV this stick make it a work companion in a restricted space. SZBOX S7 is seven inch and with visual handicap I would go for 10" mini TV and this mini Stick. I won't recommend it for a car TV since watching TV while driving should be prohibited to prevent (RTA) road traffic accidents.

Portable Operating System on a Stick.
There is another stick with DDR4 which I can stick on my NUC with DDR 4. I fear sticking a DDR5 stick which different bus speeds might burn my NUC (CI) circuit board.
Do not stick these on an OLD PC even by accident.

This is a DDR4 RAM integrated into a mini Circuit Board and a USB port IO.
It has HDMI port for video and SD slot for DATA.
Thinks are getting smaller and nanometer chips are coming out. There enough holes in the modified plastic frame for heat dissipation. I want use this with over 10 USB sticks booting many Linux Distribution.
This stick is Linux compatible for Linux enthusiasts.

How to Hook Up eGPU to NUC or Laptop

How to Hook Up eGPU to NUC or Laptop

I have and old Laptop with limited Graphic Functionality and a Basic NUC with Intel iris integrated Graphic card. 

They are OK for my general work but not for gaming.

What I would do if I wanted play some games.

1. I need to select a reasonable graphic card. from 4000 to 5000  to 8000 series.

2. GTX PC Frame which has 8 pin female power sockets.

3. Power supply for the GPU.

4. Necessary power cords 

5. Assemble each piece in the ATX frame.

6. Test to whether in working order.

7. Fix a frame for old DVD into the ATX frame.

8. Mount my NUC on the ATX which need separate power supply.

For the Laptop
Connect the eGPU or external GPU with a HDMI cord.
Power on both GPU first and the Laptop second.
Select the eGPU instead of the internal GPU.
 
There in no guarantee that this would work.
 
Besides, wrong power supply would ruin the GPU in five seconds with a major fire hazard.
All computer gadgets works on DC power not AC power.
Except perhaps for oculink gadgets they work on 15 DC power.
So, look at the manufacturer's instructions for power requirements and choose the appropriate step down transformer.
 
Buying cheap Chinese alternatives is a liability
 
Do not mix with different manufacturers.
 
Select the same manufacturer for all the components.
Third party alternatives are cheap but not rigorously tested.
They sell 100 pieces at a time and a few of them bound to be of quality and below the standards.
D.I.Y is fun but with so many generic manufacturers it is open sesame or open door for low Quality.
I am guy who has over 30 years experience in assembling my own PCs but I have had many mishaps.
1. Burned a 128 Graphic Card once in 32 bit mode.
2. Burnt several RAM cards.
3. 2 analogue TVs and 3 second hand IBM computers (out of 15), caught FIRE, all due to voltage drop in power supply in Ceylon.
I dismantled all 32 bit computers and bought new 64 bit stuff.
 
I hear that a major Power Generator in Atthidiya caught fire, the other day.
 
I had spare money when I was working.
 
I have Given Up all these risky hand on experience in my retirement.
My NUC consumes consume only 18 watts and is not a fire hazard.
 
Multicore and Multithread CPUs and Expensive Graphic Cards (some need water cooling) consume lot of Energy.

My theme now is save money, save energy and save space.

Small is beautiful was my theme all my life.

I hate gadget megalomaniacs unless he she is a game player.

Cost Effective Productivity was my goal, coming from "Total Quality Management" background in delivering Medical Care.

AntiX Legacy Kernel and Modern Kernel

Update on AntiX

Yes, AntiX failed to have persistence copy of Abiword after installing it on a live session. Abiword is about 280MB in total. 

Yes, I am switching to Puppy Linux either Debain Pup or Ubuntu FossaPup.

It is much easier to use Puppy Linux with Abiword than fiddling with AntiX. It has LibreOffice which I begin to hate because of its bulk with so many language packs.

Its latest kernel 23.2 Full install.

It is about 2.2GB Image.

It configure WiFi after some fiddling with the

AntiX Legacy Kernel and Modern Kernel

Antix has tons of applications which I used in the past.

I still wonder why I settled down with Gnome of Debian.

It does not have Abiword.

I fiddled with  Synaptic Package Manager and got it installed and made a persistent root file in the NTFS partition. I hope it will retain Abiwrd when I boot it next time.

Unlike Easy OS it does not fill the remaining portion of the USB.

That may be the reason for shunning AnitX.

Looking back that was a mistake. 

Had I continued with that writing the Linux Essentials book would have been much smoother and less time devoted. I have not made an entry on either AntiX and MX Linux, the latter is a modernized version of AntiX.

What I really like about AntiX is it uses IceWarm Window Manager which is pretty cool.

I prefer AntiX and it has three versions including KDE.

It has many Window managers, Flux box, IceWarm, JWM and Minimal vs Rox version.

It has Dillo, Firefox and Transmission.

What MX Linux had done is to give a modern desktop look and simplify the organization and put all the tools not fit in any category as MX Tools.

Both are very good Linux distributions and I wonder why people go for Arch Linux or  Linux Mint

One lacks applications and one has to install one application at a time. 

The other has glossy desktop and looks for commercial proprietary codes.

AntiX had host of utilities.

Beauty is Linux has many varieties of distributions to cater for any user mentality.

 AntiX Update

Mind you it uses SystmV and not SystemD which is modern adoptation of Init.

 In Unix-based computer operating systems, Init (short for initialization) is the first process started during booting of the operating system. Init is a daemon process that continues running until the system is shut down

antiX-23.2 files - Released 06 October 2024
antiX Linux has many versions. Please select one that best suits your needs.

antiX is available in 64 bit (computers built in the last 10 years) or 32 bit (very old computers or newer machines but be aware that a lot of software no longer provides 32 bit versions).

antiX also has two possible init systems: sysVinit (default option) or runit.
If you don't know or care about init systems, choose the sysVinit version.
Each of these architectures and init system comes in 4 possible "flavours"

antiX-full (c1.8GB) – 4 windows managers – IceWM (default), fluxbox, jwm and herbstluftwm plus full libreoffice suite.
Suitable for most users. Lots of applications pre-installed and has the best hardware support.

antiX-base (c1.2GB) – 4 windows managers – IceWM (default), fluxbox, jwm and herbstluftwm.
Suitable for those who want to customise what to install.

antiX-core (c520MB) – no gui environment, but should support most wireless.
Suitable for confident/comfortable users who want to build up from a minimal install.

antiX-net (c220MB)- no X. Just enough to get you connected (wired) and ready to build. (NOTE – to connect to the Internet, you might need to type as root user ifup eth0 or ifup eth1).
Suitable for Advanced users.

sysVinit versions.