ubuntu 8.10 on client side - first thought

Adrian Gibanel Lopez agibanel at alumnes.udl.cat
Sat Nov 29 13:40:29 CET 2008


Hi List,


      This is a mail after my six experiences to write some words about
how ==to try== to make FAI server an Ubuntu 8.10 client from Ubuntu 8.10
server.

**
Needed Packages
**

There are some updates to do that Achim seems to have already noticed in
its own
repository.

By the way, AChim where is your repository found? Is it the official Fai
repository maybe ?

    revno: 27
    committer: Achim Bohnet <ach at mpe.mpg.de>
    branch nick: ubuntu
    timestamp: Mon 2008-10-06 14:51:28 +0200
    message:
      * conf/make-fai-nfsroot.conf: add aptitude to pkgs installed into the
	base tarball.  As NFSROOT pkgs could not be installed via aptitude any-
	more in intrepid.

    revno: 28
    committer: Achim Bohnet <ach at mpe.mpg.de>
    branch nick: ubuntu
    timestamp: Fri 2008-10-10 17:38:35 +0200
    message:
      * conf/NFSROOT: add package language-pack-en-base.  Stops perl & co
	complaining that locale en_US.UTF-8 is not defined.


Apart from these packages we might need also to add:
fontconfig,defoma,belocs-locales-bin but
I am not very sure about. Whenever a bug related to unionfs (see below in
the email)
will be fixed we should check these packages again.

**
Initrd Unionfs Mount problems
**

Well, let's see if you check the initrd contents as I have already
explained and if you
debug it a bit you will find that in: scripts/live script you have:

mount -t ${UNIONTYPE} -o noatime,dirs=/cow=rw:${rofsstring} \
			${UNIONTYPE} "${rootmnt}"

This command actually mounts an unionfs system in /root that mixes /cow
(that has formerly being mount as tmpfs) as rw
and /srv/fai/nfsroot/live/filesystem.dir as ro.

If you check the path you will see that it is something like this:

/root/sbin /root/bin /root/usr/sbin /root/usr/bin /sbin /bin /usr/sbin
/usr/bin

What actually happens right now is a bit tricky. If you get a console
right now (just edit the scripts/live
and add "sh" and you will get a console (although no prompt (#) appears)
you can see strange things.

ls command which had worked with no problem complains about a library
missing (I think it was librt).
You can, of course, add it to initrd and the problem seems solved but
another library is required.

Why's that?

As I had already said path is: /root/sbin /root/bin /root/usr/sbin
/root/usr/bin /sbin /bin /usr/sbin /usr/bin so
after the mount the /root/sbin will be run in the first place and, as /cow
is empty (or non-important, I haven't checked
it actually) the executables are read-on-the-fly from:
/srv/fai/nfsroot/live/filesystem.dir.

So you are not running the same ls as before this mount. You are not
running a statically compiled command
but a dynamic linked one. It depends on a library.

One tricky way (not recommended) that I have found that avoid this problem
is mounting /root/lib on /lib
as bind. (mount -o bind /root/lib /lib) (After the unionfs mount).

  The next part of the problem is that if you try to mount another folder
everything that was mounted is lost.
I do not know why. It seems to be a unionfs bug but I am not sure. After
mounting if you run mount
you will only see the folder you have already mounted and no other one.

My own fix for this is running:
	cat /root/etc/mtab > /etc/mtab
	cat /root/etc/mtab > /etc/fstab
just before the unionfs mount.

**
Initrd Move Mounts
**

There are several mount calls that involve moving mount points.
It seems as the old way of doing it was:

mount -o move olddir newdir
But now it complaints about not having a filesystem type and no mount is
performed.
New way of doing it is:
mount --move olddir newdir

**
Initrd Unionfs Read and Write problems
**


Even you sucessfully keep your unionfs mount on /root you will
see that some files such as /root/etc/environment and
/root/etc/fstab are not writable.

If you check them you will see that they have 644 permissions.
If you drop to a shell and try to do:
"chmod 644 file" which will not change any permissions in theory...
it makes your file to be writable again.
I think it has something to do with the unionfs way of working.

It's not evident to track this important files and change their permissions.
However if you wanted to do the trick of a recursive chroot then
you see that there is not space left for saving the files.
(I think that whenever a file is changed (even only permissions) unionfs
makes a copy of it in the rw directory).

And that's it. I want to check Achim repository, and, why not, Fai repository
for more clues.

  Nowadays my installation continues at this point with many file permissions
errors and Fai seems to work and everything but it says that the
installation has
errors, and finally, at the logs, you see that it's the permissions problems.

***
And now?
***

Thank you very much for your help.


-- 
Firma Automática 1:
---------------------
Adrian Gibanel Lopez
Estudiante de Ingenieria de Informatica de Sistemas en la Universitat de
LLeida.
Firma Automática 2:
---------------------
Participante en el III Concurso Universitario de Software Libre.
Proyecto: Desdeslin. http://desdeslin.wordpress.com


More information about the linux-fai mailing list