There is a tool called fdisk, which is a real terminal program without any graphical user interface. It needs to be called as root (just like all other of these more serious applications). Let's see what it can do:
Code: Select all
bbq@grill:~ sudo fdisk
Usage: fdisk [OPTION]... [DEVICE]
Code: Select all
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: 0x000d41f5
Device Boot Start End Blocks Id System
/dev/sda1 4094 242511871 121253889 5 Extended
/dev/sda2 254035968 291146117 18555075 83 Linux
/dev/sda3 291147776 301387775 5120000 83 Linux
/dev/sda4 * 301387776 312580095 5596160 83 Linux
/dev/sda5 4096 10244095 5120000 83 Linux
/dev/sda6 10246144 14342143 2048000 82 Linux swap / Solaris
/dev/sda7 14344192 25720831 5688320 83 Linux
/dev/sda8 25722880 38010879 6144000 83 Linux
/dev/sda9 38012928 52348927 7168000 83 Linux
/dev/sda10 52350976 71929855 9789440 83 Linux
/dev/sda11 71931904 92616703 10342400 83 Linux
/dev/sda12 92616705 107851078 7617187 83 Linux
/dev/sda13 107853824 142612479 17379328 83 Linux
/dev/sda14 142614528 185620479 21502976 83 Linux
/dev/sda15 185620543 231133183 22756320+ 83 Linux
/dev/sda16 231135232 242511871 5688320 83 Linux
Disk /dev/sdb: 1973 MB, 1973419008 bytes
64 heads, 32 sectors/track, 1881 cylinders, total 3854334 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: 0x2b8b8fd1
Device Boot Start End Blocks Id System
/dev/sdb1 * 0 620543 310272 17 Hidden HPFS/NTFS
Disk /dev/sdb1: 317 MB, 317718528 bytes
64 heads, 32 sectors/track, 303 cylinders, total 620544 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: 0x2b8b8fd1
Device Boot Start End Blocks Id System
/dev/sdb1p1 * 0 620543 310272 17 Hidden HPFS/NTFS
Code: Select all
sudo blkid -o list
Code: Select all
/dev/sda5 ext4 WORK / 7dd68644-0f72-434e-b5fc-8381f0424f91
So fdisk can show us the position and size of the partitions, and we can do all serious operations with it: resizing, moving, copying and creating partitions. And we can delete them, too. Probably not what we want. Let's start it with an interactive command mode:
Code: Select all
sudo fdisk /dev/sda
Before you completely quit fdisk, you want to [w]rite the new partition table to the disk. Remember that it will probably (!) not be updated in mtab yet, so you will need to reboot to see changes.
fdisk is powerful but not for first-timers. I recommend to play around with it inside a virtual environment, like Virtualbox. Create a virtual machine with 10 GB, and install Spring (or any netinstall Linux distro), and play around with fdisk to get comfortable with it. Once you understand how logical and primary partitions work, and how you can resize them non-destructively, you will use fdisk over gparted :)
A little addition for your convenience: you might want to create a filesystem on the partition, for example an ext4, using mke2fs
Code: Select all
sudo mke2fs -t ext4 /dev/sda5