Search code examples
linuxgitfilesystemsmountunpack

How to mount a filesystem.git directory during init?


I have a bootable ISO file containing a filesystem.git which in turn contains this structure:

dr-xr-xr-x 2 root root 2048 Mär  1 17:10 branches/
-r--r--r-- 1 root root  115 Mär  1 17:10 config
-r--r--r-- 1 root root   73 Mär  1 17:10 description
-r--r--r-- 1 root root   23 Mär  1 17:10 HEAD
dr-xr-xr-x 2 root root 2048 Mär  1 17:10 hooks/
dr-xr-xr-x 2 root root 2048 Mär  1 17:10 info/
dr-xr-xr-x 4 root root 2048 Mär  1 17:10 objects/
-r--r--r-- 1 root root   85 Mär  1 17:10 packed-refs
dr-xr-xr-x 4 root root 2048 Mär  1 17:10 refs/
-r--r--r-- 1 root root   82 Mär  1 17:10 shallow

There seems to be a packed Debian filesystem within the objects tree and the initramfs image seems to have a procedure to unpack and mount the filesystem.git as the root filesystem, but I don't know how.

Can anyone explain, how this works?


Solution

  • To answer the question for other folks having the same issue, you can mount a *.git directory by using git-fs in combination with FUSE as pointed out by Michael Wild.