Posts: 21
Jon_J
Joined: 21 Jan 2014
#1
I have installed antiX-15-beta2 and selected"use existing swap partition" in the installer.
I have no swap enabled in antiX-15 install.
So I issued the command:
swapon /dev/sda5 (I looked in gparted to see which partition the swap is located.)
This is only a temporary solution. Upon rebooting the swap partition is not enabled.
Next I decided to edit / etc/fstab in the control center. There was no entry in fstab for a swap partition.
I didn't know exactly what to do, so I copied an entry in fstab from ubuntu on my handheld Zaurus device.
I changed the partition name to /dev/sda5
That borked my antiX installation and the window manager didn't load.
I had to boot the Live antiX media to access the readonly file system to change my / etc/fstab back to its original condition. This got me back to loading the window manager. __{{emoticon}}__
nano could not write out when I was outside of X on my installed antiX - readonly file system
Is there an easier way to permanently enable my swap partition in antiX-15?

Thank you,
Jon
Posts: 325
male
Joined: 04 Nov 2011
#2
Do you have a swap (not temporary), then identify and so Add:

Code: Select all

male@antix1:~
$ su
Passwort: 
root@antix1:/home/male# blkid -c /dev/null -o list
device             fs_type   label      mount point            UUID
---------------------------------------------------------------------------------------------------
/dev/sda1          ext4                 (not mounted)          e37b89aa-7295-4cc9-9f2b-2bd3705e622f
/dev/sda5          swap                 <swap>                 155fec67-8fb0-425e-b474-93a8fe189abc
/dev/sda6          ext4      DATEN      /media/DATEN           6df0602b-0ba8-468e-b543-5c826468cc63
/dev/sda7          ext4      antiX15    /                      0ec896c8-cce7-4240-9771-cd1c0dcddbf6
root@antix1:/home/male# 
etc/fstab

Code: Select all

# Pluggable devices are handled by uDev, they are not in fstab
UUID=0ec896c8-cce7-4240-9771-cd1c0dcddbf6 / auto defaults,noatime 1 1
# Added by make-fstab /dev/sda1
UUID=e37b89aa-7295-4cc9-9f2b-2bd3705e622f  /media/sda1                                 ext4       noauto,exec,users               0 0
# Added by make-fstab /dev/sda5
UUID=155fec67-8fb0-425e-b474-93a8fe189abc  swap                                        swap       defaults                        0 0
# Added by make-fstab /dev/sda6  label=DATEN
UUID=6df0602b-0ba8-468e-b543-5c826468cc63  /media/DATEN                                ext4       auto,exec,users               0 0
reboot
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#3
@Jon_J, please post the output of:

Code: Select all

sudo blkid
or even better:

Code: Select all

sudo blkid | grep swap
The first will list all of your partitions including any swap partitions. The 2nd only lists the swap partitions. If a swap partition exists then it should show up in these outputs. Likewise, any swap partitions that are listed should have been added to your new fstab on the installed system.

Here is what I get here:

Code: Select all

$ sudo blkid | grep swap
/dev/sda6: UUID="42f0ed56-0643-437a-8772-5a6e86240c4b" TYPE="swap" PARTUUID="0005b2b8-06" 
and here is the fstab entry for it that got created:

Code: Select all

UUID=42f0ed56-0643-437a-8772-5a6e86240c4b  swap    swap    defaults    0 0
(I removed extra whitespace to make it fit better in this post)

