Sir.
I recently installed Linux mint.
I have two Hard drives on my desk top.
How can I have a SWAP partition on my second hard drive for 4GB.
Existing drive is having 2GB by default during installation and Iam unable to increase it.
Iam new to linux and please suggest solution using Gparted.
My RAM is 2GB.
SWAP partition on second hard drive
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
SWAP partition on second hard drive
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: SWAP partition on second hard drive
Hello Subramanian
Welcome to Linux Mint and the Linux Mint forum
You can use gparted to create a swap partition by formatting it linux swap from the format options.
In order to use it you'll have to edit /etc/fstab and change the existing swap partition designation to the new one.
Welcome to Linux Mint and the Linux Mint forum
You can use gparted to create a swap partition by formatting it linux swap from the format options.
In order to use it you'll have to edit /etc/fstab and change the existing swap partition designation to the new one.
Re: SWAP partition on second hard drive
Hello.
Create a partition on the second hard drive of the size you want your swap partition to be. I dont use gparted as often as I should but you should see a option during the creation of the partition as to what type it should be. Its should be 'swap'.
Then turn your swap off in linux by this command:
Then edit your /etc/fstab file to reflect the change in the partition of the swap partition. You will see a line there mentioning the swap partition. Change the drive location only.
ADDED MORE HERE: After making the change to the swap partition location in fstab you will want to remount the filesystem I do believe:
Then turn swap back on:
That should do it. BTW -- swap as I recall should be approximately twice the amount of ram that you have.
Create a partition on the second hard drive of the size you want your swap partition to be. I dont use gparted as often as I should but you should see a option during the creation of the partition as to what type it should be. Its should be 'swap'.
Then turn your swap off in linux by this command:
Code: Select all
sudo swapoff -a
ADDED MORE HERE: After making the change to the swap partition location in fstab you will want to remount the filesystem I do believe:
Code: Select all
sudo mount -a
Code: Select all
sudo swapon -a
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710 - List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
Dell PE T610, Dell PE T710 - List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
Re: SWAP partition on second hard drive
To the drive "designation" you need the UUID, since partitions are like Borg, they don't have names, only numbers.
get the uuid with
get the uuid with
Code: Select all
sudo blkid