summaryrefslogtreecommitdiff
path: root/community/gsoc/project_ideas/unionfs_boot.mdwn
blob: 77fc357f698f23b70d918ce174fc6b18d5381198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[[meta copyright="Copyright © 2008, 2009 Free Software Foundation, Inc."]]

[[meta license="""[[toggle id="license" text="GFDL 1.2+"]][[toggleable
id="license" text="Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no Invariant
Sections, no Front-Cover Texts, and no Back-Cover Texts.  A copy of the license
is included in the section entitled
[[GNU_Free_Documentation_License|/fdl]]."]]"""]]

[[meta title="Allow Using unionfs Early at Boot"]]

In [[UNIX]] systems, traditionally most software is installed in a common directory
hierachy, where files from various packages live beside each other, grouped by
function: user-invokable executables in `/bin`, system-wide configuration files
in `/etc`, architecture specific static files in `/lib`, variable data in
`/var`, and so on.  To allow clean installation, deinstallation, and upgrade of
software packages, GNU/Linux distributions usually come with a package manager,
which keeps track of all files upon installation/removal in some kind of
central database.

An alternative approach is the one implemented by GNU Stow: each package is
actually installed in a private directory tree.  The actual standard directory
structure is then created by collecting the individual files from all the
packages, and presenting them in the common `/bin`, `/lib`, etc. locations.

While the normal Stow package (for traditional UNIX systems) uses symlinks to
the actual files, updated on installation/deinstallation events, the Hurd
[[hurd/translator]] mechanism allows a much more elegant solution:
[[hurd/translator/stowfs]] (which is actually a special mode of
[[hurd/translator/unionfs]]) creates virtual directories on the fly, composed
of all the files from the individual package directories.

The problem with this approach is that unionfs presently can be launched only
once the system is booted up, meaning the virtual directories are not available
at boot time.  But the boot process itself already needs access to files from
various packages.  So to make this design actually usable, it is necessary to
come up with a way to launch unionfs very early at boot time, along with the
root filesystem.

Completing this task will require gaining a very good understanding of the Hurd
boot process and other parts of the design.  It requires some design skills
also to come up with a working mechanism.

Possible mentors: ?

Exercise: Try to write a dummy server that is started instead of ext2fs on
system boot, and starts the actual ext2fs in turn.