[Tex/LaTex] How to install TexLive on dualboot with shared TEXDIR

installingtexlive

Note: this question is very similar to mine, but the answer states

I would recommend you to install the full TeXLive manually (i.e. not using the Ubuntu packages) with both Linux and Windows binaries to the shared drive.

and I'm after more detail on how to do this on my Windows 7/Ubuntu 14.04 installation.


I have a Windows 7 system with TeXLive installed at TEXDIR = C:/texlive/2014.

I now want to install TeXLive on Ubuntu, using the existing Windows texlive installation, and without having to redownload the packages and duplicate hard drive space. (Of course things like binaries will not be shared with Windows; this is fine. But I would think that most of the packages are the same between Windows and Linux and hence don't need to be downloaded twice).

My Windows C: drive is mounted at /windows on the Linux side.

I ran the Linux installer and set my TEXDIR to point to /windows/texlive/2014 and verified that the other directories are all pointing to the existing install.

However, when I proceed with the installation, it appears that all the package files are being redownloaded: I can verify this by watching iftop, and I can see that package files *.tar.xz are being downloaded into $TEXDIR/temp.

For now the installation process is aborted in the download stage (I don't have reliable enough internet to do the downloads, or enough quota), so I am not sure if the packages are actually installed twice, as opposed to being downloaded and then the installer says "oh, the package is already installed, I won't reinstall".

So, how can I tell texlive to not re-download/re-install packages if they already exist in my Windows texlive installation?

(Or is /nothing/ shared between a Windows and Linux texlive installation? I assumed that at least most of the packages would be).


Update: had a look at the --no-depends-at-all option from the tlmgr help:

Normally, when you install a package which ships binary files the respective binary package will also be installed. That is, for a package foo, the package foo.i386-linux will also be installed on an i386-linux system. …

So it looks like what I want is the reverse: I want to install foo.i386-linux but not foo (because I already have it); is this possible or do I misunderstand how the packages work (quite likely)?

Best Answer

If you are happy with experimenting a bit, I suggest to proceed as follows. Disclaimer: I don't have a dual boot machine, I kicked Windows off my Laptop years ago.

Install texlive under windows and test it. Then boot into Linux and start the installation of texlive. Cancel the installation process after some minutes. Now, you have a TDS compliant structure, but the content is missing. EDIT: Delete all files and folders inside /texlive/2014/texmf-dist/tex/latex and /texlive/2014/texmf-dist/doc (not in your Windows folder, I'm speaking only of the Linux side!).

Then make two links:

  1. link from .../texlive/2014/texmf-dist/tex/latex to C:/texlive/2014/texmf-dist/tex/latex
  2. link from .../texlive/2014/texmf-dist/doc to C:/texlive/2014/texmf-dist/doc

I don't know whether a hard link or a symbolic link, but as Linux has this link feature, I'd check this possibility. Maybe here are some geeks who know exactly how to set a link from a Linux folder to a NTFS folder somewhere else.

Why only those two links? Because the LaTeX packages and the documents make the lions share of the texlive.

OK. Then restart the installation under Linux. I hope that tlmgr will accept the link to your windows installation and then try to install every single package and documentation, but notices they are already there.

Recently I transferred all doc and latex files to another computer and that part (start installation, abort, transfer, restart) worked. But I have no experience with linking into a windows installation.

Of course, you have to install the linux packages for writing into ntfs. And maybe you ruin your texlive installation on windows, if the installer tries something unexpected. But if you make a backup of it, why not giving it a whirl.