Again, this can be done with fdisk and parted. Let's have a look at fdisk first.
Assuming that you have device available on /dev/sdc and you want to use it all
- fdisk /dev/sdc
- Type p
- Type 1
- Hit enter twice
- Type t
- Type 82
- Type w
mkswap /dev/sdc1
and now we can activate with
swapon /dev/sdc1
You can check it with
swapon -s
Filename Type Size Used PriorityNow we need to add it to the /etc/fstab file, which can be done with the following command:
/dev/sda2 partition 2047992 0 -1
/dev/sdc1 partition 1044184 0 -2
echo "/dev/sdc1 swap swap defaults 0 0" >> /etc/fstab
No comments:
Post a Comment