You will probably not get a PARTUUID in your blkid output.
Posts: 21
Jon_J
Joined: 21 Jan 2014
#4
Thank you, that worked.
The entry that I used which got me into trouble didn't have a UUID number, just /dev/sda5
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#5
The swap partition entry in fstab should have been created automatically during the install process. I'm concerned that it didn't. So there is a swap partition in the output of"lsblk" but it didn't show up in the fstab when you did the install? This is why I wanted to see the output of"sudo lsblk | grep swap".
Posts: 21
Jon_J
Joined: 21 Jan 2014
#6
Edit: BitJam, I think I may have found why swap wasn't working on my antiX-15 install.
I just noticed when booting MX-14.4, my swap is also missing. I used male's suggestion to enable swap in MX-14 as well.
The UUID number for sda5 (swap) was different in my MX-14 / etc/fstab
I put in the new number and swap now works again in MX-14.
Before I installed antiX-15b2, I deleted my Crunchbang partition which is sda7 and also resized it.
That may have changed the UUID numbers for the other partitions. Then I used sda7 to install antiX-15b2.
sda4 is the extended partition, and sda5 (swap) resides inside sda4.
Could that be the problem in detecting swap?
BitJam wrote:@Jon_J, please post the output of:

Code: Select all

sudo blkid
or even better:

Code: Select all

sudo blkid | grep swap
The first will list all of your partitions including any swap partitions. The 2nd only lists the swap partitions. If a swap partition exists then it should show up in these outputs. Likewise, any swap partitions that are listed should have been added to your new fstab on the installed system.

Here is what I get here:

Code: Select all

$ sudo blkid | grep swap
/dev/sda6: UUID="42f0ed56-0643-437a-8772-5a6e86240c4b" TYPE="swap" PARTUUID="0005b2b8-06" 
and here is the fstab entry for it that got created:

Code: Select all

UUID=42f0ed56-0643-437a-8772-5a6e86240c4b  swap    swap    defaults    0 0
(I removed extra whitespace to make it fit better in this post)

You will probably not get a PARTUUID in your blkid output.
BitJam, I missed your post yesterday because I clicked"go to last post".
Here's my output of the commands: (This is after I enabled swap using the suggestion that male posted)

Code: Select all

bill@antix15:~
$ sudo blkid
/dev/sda1: LABEL="win-xp" UUID="A290F08690F061E9" TYPE="ntfs" PARTUUID="a42d04a3-01"
/dev/sda2: UUID="e7d9ae34-8eb3-474a-b7b9-1d267b77c4fd" TYPE="ext4" PARTUUID="a42d04a3-02"
/dev/sda3: LABEL="MX-14.4" UUID="333d73df-5ed9-4b42-a5d6-2cd800ea920c" TYPE="ext4" PARTUUID="a42d04a3-03"
/dev/sda5: UUID="be8880e3-982b-49f4-8a03-33c50cf0b9a0" TYPE="swap" PARTUUID="a42d04a3-05"
/dev/sda6: LABEL="debian608" UUID="2419ccbf-9c18-452b-ad0e-fb9a399ad2a0" SEC_TYPE="ext2" TYPE="ext3" PARTUUID="a42d04a3-06"
/dev/sda7: LABEL="antiX15root" UUID="637377da-6485-4334-af76-6d9947b3f508" TYPE="ext4" PARTUUID="a42d04a3-07"
/dev/sda8: UUID="bff62785-ab13-4b1a-8c74-92d595874a87" TYPE="ext4" PARTUUID="a42d04a3-08"
bill@antix15:~
$ 

$ sudo blkid | grep swap
/dev/sda5: UUID="be8880e3-982b-49f4-8a03-33c50cf0b9a0" TYPE="swap" PARTUUID="a42d04a3-05"
bill@antix15:~
$ 
Here is lsblk

Code: Select all

bill@antix15:~
$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 149.1G  0 disk 
├─sda1   8:1    0    20G  0 part 
├─sda2   8:2    0    10G  0 part 
├─sda3   8:3    0  21.8G  0 part 
├─sda4   8:4    0     1K  0 part 
├─sda5   8:5    0     2G  0 part [SWAP]
├─sda6   8:6    0    30G  0 part 
├─sda7   8:7    0    30G  0 part /
└─sda8   8:8    0  35.3G  0 part 
bill@antix15:~
$ 
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#7
Did the swap partition exist when you installed antiX-15-beta2? Or did you create the swap partition after you did the install?
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#8
Before I installed antiX-15b2, I deleted my Crunchbang partition which is sda7 and also resized it.
That may have changed the UUID numbers for the other partitions. Then I used sda7 to install antiX-15b2.
Did you delete and remake the swap partition. that would do it. Its also possible that during one of your installs, the swap partition was formated again, which will change the uuid.

