Adding a swap partition without formating anything on a disk

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
orlox

Adding a swap partition without formating anything on a disk

Post by orlox »

Hi. I have a mint installation done on a computer in which at the moment of the install, a swap partition could not be assigned or created. I was wondering if it is possible to create one without having to format any of the partitions present on the system.
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.
lauren

Re: Adding a swap partition without formating anything on a

Post by lauren »

Hi oriox!
In Windows you have a file, in Linux a partition, so you have to create a partition for swap.
1. What about your RAM? Please post the output of

Code: Select all

free
2. We must see your partitions, please first post the output of - as root

Code: Select all

parted -l print
lowercase "L"

Code: Select all

fdisk -l
and see if - as root - again

Code: Select all

gparted
shows your partitions (you could attach a screenshot).
orlox

Re: Adding a swap partition without formating anything on a

Post by orlox »

Right now im not at my home so I cant give you the output of those commands directly, but I remember most of that info.
The ram in the computer is 1gb, but appears listed as ~870MB (I think this is related to the difference between bit and byte), so I think a swap partition could come in hand eventually.

The HDD has two partitions, sda1 which has windows installed, and sdb5 which has mint 10. Each of them has a size of order ~80GB, but the windows partition doesn't have a lot of free space, so the ideal thing to do would be to take a bit of space from the mint partition to create swap space.
lauren

Re: Adding a swap partition without formating anything on a

Post by lauren »

Hi!
Sorry, I'm offline for a few days, but in any case you should post the outputs.
BTW: It's not bit/ byte, maybe it's MiB / MB (factor 1.024; I don't know the exact English expression, maybe: 2 to raise to the power of 10 = 1024).

Seeley has written some HOWTOs, in one of them he is writing about swap: http://forums.linuxmint.com/viewtopic.p ... =63013/url
and his help is useful: http://forums.linuxmint.com/viewtopic.p ... 366328/url
proxima_centauri

Re: Adding a swap partition without formating anything on a

Post by proxima_centauri »

Orlox,

I would recommend the following method, for creating a SWAP file on the local disk - instead of making it's own partition -> http://distrowatch.com/weekly.php?issue=20110117#qa
orlox

Re: Adding a swap partition without formating anything on a

Post by orlox »

proxima_centauri wrote:Orlox,

I would recommend the following method, for creating a SWAP file on the local disk - instead of making it's own partition -> http://distrowatch.com/weekly.php?issue=20110117#qa
Right on! added my swap file with no problems.

Thanks :D
Locked

Return to “Other topics”