BBS:      TELESC.NET.BR
Assunto:  Re: Adding a hardware swap partition
De:       Richard Harnden
Data:     Mon, 16 Mar 2026 11:49:01 +0000
-----------------------------------------------------------
On 16/03/2026 09:54, Richard Kettlewell wrote:
> bp@www.zefox.net writes:
>> It was a surprise to learn that a single partition is somehow required
>> for RasPiOS to function correctly. If true, it's a good thing to know.
> 
> Separate /usr probably still works, but I doubt it gets much testing.

Can you guarantee that /usr will be mounted at boot time?

I remember having to use /bin/sh in init.d scripts because /usr/bin/ksh 
didn't exist yet.  That may have changed.

A long time ago, and not on an rpi. AIX or HP/UX or something.

Anyway, I'd keep /usr under / just to be safe.

/home on its own partition.


> 
> It?s really not going to make swapping significantly faster. Nor is
> trying to find an optimal location for swap - you have quite possibly
> already spent more time on the matter in this thread than you could ever
> possibly save.
> 
>>> Back in the good old days there were enough programs in /bin (which
>>> was an actual directory, not a link to /usr/bin) to recover a system
>>> with disk errors (when possible, anyway).  But now that /bin is a
>>> link, I wonder if the system will even boot properly, since "user
>>> space" would have to mount /usr before almost all (all?) programs are
>>> available.  Including systemd.
>>
>> Given that RasPiOS has an /sbin directory, I'm pretty sure the machine
>> will come up at worst in single-user if /usr can't be mounted
>> normally.
> 
> $ ls -ld /sbin
> lrwxrwxrwx 1 root root 8 Nov 17  2023 /sbin -> usr/sbin
> 
> However I believe this is neither here nor there since initramfs is
> responsible for mounting /usr if it?s separate. If it fails to mount you
> will most likely end up in an initramfs shell (which is a pretty
> reasonable recovery environment).
> 
>> Whether /home/, /var/ and  /tmp/  can be links to /usr is less clear to
>> me at this point.
> 
> You might run into trouble with AppArmor. Not particularly hard to fix.
> 
> 
> If all this is about adding some swap space then you are massively
> overcomplicating matters. If there?s no unpartitioned space left then
> just create a swapfile and get on with your life. If you do anything
> more complicated than that then make sure your backups are up to date
> first.
> 


--- PyGate Linux v1.5.13
 * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)

-----------------------------------------------------------
[Voltar]