in the antiX installer, if you choose a particular partition for swap from the drop down list rather than use the"none or existing" choice, the swap partition will get reformatted and therefore change the UUID.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#9
New for antiX-15, we are running"make-fstab --install /mnt/antiX" during the install process. It should find all swap partitions that exist at that time and add them to the fstab of the new system. If no swap partition showed up in the fstab of the new system then either there is bug in make-fstab or the swap partition was added after the installation. Changes to the swap UUID before the installation should have no effect. If the swap partition was removed or overwritten before the install then that would explain everything.
Posts: 94
james c
Joined: 23 Apr 2014
#10
For what it's worth, AntiX 15 has been finding and creating a correct fstab for my installs,two swap partitions on this particular box..

Much easier than the manual editing required in earlier versions.

Code: Select all

james@antix1:~
$ sudo blkid | grep swap
/dev/sda5: UUID="0681c3ae-23e2-4918-aeee-3f5ebe73a538" TYPE="swap" PARTUUID="80895fa3-05"
/dev/sdb5: UUID="0271a7ac-54d8-4503-91a0-86e1b532ec37" TYPE="swap" PARTUUID="8c3f2c41-05"
Posts: 1,139
masinick
Joined: 26 Apr 2008
#11
I think the problem here is that when some of us experiment, adding, removing, and moving around our distributions, especially test instances, quite often - I'd say in most cases, the swap partition gets rewritten, creating a new UUID.

Frankly, this is a problem that I have with the UUID design in the first place, combined with the changes in GRUB 2. In the old scheme, we used to simply edit partition names in our file system table and our boot manager. With the new system, the boot manager can be rerun using the root administrator command update-grub, but we have no simple provision that goes into the mount table of each distribution we have installed, updating any changes to the UUID of the MODIFIED swap partition, and therefore it's fairly common to run into these issues.

The antiX installation tools can probably overcome these issues by updating the file system table and the boot loader at the latest possible time at the end of an installation, thereby ensuring that the kernel names, initrd references, and mount points are current as of the invocation of these tools at the end of an installation.

What even a well-written tool cannot account for are system changes made after the time the tools are invoked. Only rerunning the tools as a maintenance task might be a workaround to resolve changes in the file systems caused by other (possibly extraneous) activities.

Perhaps a couple of things would help:

1. I think the tools are probably correct when they run during installation time, but there may be a need for either another tool or the flexibility of the tool to be run outside of the installation window.

2. A document that describes when the boot loader is updated, when the mount points are created and updated, and information about how to modify either the boot loader or the mount points, including swap, particularly when modified externally by some program outside the scope of our project's software might help newcomers diagnose and figure out these problems - if such documentation is well organized and easily accessed. I know we have a lot of great documentation already; not sure if any of it needs to be changed or not, but I'll take a look, and if I have any suggestions, I'll either make them or provide the changes to them, depending on where the information is located and what my access is to it.
Posts: 1,139
masinick
Joined: 26 Apr 2008
#12

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.mepis.org/docs/en/index.php?title=Fstab"
linktext was:"http://www.mepis.org/docs/en/index.php?title=Fstab"
====================================
contains a pretty decent article about managing swap. There are other sources on the Internet that also provide very good information; the Arch Linux Wiki has good information about swap that is generally applicable to our projects:
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://wiki.archlinux.org/index.php/Swap"
linktext was:"https://wiki.archlinux.org/index.php/Swap"
====================================


The Linux.com site has an article about space space, too, that may provide additional useful information. You can read it at
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.linux.com/news/software/applications/8208-all-about-linux-swap-space"
linktext was:"http://www.linux.com/news/software/appl ... swap-space"
====================================