Partitions and Booting

Graphical Partition Editor

Gparted is a graphical tool to edit disk partitions.

  1. Install the gparted package (see Chapter 2, Adding, Removing and Updating Applications).

  2. You can run the application with System->Administration ->Gnome Partition Editor .

Make partitions available from Ubuntu

Windows and other partitions should be automatically available from any Ubuntu system. If they are not, you can enable them using the graphical disks tool.

  1. Open System->Administration->Disks

  2. Select the correct hard disk, and click the Partitions tab.

  3. Select the relevant partition, and click Enable.

  4. To unmount the partition, click Disable.

Make partitions automatically available

Again, Windows and other partitions should be automatically available from Ubuntu. If they are not, the following procedure will make them automatically available:

  1. Read the section called “Check disk space usage and view the partition table”

  2. First make a directory where the partition can be made available ("mounted"):

    sudo mkdir /media/windows
  3. Next, backup your disk configuration file and open the file in a text editor with administrative privileges:

    sudo cp /etc/fstab /etc/fstab_backup
    gksudo gedit /etc/fstab
  4. Append the following line at the end of file:

    /dev/hda1 /media/windows ntfs umask=0222 0 0


    Replace /dev/hda1 with the correct device name for your partition.

    If your Windows partition uses the FAT32 filesystem, replace ntfs with vfat in the above command.

    If you have a FAT32 filesystem, it is also safe to allow read-write access. To do this, change the value of umask to 0000.

  5. Save the edited file (an example)

  6. The changes will take effect when the computer is restarted.

Run a system command automatically at startup

Sometimes it can be useful to add a custom command to the startup process so that your computer executes it on every boot. To do this:

  1. Edit the crontab with administrative privileges (see the section called “Root And Sudo”):

    sudo crontab -e
  2. Insert the following line:

    @reboot /home/user/command

    Replace /home/user/command with the full address to your command.

  3. Save the file and exit.

Change default Operating System at boot

To change the Operating System which starts by default when booting, it is necessary to edit the configuration file for booting.

  1. Make a backup of your boot configuration file, and open it in a text editor:

    sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
    gksudo gedit /boot/grub/menu.lst
  2. Find this line:

    default 0
  3. Replace with the following line:

    default X_sequence
  4. Save the edited file (an example)

Permanently disable/enable boot-up services

This requires administrative privileges (see the section called “Root And Sudo”).

  1. Run Services Settings: System->Administration->Services.

  2. Enter your password.

  3. Tick/untick the services you want running, then click OK when done.

  4. For greater control over the boot-up services, install the bum from the Universe repository (see Chapter 2, Adding, Removing and Updating Applications) and run it: System->Administration->Boot-up Manager.