Changing ubuntu partition into the C: drive

Asked by Brian Marine

I had a dual boot of ubuntu and windows then deleted windows. Now my drive summary says i have
sda1
sda3 (ubuntu)
sda4 (extended partition)
sda5 (logical swap partition)

and i want to know how to change this into
sda1
sda2 (ubuntu)
sda3(extended)
sda4(logical swap)

and change my ubuntu partition in to the C: drive volume
when i go to file system and click properties on file system it says
location:
volume: unknown
and i want to fix this but i dont know what to do please help

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubiquity Edit question
Assignee:
No assignee Edit question
Solved by:
Brian Marine
Solved:
Last query:
Last reply:
Revision history for this message
Warren Hill (warren-hill) said :
#1

C drive, D drive etc are a windows concept and do not exist in Linux/Unix

Open a console (CTRL+ALT+T) and enter the the following command

sudo fdisk -l

Enter your password and you will see something like this

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0006d954

   Device Boot Start End Blocks Id System
/dev/sda1 * 2048 616957951 308477952 83 Linux
/dev/sda2 616959998 625141759 4090881 5 Extended
Partition 2 does not start on physical sector boundary.
/dev/sda5 616960000 625141759 4090880 82 Linux swap / Solaris

This tells you that sda is my hard drive and sda1, sda2 and sda5 are its partitions,

In my case sda1 is my main partition (equivelent of C drive under windows)

If you now (in the terminal) enter

ls /

you should see something similar to this

$ ls /
bin dev initrd.img lost+found opt run srv usr
boot etc initrd.img.old media proc sbin sys var
cdrom home lib mnt root selinux tmp vmlinuz

This shows the file system is mounted correctly.

If you do then there is no problem please mark the question solved. If you get an error message then post back the full output of both commands and we will advise further

Revision history for this message
Brian Marine (crysisfreak7) said :
#2

when i enter sudo fdisk -l i get

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x2e9a647b

   Device Boot Start End Blocks Id System
/dev/sda1 2048 3074047 1536000 27 Hidden NTFS WinRE
/dev/sda3 * 3074048 299997183 148461568 83 Linux
/dev/sda4 299999230 312580095 6290433 5 Extended
/dev/sda5 299999232 312580095 6290432 82 Linux swap / Solaris

the first partition is toshiba system volume
the second in ubuntu
the third is the extended partition that my linux swap is in
the fourth in the linux swap

why are they missing the third, and what happens if i delete my toshiba system volume

Revision history for this message
Warren Hill (warren-hill) said :
#3

First I'm not sure why there is no sda2 but its not unusual for there to be gaps.

sda1 is a a type 27 partition which means it contains recovery data and was probably there to restore windows if required usually this is a bios option at start-up. Some keypress combination takes you to a menu that will allow you to reset the PC back to factory defaults.

If you are sure you nolonger require this you may be able to increase the size of sda3 provided the space is conitiguous to it. But you could certainly reformat it as a second partition and mount it in your file system.

Before doing changes to your system like this however its important to make sure your backups are good just in case anything goes wrong.

Revision history for this message
Brian Marine (crysisfreak7) said :
#4

alright, so you ar3e right when i start up it says toshiba and if i press for example f2 it allows me to select which device to boot from, would this render my computer unusable?

Revision history for this message
Warren Hill (warren-hill) said :
#5

I doubt it. I have done something similar recently with my daughters old laptop. That seems fine.

Personally I'd take the risk but its up to you

Revision history for this message
Brian Marine (crysisfreak7) said :
#6

alright, thank you so much for your help.