Re: [gentoo-user] Re: HACK: Boot without an initramfs / initrd while maintaining a separate /usr file system.

2019-08-06 Thread Neil Bothwick
On Mon, 5 Aug 2019 18:04:00 -0600, Grant Taylor wrote:

> > Don't you have to go through some extra hoops (a flag to the mount 
> > command or something) to mount over a non-empty directory?  
> 
> Nope.
> 
> I don't recall ever needing to do anything like that in Linux.

Fuse complain about this, that's the only time I've seen it.


-- 
Neil Bothwick

Top Oxymorons Number 39: Almost exactly


pgplSNCeSYf1p.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Re: HACK: Boot without an initramfs / initrd while maintaining a separate /usr file system.

2019-08-05 Thread Grant Taylor

On 8/5/19 8:45 PM, Grant Taylor wrote:

Even bigger hack.


I wouldn't be me if I didn't lob these two words out there:

mount namespaces

/me will see himself out now.



--
Grant. . . .
unix || die



Re: [gentoo-user] Re: HACK: Boot without an initramfs / initrd while maintaining a separate /usr file system.

2019-08-05 Thread Grant Taylor

On 8/5/19 6:28 PM, Jack wrote:
However, I keep wondering if an overlay file system might not be of 
some use here.  Start with /bin, containing only what's necessary to 
boot before /usr is available.


I wonder how much of what would need to be in the pre-/usr /bin 
directory can be provided by busybox.  (Assuming that busybox is 
compiled with everything living in / (root).


Once /usr is mounted, overlay mount /usr/bin on /bin (or would it be 
the other way around?)


An overlay mount (mount -o bind /usr/bin /bin) would be an additional 
mount.  Which in and of itself is not a bad thing.  But the sym-link 
from /bin -> /usr/bin would avoid the additional mount.  Admittedly, you 
might need one additional (bind) mount somewhere to be able to access 
the underlay while /usr is mounted.


Unless

...

Even bigger hack.

What if the underlay (/ (root)) file system had the following structure:

/bin -> /usr/bin
/usr/bin -> /.bin

That would mean that the pre-/usr /bin contents would still be 
accessible via /.bin even after /usr is mounted.  And /bin would still 
point to /usr/bin as currently being discussed with /usr merge.




--
Grant. . . .
unix || die



Re: [gentoo-user] Re: HACK: Boot without an initramfs / initrd while maintaining a separate /usr file system.

2019-08-05 Thread Jack

On 2019.08.05 19:52, Ian Zimmerman wrote:

On 2019-08-04 19:36, Grant Taylor wrote:

Create the bin and sbin directories inside of the /usr directory  
that is the mount point so that they are on the underlying file  
system that /usr is mounted over top of.  Then copy the needed  
binaries to the /usr/bin & /usr/sbin directories on the underlying  
file system.  That way, /sbin/fsck -> /usr/sbin/fsck still exists  
even before the real /usr is mounted.


Don't you have to go through some extra hoops (a flag to the mount  
command or something) to mount over a non-empty directory?


As others have said, no.  However, I keep wondering if an overlay file  
system might not be of some use here.  Start with /bin, containing only  
what's necessary to boot before /usr is available.  Once /usr is  
mounted, overlay mount /usr/bin on /bin (or would it be the other way  
around?)


Re: [gentoo-user] Re: HACK: Boot without an initramfs / initrd while maintaining a separate /usr file system.

2019-08-05 Thread Grant Taylor

On 8/5/19 5:52 PM, Ian Zimmerman wrote:
Don't you have to go through some extra hoops (a flag to the mount 
command or something) to mount over a non-empty directory?


Nope.

I don't recall ever needing to do anything like that in Linux.

I do know that other traditional Unixes are more picky about it.  AIX 
will refuse to use a populated directory as a mount point.


As I type this, perhaps ZFS on Linux complains, but I don't recall.



--
Grant. . . .
unix || die



Re: [gentoo-user] Re: HACK: Boot without an initramfs / initrd while maintaining a separate /usr file system.

2019-08-05 Thread Manuel McLure
On Mon, Aug 5, 2019 at 4:53 PM Ian Zimmerman  wrote:

>
> Don't you have to go through some extra hoops (a flag to the mount
> command or something) to mount over a non-empty directory?
>
>
Not in my experience, I've done it many times (sometimes even on purpose :)
)
-- 
Manuel A. McLure WW1FA  
...for in Ulthar, according to an ancient and significant law,
no man may kill a cat.   -- H.P. Lovecraft


[gentoo-user] Re: HACK: Boot without an initramfs / initrd while maintaining a separate /usr file system.

2019-08-05 Thread Ian Zimmerman
On 2019-08-04 19:36, Grant Taylor wrote:

> Create the bin and sbin directories inside of the /usr directory that
> is the mount point so that they are on the underlying file system that
> /usr is mounted over top of.  Then copy the needed binaries to the
> /usr/bin & /usr/sbin directories on the underlying file system.  That
> way, /sbin/fsck -> /usr/sbin/fsck still exists even before the real
> /usr is mounted.

Don't you have to go through some extra hoops (a flag to the mount
command or something) to mount over a non-empty directory?

-- 
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet and on broken lists
which rewrite From, fetch the TXT record for no-use.mooo.com.