Nov 5, 2009

How to add a second disk to your ubuntu box using command line

Recently I have installed ubuntu karmic (9.10) on my old box. It also had a second older disk (160Gb) with FreeBSD on it, which I wanted to use within this box. Adding another disk via command line is not that hard as you might think it is, but I don't reccomend doing it by yourself if you have just switched to ubuntu from window$. Anyways I have tested this howto on karmic koala and it worked like a breeze, but don't blame me when somthing goes wrong - use this howto at your own risk :P

At first I will post a short overview of what needs to be done:

1, Partition the disk with fdisk
2, Create the filesystem on the partition with mkfs
3, Mount the filesystem with mount and /etc/fstab file