Installer bug?

Dave Hayes dave at jetcafe.org
Tue Jun 12 17:35:04 PDT 2007


I think I've found an installer bug, so I've posted it here so 
some of you can avoid this gotcha and hopefully one or more of
you can fix it. :)

In fn_install.c, the code looks like this:

  for (sp = slice_subpartition_first(storage_get_selected_slice(a->s));
    sp != NULL; sp = subpartition_next(sp)) {
       ...
       if (strcmp(subpartition_get_mountpoint(sp), "/") != 0) {
            command_add(cmds, "%s%s -p %smnt%s",
              a->os_root, cmd_name(a, "MKDIR"),
              a->os_root, subpartition_get_mountpoint(sp));
       }

       command_add(cmds, "%s%s %sdev/%s %smnt%s",
            a->os_root, cmd_name(a, "MOUNT")...
	    a->os_root,
	    subpartition_get_device_name(sp),
	    a->os_root,
	    subpartition_get_mountpoint(sp));
  }

This iterates over a linked list of subpartitions and does a mount
on each one. The linked list (as far as I can tell) preserves the
same order in which the subpartitions were entered on the form. 

So if someone decided to set up subpartitions in the following 
order:

  /var
  /usr
  / 

. ..the installer would produce shell commands in this order:

  mkdir /mnt/var 
  mount /mnt/var <deviceA>
  mkdir /mnt/usr
  mount /mnt/usr <deviceB>
  mount /mnt     <deviceC>
 
This will effectively hide the mounts of /mnt/var and /mnt/usr from
the installer, which will wind up installing everything into the root
partition. This is probably not what is expected. ;)
------
Dave Hayes - Consultant - Altadena CA, USA - dave at jetcafe.org 
>>> The opinions expressed above are entirely my own <<<

People who dream impossible dreams and strive to achieve
them raise man's stature a fraction of an inch in the
process, whether they win or lose.







More information about the Users mailing list