0

If I go to settings - disks (xubuntu) I see 3 swap partitions (2.1, 2.5 and 6.2 GB) but only one is in use, the 2.1, the smaller one, the others are wasted space. I can activate the other two partitions, but if I restart the other two partitions are deactivated. how can I make these partitions to be activated at start, or better, to unify this partitions to have only one.

Thank you

the result of: sudo fdisk -l:

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009b081

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   122880676    61336914+   7  HPFS/NTFS/exFAT
/dev/sda3       122882048   495726362   186422157+   7  HPFS/NTFS/exFAT
/dev/sda4       495726590   625141759    64707585    5  Extended
/dev/sda5       613066752   625141759     6037504   82  Linux swap / Solaris
/dev/sda6       608186368   613056511     2435072   82  Linux swap / Solaris
/dev/sda7       495726592   603994111    54133760   83  Linux
/dev/sda8       603996160   608172031     2087936   82  Linux swap / Solaris

Partition table entries are not in disk order
9
  • I would delete them. Why do you want multiple swap partitions? You can monitor the amount of swap space used with the command $free
    – j0h
    Jan 20, 2014 at 13:16
  • I do not want multiple swap partitions, I do not made it, it`s just there, my question was how to make these three to be one. And I do not wish to delete the other two, because 2 GB is not enough. Jan 20, 2014 at 13:19
  • 2
    (I believe,) in order to combine multiple swap partitions the space would need to be contiguous. post $sudo fdisk -l
    – j0h
    Jan 20, 2014 at 13:24
  • I tried $sudo fdisk -l –, and $sudo fdisk -l but nothing happened Jan 20, 2014 at 13:29
  • ok, must be without $, and the result is: Jan 20, 2014 at 13:34

2 Answers 2

1

You have an uncommon configuration. We may correct it.
Boot from a Live CD and use the pre-installed partition tool to:

  1. Check if the partitions are contiguous (in sequence; if they are, you can continue).
  2. Wipe (delete permanently) the three partitions. In the free space, create a new big partition and format it as Linux SWAP space.

If the point 1 fails, reboot in you HD linux distro and follow THIS GUIDE (CLICK HERE) to create a swap file. (after that your can still delete the three swap partitions and format them as EXT3 to use them as free space ;-) )
Let us know any problem by commenting under here. If I'm useful press the up arrow on the left and mark as useful response.

3
  • ok, I started ubuntu from usb card, I used gparted to delete the unused partitions, and I rescaled the one. Now I have a blank screen with: error: 'boot/grub/i386-pc/normal.mod' not found grub rescue> Jan 20, 2014 at 15:42
  • 1
    ok, I found the solution: opensource-sidh.blogspot.ro/2011/06/… Jan 20, 2014 at 16:11
  • This is a strange error, I did myself the procedure and I never had this problem. Minutes ago I did a small research and the problem might be caused by an hardware malfunctioning or gparted that did an error. In both cases you followed the right procedure and the problem should not repeat itself. :) If it repeats (I hope not) the HD might be damaged or too old. My suggestion is to always backup your work on a mass device (USB, external HD ecc.) or on one.ubuntu.com, the official Ubuntu service. The suggestion is valid twice if you use NT systems. I give you an up arrow for your comment. ;) Jan 20, 2014 at 17:55
1

You can activate all your swap partitions at startup if you add them to your /etc/fstab file. Now you likely have only one of them there. You can use that present line as a pattern on how to add 2 new lines for the missing ones. The new lines will only differ in the UUID, where you will have to add the UUIDs of the missing swap partitions.

Or you can combine all your swap partitions to a single swap partition as they are contiguous. Boot from a liveCD and use e.g. gparted. First swapoff all the swap partitions if any is mounted in the live environment, then combine the three swaps to a single swap partition, then edit your /etc/fstab file to contain the UUID of your new swap partition at the swap line.

(If this is not clear just post the output of your /etc/fstab file and the output of ls -l /dev/disk/by-uuid and I give more detailed instructions.)

1
  • how to combine the three swaps to a single swap partition ?
    – Victor
    Mar 6, 2023 at 20:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .