NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: create /tmp with ffs vs. tmpfs ?



On Tue, Aug 13, 2024 at 11:31:25AM +0200, Martin Husemann wrote:
> On Mon, Aug 12, 2024 at 06:43:45AM -0700, Steve Rikli wrote:
> > Or maybe you're pointing out the "25%" etc. sizing behaviors of the
> > NetBSD sysinst; I hadn't quite worked out how exactly to make the
> > non-default /tmp partition in sysinst -- so far I've just been using the
> > "Set sizes of NetBSD partitions" menu selector, but I also see "Manually
> > define partitions" and other things, so I figured I'd be able to find a
> > sufficient hammer with some more poking around.
> 
> Oh indeed, it is not as easy as I thought it would be - neeed to hack
> on sysinst again and make this better.
> 
> There is no easy way in sysinst to do a /tmp partition with tmpfs right now,
> you need to work around this by:
> 
>  - at the "choose partition sizes" stage
> 
>     1) set /tmp to size 0
>     2) add a user defined partition for mountpoint /tmp2 and give it the
>        size you want
> 
>  - at the next "partition details" stage (you will notice /tmp vanished,
>    corrctly for a tmpfs thing, but /tmp2 is still there)
> 
>     1) edit the /tmp2 entry and fix the mount point to /tmp, and select
>        whatever file system you want to use

Yes, this workaround is close to what I ended up doing. That is, I added
"/tmp2" during "Set sizes of NetBSD partitions" and then re-did fstab
and the mount & perms during my post-install configuration activities.

It's not particularly elegant, but it's mostly functional for now. Your
in-sysinst workaround is likely better.

I considered trying "Manually define partitions" but I'm not familiar
enough yet with NetBSD partitioning to do that on the fly; I plan to
explore that part of the sysinst menus again later after taking notes.

Ultimately I was able to get the partitions layout I wanted, along
with separate /home/, so I'm pretty satisfied overall.

> You can't add the correct partition at the first stage because even with
> size 0 and tmpfs magic it won't allow you specifying /tmp again for another
> partition. This obviously is a bug.

Agreed, I tried a couple things at the "25%" menu selector but couldn't
work out how to do away with tmpfs /tmp altogether from there in one
move.

Thanks,
sr.


Home | Main Index | Thread Index | Old Index