Hey all,
This might sound a bit unusual (or even a "bad idea" in the SSD wear sense), but hear me out:
I’ve got an old Core2 Duo laptop with 4 GB RAM that my wife uses. She runs a damned old Ubuntu system (guess its so damned old and based on the archaic 12.04 [do not kill me for t his fact)) - its all served from a persistent 16 GB USB 2.0 flash drive.
the details i have to mention here: No internal drive is used — partly for simplicity (my wife loves the simple things), partly for saving money. It runs decently for years and years, but as you can imagine, things get tight with RAM under heavier loads.
So i need to do some changes now. And here i am.
Now here's my thought: I’ve got an old 4 GB USB stick lying around. I'd like to use that specifically as a swap device. That way, swap doesn’t eat up the main USB’s limited write cycles and performance. Yes, I know flash memory and swap don’t mix ideally, but it’s a short-term solution and I’m okay sacrificing that old stick in the name of science.
So the challenge:
Use the 4GB USB stick as a swap partition or file
Automatically activate it on boot (from the main persistent live USB)
All without touching the internal HDD
Anyone done something similar? Got pointers for setting this up reliably via fstab, rc.local, or even udev rules (since device names might jump around)?
I figure this could be a fun experiment or useful for someone else booting live systems with constrained RAM.
Appreciate any input!
Cheers - and have a great day -
This might sound a bit unusual (or even a "bad idea" in the SSD wear sense), but hear me out:
I’ve got an old Core2 Duo laptop with 4 GB RAM that my wife uses. She runs a damned old Ubuntu system (guess its so damned old and based on the archaic 12.04 [do not kill me for t his fact)) - its all served from a persistent 16 GB USB 2.0 flash drive.
the details i have to mention here: No internal drive is used — partly for simplicity (my wife loves the simple things), partly for saving money. It runs decently for years and years, but as you can imagine, things get tight with RAM under heavier loads.
So i need to do some changes now. And here i am.
Now here's my thought: I’ve got an old 4 GB USB stick lying around. I'd like to use that specifically as a swap device. That way, swap doesn’t eat up the main USB’s limited write cycles and performance. Yes, I know flash memory and swap don’t mix ideally, but it’s a short-term solution and I’m okay sacrificing that old stick in the name of science.
So the challenge:
Use the 4GB USB stick as a swap partition or file
Automatically activate it on boot (from the main persistent live USB)
All without touching the internal HDD
Anyone done something similar? Got pointers for setting this up reliably via fstab, rc.local, or even udev rules (since device names might jump around)?
I figure this could be a fun experiment or useful for someone else booting live systems with constrained RAM.
Appreciate any input!
Cheers - and have a great day -
Last edited:

