I have just installed Ubuntu on a machine that previously had XP installed on it. The machine has 2 HDD (hard disk drives). I opted to install Ubuntu completely over XP.

I am new to Linux, and I am still learning how to navigate the file structure. However, AFAICT, there is only one drive. I want to be able to store programs etc on the first drive, and store data (program output etc) on the second drive.

It appears Ubuntu is not aware that I have 2 drives (on XP, these were drives C and D).

  1. How can I mount the second drive (ideally, I want to do this automatically on login, so that the drive is available to me whenever I login - withou manual intervention from me)

  2. In XP, I could refer to files on a specific drive by prefixing with the drive letter (e.g. c:\foobar.cpp and d:\foobar.dat). I suspect the notation on ubuntu is different. How may I specify specific files on different drives?

  3. Last but notbthe least (a bit unrelated to previous questions). This relates to directory structure again. I am a developer (C++ for desktops and PHP for websites), I want to install the following apps/ libraries.

    • i). Apache 2.2
    • ii). PHP 5.2.11
    • iii). MySQL (5.1)
    • iv). SVN
    • v). Netbeans
    • vi). C++ development tools (gcc, gdb, emacs etc)
    • vii). QT toolkit
    • viii). Some miscellaeous scientific software (e.g. www.r-project.org, www.gnu.org/software/octave/)

    I would be grateful if a someone can recommend a directory layout for these applications. Regarding development, I would also be grateful if someone could point out where to store my project and source files i.e:

    • (i) *.cpp, *.hpp, *.mak files for cpp projects
    • (ii) individual websites

    On my XP machine the layout for C++ dev was like this:

    • c:\dev\devtools (common libs and headers etc)
    • c:\dev\workarea (root folder for projects)
    • c:\dev\workarea\c++ (c++ projects)
    • c:\dev\workarea\websites (web projects)

    I would like to create a similar folder structure on the linux machine, but its not clear whether to place these folders under /, /usr, /home or swomewhere else (there seems to be abffling number of choices, so I want to get it "right" first time - i.e having a directory structure that most developer use, so it is easier when communicating with other ubuntu/linux developers)


Ubuntu should be reading your second partition automatically, all you would have to do to mount it is to click it from the menu bar. You'll need admin/root access to mount the drive the first time, but then it should be permanent until you either restart or unmount.

However, here's helpful link to mounting NTFS drives in Ubuntu. The same page also lists how to mount at startup, just scroll down a little.

  • I dont know if it is a terminology issue, but I dont think it a partition issue. Its a second DRIVE that I want to mount not a second partition on the same drive – morpheous Nov 1 '09 at 10:35
  • No, it's perfectly valid to refer to the disk space on the second drive as a second partition. When you installed Ubuntu did you let it create a single partition for / on what used to be C:, or different partitions like /home, /usr, /lib ? It doesn't really matter: both methods are usable. Keep reading about Ubuntu and it will all start to make sense. – pavium Nov 1 '09 at 11:26

1: Provide the contents of /etc/fstab. This should help getting some useful answers here.

2: Normally one wants to hide the details of what the physical layout of the drives is. Linux Filesystem Hierarchy Standard:

/dev/ Essential devices, e.g., /dev/null.

/etc/ Host-specific system-wide configuration files (the name comes from et cetera).

/opt/ Optional application software packages

/usr/ Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.

/var/ Variable files—files whose content is expected to continually change during normal operation of the system—such as logs, spool files, and temporary e-mail files. Sometimes a separate partition.

/var/www/ Website file hierarchies (the default location for websites served by Apache).

3i-viii: The Synaptic Package Manager should have defaults that just work.

c:\dev\: /dev/ is for physical DEVices. Since /dev/ already has meaning different than developer something else is needed.

c:\dev\: To clearly distinguish the live development machines run-time file from the development files and to provide a networked shareable files I have seen a separate directory directly under / such as "Root Of Software Engineering", /rose/, for: c:\dev\workarea, the source, temporary build files and the exported/deliverable results of the builds. It would have source code repositories. Individual developers would keep their working copies in the their home directory under /home/. When a work session is completed the files are placed back into the project directories under /rose/

The developer tools would be installed wherever the package manager normally puts them, the developer work results would be under something like /rose/, personal work in progress would be in the user's home directory under /home/.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.