I have just installed Ubuntu into one of two 60GB partitions on my hard disc. I think it is sda2 and that the other partition (sda1) contains a failed installation of Ubuntu. Sda2 is further divided into sda6 (59GB) and sda5 (swap space), so can I conclude that the working copy of Ubuntu is in sda2? The disk utility tells me that sda1 is not mounted and bootable, and sda6 is mounted at / but the partition flag just says “-“. How can I delete the failed installation and ensure that I can still boot, please?
I suspect you have this setup:
1 HDD, partitioned with the MBR scheme:
SDA1: A primary partition (containing your failed installation) SDA2: An **extended** partition, containing two volumes: SDA5 (1 GB, swap) SDA6 (59 GB) SDA3: not used. SDA4: not used.
(Drives partitioned with the MBR schema can only have up to 4 primary partitions. One of those can be an extended partition which basically says 'turn the page, look at the next list for more partitions whose data does not fit in the primary part).
If this is the case you should be able to set partition 6 to active.
You do that with:
Note that there should only be one single active partition at the time. If sda1 is also marked active then you either have to manually remove this flag. You toggle it in the same way as you did with partition 6. From fdisk type
1 (Active, partition number to change).
However, start with
fdisk -l (fdisk, list all partitions) or with
p (fdisk on /dev/sda, then print partition table) to verify that the partition layout is as I assumed.
Example output from the VM I just tested with: (sda1 is active in this example).
Device Boot Start End Blocks Id System /dev/sda1 * 2048 16779263 8388608 83 Linux /dev/sda2 16779264 20971519 2096128 82 Linux swap / Solaris
To change which partition will be bootable from terminal: (I'm not sure does it works that way if you have EFI boot)
sudo sfdisk -AX /dev/sdY
where X is partition number you want to boot from, and Y is disk number.
To get know your partitions and disks type
sudo sfdisk -l
sudo fdisk -l