[NCLUG] Ubunto 8.04 - autoinstall of XP partitions

Bob Proulx bob at proulx.com
Mon Jul 21 21:22:31 MDT 2008


William Greger wrote:
>   I now have a dual-boot system - Ubuntu, XP Pro.  I need to
>   automount the XP partitions so that they are mounted when I logon
>   to Ubuntu.

If you *always* want the XP partitions mounted then you might as well
just mount them all of the time at boot instead of using the autofs
for this task.

> I am able to use the CLI and type the mount command.

Good.  It proves things are in a happy state for you.

> This will mount the drives for the active session; but this is lost
> when I logoff.
>   I have done the following:
>     sudo get-apt update
>     sudo get-apt install autofs
> Now what should I do?

Here is my suggestion.

What is the mount point?  Is it /dev/sda1 or /dev/hda1 or some such?
Edit[1] the /etc/fstab file and look for a line similar to this one:

  sudo editor /etc/fstab

  /dev/sda1  /mnt  ntfs  ro,users,noauto  0  0

The noauto option tells the system not to mount it at boot time but to
allow it to be mounted later.  The users option lets any user on the
system mount it.  Change this line to have the NTFS partition mounted
at boot time automatically.  Something like this:

  /dev/sda1  /mnt  ntfs  ro,nosuid  0  0

With this configuration in place the /dev/sda1 NTFS partition will
always be mounted at boot time on the /mnt mount point read-only.  I
would probably 'mkdir /microsoft' or some such name and then use that
as the mount point instead of /mnt in that case.  You can then mount
this once interactively and avoid the need to boot.

  sudo mount /mnt

Then if you *only* installed autofs in order to mount the NTFS
partition then I would remove it.

  sudo apt-get remove autofs

Personally I would purge it so that the /etc/ config files are removed
as well.  That assumes that you do not want to keep the /etc/ config
files that were installed with the package.  It is more tidy but not
required by any means.

  dpkg -L autofs | grep /etc/ # look at files in /etc/

  sudo apt-get remove --purge autofs  # --purge removes /etc/ files too

Bob

[1] 'editor' is an actual real command that points to your current
system configured editor.  Same for pager.

  update-alternatives --display editor
  update-alternatives --display pager

I use 'editor' to avoid saying use emacs, vi, nvi, vim, nedit, nano,
pico, ed, cat or other favorite editor assuming that you will already
have configured editor to be pointing to your editor of choice.

  sudo update-alternatives --config editor
  sudo update-alternatives --config pager

Other people use $EDITOR for similar purposes.



More information about the NCLUG mailing list