Date: Sun, 23 Apr 2000 12:42:40 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: Cy Schubert - ITSD Open Systems Group <Cy.Schubert@uumail.gov.bc.ca> Cc: freebsd-stable@freebsd.org Subject: Re: Linux Emulation Root (was: Re: Linux emulation scripting fix to be committed to 5.x and 4.x wednesday) Message-ID: <200004231942.MAA63679@apollo.backplane.com> References: <200004231924.MAA00521@cwsys.cwsent.com>
next in thread | previous in thread | raw e-mail | index | archive | help
: :In message <200004231835.LAA62963@apollo.backplane.com>, Matthew Dillon :writes: :> I intend to commit this to -current and immediately MFC it to -stable. :> I don't expect there to be any controversy though I'm sure there is a :> cleaner way to do it. : :On a semi-related topic, it would be handy to have a feature, :environment variable, table in the kernel, a sysctl variable, etc., to :set the Linux emulation root to the real root. For example, the backup :component of Legato for Linux (nsrexecd and friends) runs nicely on :under Linux emulation, however, recovering files in the root directory :sees them placed in the Linux emulation root directory. : :To work around this I've used a union filesystem that mounted / on :another mount point and redirected my restores to it. : :My questions are: : :Is there a cleaner way to work around this, e.g. some tunable knob to :tune Linux emulation? If not, would anyone else see any use for this :kind of feature? : : :Regards, Phone: (250)387-8437 :Cy Schubert Fax: (250)387-5766 I had to struggle with this issue during the Oracle install... the fact that under linux emulation the 'root' per say is rather loosely defined. I wound up having to chroot into /compat/linux to even come close to getting oracle to install (and locating all the linux utilities with FreeBSD equivalents that weren't installed in /compat/linux, causing the freebsd utilities to be run and of course fail due to missing or different options). The only thing I can think of us is to overlay the linux directory structure on top of the FreeBSD directory structure via union mounts. In otherwords, be able to chroot to /compat/linux and 'see' the entire FreeBSD directory structure (minus changes made via the mount to get all the linux binaries, libraries, etc, and such). We would then get rid of the /compat/linux prefix pathing entirely and simply have linux emulation automatically chroot to /compat/linux when a non-linux program exec's a linux program in order to access the modified view of the filesystem. Messy, I know. I don't know if there is a clean solution to the problem. At least if we use union mounts the whole mess is isolated away from the native FreeBSD install (note: we'd have to clean up union mounts to make them work properly). -Matt Matthew Dillon <dillon@backplane.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004231942.MAA63679>