Welcome!
Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

No swap in fstab

Post Reply
garg
Forum Novice
Forum  Novice
Posts: 5
Joined: Mon Jan 21, 2019 8:34 pm

No swap in fstab

#1

Post by garg » Mon Jan 21, 2019 8:51 pm

A while back I installed MX 17.? from a live USB. As my previous install was debian, I had the installer format the root and swap partition and retained my existsing home. This all went well and I'm very happy with MX. Recently I've begun to have random freezes and after some digging found many many people were also having freezes due to no swap configured. This appears to also be my problem so hopefully it's now resolved.

So the issue I'm raising is why didn't the installer put the proper info in fstab so the swap partition I had created would survive a restart? Obviously many others have the same problem. If this has been fixed already then wonderful. I did a search of the forums and couldn't find any relevant related content.

Thanks.

User avatar
dolphin_oracle
Forum Veteran
Forum Veteran
Posts: 11484
Joined: Sun Dec 16, 2007 1:17 pm

Re: No swap in fstab

#2

Post by dolphin_oracle » Mon Jan 21, 2019 9:23 pm

Good question ...it's supposed to. We will take a look that ks.for the report.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad T530 - MX-18
lenovo s21e - MX-18, antiX-17.3.1 (live-USB)
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
figueroa
Forum Regular
Forum Regular
Posts: 396
Joined: Fri Dec 21, 2018 12:20 am

Re: No swap in fstab

#3

Post by figueroa » Mon Jan 21, 2019 11:06 pm

My two full installations from a live-usb onto real hardware with existing swap partitions found a swap partition and put it into the fstab. My two installations into a VirtualBox virtual machine automatically created a swap partition and put it into the fstab. These were routine installations where I did nothing special. My live-usb drives were MX-17 to start with and eventually updated to MX-18 and remastered prior to the last two installations.
Andy Figueroa
Using Unix from 1984; GNU/Linux from 1993

garg
Forum Novice
Forum  Novice
Posts: 5
Joined: Mon Jan 21, 2019 8:34 pm

Re: No swap in fstab

#4

Post by garg » Thu May 16, 2019 7:11 pm

I stumbled over the cause of this.

I have a multi-boot environment with 4 or 5 distributions installed at any particular time. Whenever a new distribution is installed, it reformats the swap partition, which, by definition, changes the UUID of that partition. This breaks the fstab swap definitions in all the distributions that are currently installed, and makes them no longer use swap when they are in use. You currently have to go back and manually update all the other fstab's to now use the updated UUID.

So is there really a reason to reformat the swap every time a new distribution is installed? Maybe it should be optional.

User avatar
asqwerth
Forum Veteran
Forum Veteran
Posts: 4565
Joined: Sun May 27, 2007 5:37 am

Re: No swap in fstab

#5

Post by asqwerth » Fri May 17, 2019 1:38 am

garg wrote:
Thu May 16, 2019 7:11 pm
I stumbled over the cause of this.

I have a multi-boot environment with 4 or 5 distributions installed at any particular time. Whenever a new distribution is installed, it reformats the swap partition, which, by definition, changes the UUID of that partition. This breaks the fstab swap definitions in all the distributions that are currently installed, and makes them no longer use swap when they are in use. You currently have to go back and manually update all the other fstab's to now use the updated UUID.

So is there really a reason to reformat the swap every time a new distribution is installed? Maybe it should be optional.
You don't have to reformat swap for it to work, but not every distro installer gives you that option.

For most installers in Debian/Ubuntu-based distros including MX, it will detect existing swap partitions but you can choose not to format it during the installation. I believe most of these installers will give you the choice to use existing swap partitions without reformatting and write their current UUID (as is) into the fstab file. Some installers (I think) might even just use the existing swap, whether or not you select swap during installation, so long as you don't choose to (re)format it. MX installer does that.

For other distros, some might give you the same option. If not, just don't select any swap partition as part of the install process. This might mean no swap entry in the fstab file, requiring you to subsequently manually edit the fstab file. I have no issue with that.

But for quite a few Slackware-based distros (I tried Vector Linux, Zenwalk, Salix), the "choose swap" step appears to be compulsory, and then the installer automatically reformats it. Argh. Only Slackel allowed me to choose not to have (ie, not to format) a swap partition, from what I can recall.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
jackdanielsesq
Forum Novice
Forum  Novice
Posts: 75
Joined: Sun Apr 21, 2019 9:02 am

Re: No swap in fstab

#6

Post by jackdanielsesq » Fri May 17, 2019 2:29 am

Its a Debian thing - I would get the eternal 90sec wait on each distro - had 15x partitions/distros
Discovered the 'format, not to format cause' - but not all installers are created equally
Eliminated the swap-file - had plenty RAM - skipped over the swap-file warnings - all copacetic
Regards
Jack

User avatar
asqwerth
Forum Veteran
Forum Veteran
Posts: 4565
Joined: Sun May 27, 2007 5:37 am

Re: No swap in fstab

#7

Post by asqwerth » Fri May 17, 2019 3:51 am

jackdanielsesq wrote:
Fri May 17, 2019 2:29 am
Its a Debian thing - I would get the eternal 90sec wait on each distro - had 15x partitions/distros
Discovered the 'format, not to format cause' - but not all installers are created equally
Eliminated the swap-file - had plenty RAM - skipped over the swap-file warnings - all copacetic
Regards
Jack
It's not a Debian thing but a systemd thing.

When you boot any distro using systemd, and it finds that the swap UUID in the distro's fstab file is no longer detected in any of the partitions on any device, it will activate the 90 sec check.
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

Post Reply

Return to “Installation”