fdisk -land find the new drive's device (we'll call it xxx).
sudo fdisk /dev/xxxand create a new primary partition (enter
1, default, default).
mkfs.ext3 /dev/xxx1to format the new partition.
- Label the new ext3 partition using
sudo e2label <new-label>
sudo /etc/init.d/udev restart
- Edit /etc/fstab to add the new partition to the list of mounts.
Installing a New Hard Drive on Ubuntu
Installing a new hard drive isn't a particularly arduous task, but there are a few commands I usually forget. Here are the steps I take after hooking up a new drive: