MountingHDDFilesystems

Revision 6 as of 2005-04-26 03:16:07

Clear message

MountingHDDFilesystems

Status

Introduction

Mounting Hard Drive Filesystems

Rationale

The installer and the live CD should both be able to auto-mount filesystems on local hard disks. When performing advanced/interactive partitioning in the installer, this may be configurable, with sensible defaults; otherwise, filesystems should be mounted in sensible places without the need for user interaction.

Scope and Use Cases

  • A user installs Ubuntu, and wants her music collection to be mounted in a sensible place and accessible from her desktop.
  • A user boots the Ubuntu live CD and wants to save files to a FAT filesystem so that they can be read in Windows.

Implementation Plan

THIS DRAFT IS INCOMPLETE AND UNDERGOING ACTIVE REVISION.

There are two major alternatives for actually mounting the filesystems:

  • pmount (policy mount, used to mount removable media)
    • currently configured to ignore hard disk filesystems, due to security concerns; not keen on relaxing that restriction, and any relaxation has to be considered very carefully
    • allows dynamic rearrangement of filesystems
  • /etc/fstab
    • filesystem mount points would be configured once in the installer, and would not be automatically updated thereafter
    • simple
    • no security concerns

BOF discussion suggested that we should adopt the simpler approach of dumping partitions and mount points into /etc/fstab, and possibly provide a facility to run the autodetection code again from an installed system.

The installer will scan for partitions when starting up partman, and set appropriate mount points as defaults. Automatic installations will use these without user interaction. In the advanced partitioning mode, the user will see the default mount points and be able to adjust or cancel them. As partman shuts down, it will (as usual) write these mount points to /etc/fstab in the system the installer is about to create.

In the live CD, casper just needs to add mount points to /etc/fstab directly before pivoting into the live filesystem. We need to take a certain amount of care with mount options, as the live CD user should be able to write to data filesystems (especially FAT filesystems shared with Windows), but it is desirable for other non-root system processes not to be able to accidentally overwrite these filesystems; furthermore, filesystems should be remounted read-only on errors in order to minimise the possibility of any damage while running the live CD.

Since there are two quite different code paths involved in these two use cases, we will need to create a new common component to avoid code duplication. This component will output partitions and filesystem types in a simple format similar to that produced by os-prober (an installer component which scans disks for installed operating systems).

Data Preservation and Migration

Packages Affected

User Interface Requirements

Outstanding Issues

UDU BOF Agenda

UDU Pre-Work