Posts: 69
Ninho
Joined: 28 Oct 2016
#1
For some reason, AntiX failed to notice or record a pre-existing Linux swap partition during install, despite I had one premade for it to use, and now my AntiX i's running without a swap __{{emoticon}}__ . I've searched the board and found a thread with a similar problem, but since it's 2 years old and since I'd like newbie-friendly easy-to-follow cut-n-pasteable instructions __{{emoticon}}__ that apply to my situation rather than a theory of why the installer did not do its magic, I' m posting a new question.

Here are the outputs of lsblk & blkid.The desired swap space is sda7 (1.2 G), and you'll notice it was skipped by the"blkid" listing. Please help !

Code: Select all

$ lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
fd0       2:0    1     4K  0 disk 
sda       8:0    0  74,5G  0 disk 
├─sda1    8:1    0  31,4M  0 part 
├─sda2    8:2    0     1G  0 part 
├─sda3    8:3    0   7,8G  0 part 
├─sda4    8:4    0     1K  0 part 
├─sda5    8:5    0  13,7G  0 part 
├─sda6    8:6    0   9,3G  0 part /
├─sda7    8:7    0   1,2G  0 part 
├─sda8    8:8    0 996,2M  0 part 
├─sda9    8:9    0  40,5G  0 part 
└─sda10   8:10   0  23,5M  0 part 
sdb       8:16   0  76,3G  0 disk 
├─sdb1    8:17   0  15,6G  0 part 
├─sdb2    8:18   0     1K  0 part 
├─sdb5    8:21   0    16G  0 part 
└─sdb6    8:22   0  44,5G  0 part 
sr0      11:0    1  1024M  0 rom
___________________________________________________________________
  $ sudo blkid 
/dev/sda1: SEC_TYPE="msdos" LABEL="31M_FAT12" UUID="3C74-1BEA" TYPE="vfat" PARTUUID="00000950-01"
/dev/sda2: SEC_TYPE="msdos" LABEL="1G_FAT16" UUID="9863-F4B1" TYPE="vfat" PARTUUID="00000950-02"
/dev/sda3: LABEL="W98_FAT32" UUID="0959-1B0F" TYPE="vfat" PARTUUID="00000950-03"
/dev/sda5: LABEL="WXP_FAT32" UUID="FC90-BDF4" TYPE="vfat" PARTUUID="00000950-05"
/dev/sda6: LABEL="antiX-16" UUID="3811044d-c6b0-4f13-93d6-701f2039a173" TYPE="ext3" PTTYPE="dos" PARTUUID="00000950-06"
/dev/sda8: LABEL="NTFS_1G" UUID="3C44575F44571ACA" TYPE="ntfs" PARTUUID="00000950-08"
/dev/sda9: LABEL="NTFS_40G" UUID="5C3C3E3C3C3E120E" TYPE="ntfs" PARTUUID="00000950-09"
/dev/sda10: SEC_TYPE="msdos" LABEL="24M_FAT16" UUID="D623-70C6" TYPE="vfat" PARTUUID="00000950-0a"
/dev/sdb1: LABEL="D2_P1" UUID="F8D4-5F87" TYPE="vfat" PARTUUID="4b8e39d2-01"
/dev/sdb5: LABEL="D2_BAKUPS" UUID="0C58-B395" TYPE="vfat" PARTUUID="4b8e39d2-05"
/dev/sdb6: LABEL="D2_NTFS_45G" UUID="BE5C34B75C346BF1" TYPE="ntfs" PARTUUID="4b8e39d2-06"
/dev/sda7: PARTUUID="00000950-07"
___________________________________________________________________

Last edited by Ninho on 31 Oct 2016, 00:13, edited 1 time in total.
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#2
Just to be clear. This is a swap partition we are talking about here. Not a swap file.

Post

Code: Select all

 sudo fdisk -l
During the install process. There is a button with a drop down menu for swap.
One option is to use present swap or existing swap partition. Did you use that button
option during the install process before proceeding to the file copy install process?

In all the testing and installs I have done since AntiX 7. This is the 1st I have heard of this happening.
My second question then is.

Did you md5sum your downloaded iso before making a bootable install disk/usb?
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#3
Your sda7 might have been ignored b/c it is considered too small to serve as an effective swap partition.
4Gb is the recommended minimum size for swap partition?
ask google:"linux minimum swap partition size"

How much RAM on your system?
FWIW, here, @2Gb, I set swappiness (via sysctl.conf) to a low value
and on 4Gb+ systems, I usually outright disable swap.

related: zram
(I believe zram too is often unneeded nowadays, and its use is potentially counterproductive)
Posts: 69
Ninho
Joined: 28 Oct 2016
#4
skidoo wrote:Your sda7 might have been ignored b/c it is considered too small to serve as an effective swap partition.
How much RAM on your system?
Just 0ne gigabyte minus a few mega (stolen by the integrated video).
I don't think size is a reson why the partition's been ignored, since it's greater than physical memory (which is not even a requirement for swap space. I had smaller swaps with the Linuces that I have ditched to make room for AntiX).
Rather it's the installer having a problem with the provided swapspace for some reason (maybe it was looking for some missing pattern).

Whatever... I wish to add that as a swap now !
related: zram
(I believe zram too is often unneeded nowadays, and its use is potentially counterproductive)
I have no idea what a"zram" is, sorry ! Is the 'zee' related to Zimmerman ? Something cryptographic ? Or compressed RAM space perhaps ?
Posts: 69
Ninho
Joined: 28 Oct 2016
#5
rokytnji wrote:Just to be clear. This is a swap partition we are talking about here. Not a swap file.
Indeed. Agreed.
During the install process. There is a button with a drop down menu for swap.
One option is to use present swap or existing swap partition. Did you use that button option during the install process before proceeding to the file copy install process?
Yes I did, but it did not seem to"see" the premade swap part (type 82). In an earlier attempt, I had let"gparted" create the partitions - which it borked the threading - creating links back from higher to lower disk positions ! Fortunately I'm rather experienced with partitionning and equipped with enough tools that i could rebuild EBRs without losing data from any other OS.
In all the testing and installs I have done since AntiX 7. This is the 1st I have heard of this happening.

My second question then is : did you md5sum your downloaded iso before making a bootable install disk/usb?
Good question. Yes I did md5sum the ISO. The burner in turn checked the install medium (CD).

I can't

Code: Select all

 sudo fdisk -l
at the moment (since I'm in Windows XP) but my partitions are good and sane I assure you.

I think I need a couple command lines (as root) to reset the would-be swap partition type (if needed), format it as a linux swap2 (if needed) and install it (in fstab IIRC). My linuxee was never strong and is totally rusty now, please help !
Posts: 45
hobbyist7890
Joined: 24 Apr 2016
#6
mkswap /dev/sda7
swapon /dev/sda7
free

Then just add the swap partition to the fstab file for automatic mounting.
Posts: 69
Ninho
Joined: 28 Oct 2016
#7
@ hobbyist7890 :
Done making and mounting the swap on /dev/sda7 !!
Then just add the swap partition to the fstab file for automatic mounting.
Like this :

Code: Select all

/dev/sda7 swap swap defaults 0 0
Right ? ...
Edited: Yep! This has installed the swap persistently!

Thank you so very much !