Jessie not playing nice with other distros (Rant)

Talking about SolydXK, another distribution or totally off-topic but within the Rules ? It's the right place!
User avatar
jsalpha2
Posts: 296
Joined: 28 May 2013 12:28

Jessie not playing nice with other distros (Rant)

Postby jsalpha2 » 27 Apr 2015 22:23

Just like the old Debian, when I installed I chose to share the swap partition. Debian is the only distro I know of that forces you to format the shared swap partition. This changes the UUID number of the swap partition and Debian runs fine, but when you boot back to another distro, it will run slow as heck until you edit fstab and change the swap's UUID number. The first time it happened to me I had no idea what to do. Even if you do know what to do it is a real pain in the butt to go into several distros and make the necessary changes.
Is there any way to de-select the formatting of the swap partition? (I looked, but did not see anything).
Is there any reason Debian chooses to do this? (A reason to format the swap partition?) Would not formatting the swap partition potentially cause any problems?

After testing, the new Jessie seems to work fine. I just get angry every time they stick it to me. I must be a slow learner. :(

User avatar
wyrdoak
Posts: 113
Joined: 07 Jan 2014 21:25

Re: Jessie not playing nice with other distros (Rant)

Postby wyrdoak » 27 Apr 2015 23:57

There is also another choice, I found this out when I forgot to create I swap partition on one install. http://www.bgevolution.com/blog/create- ... ot-needed/

Acer Aspire One AO532h; CPU Atom n450 1.66Gh: 2GB RAM, duel boot with Win7: SolydK32

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Jessie not playing nice with other distros (Rant)

Postby just » 28 Apr 2015 03:07

jsalpha2 wrote:...Is there any way to de-select the formatting of the swap partition? (I looked, but did not see anything)...
i use two ways to avoid damage debian causes by formatting swap partitions.

1. don't use UUIDs in fstab of installed linuxes. use device names instead: /dev/sdaN.

2. installing debian, do not allow it to use the existing swap partition. installer warns about missing swap, and proposes to return one step back to partitioner to add one. do not do it, continue installing without swap.

once installation is finished, simply add the existing swap partition to freshly installed debian's fstab by hand, for example

Code: Select all

/dev/sda3  swap  swap  sw  0  0
and update its initramfs

Code: Select all

# update-initramfs -u
works very smoothly for me.

User avatar
jsalpha2
Posts: 296
Joined: 28 May 2013 12:28

Re: Jessie not playing nice with other distros (Rant)

Postby jsalpha2 » 28 Apr 2015 09:26

Thanks for the help. I knew there was an answer. Real people are much better than Google, especially when you don't know exactly what words to use in your search. I would never have found these. I wonder about wyrdoak's link for putting the swap file in a directory instead of a separate partition. Maybe that should be the default for all Linux distros. I will have to try that at least once to check for gotchas. My old way was to re-format everything, install Debian first, then re-install everything else. No wonder that I have a growing love/hate for Debian. Embarrassed :oops:

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Jessie not playing nice with other distros (Rant)

Postby just » 28 Apr 2015 10:43

jsalpha2 wrote:...I wonder about wyrdoak's link for putting the swap file in a directory instead of a separate partition...
Glad if the answer can help you.

wyrdoak's link is too synthetic. take a look here, in this forum: Swap files management. it tries to summarize all commands, needed to work with swaps under normal circumstances.

User avatar
wyrdoak
Posts: 113
Joined: 07 Jan 2014 21:25

Re: Jessie not playing nice with other distros (Rant)

Postby wyrdoak » 28 Apr 2015 23:13

The application automatically creates a dynamic swapfile up to 2gb.by default based on your system you can change the size it creates by changing the defaults. Automatic If you add more RAM or wish a larger or smaller swapfile if you change the defaults.

Code: Select all

# /etc/dphys-swapfile - user settings for dphys-swapfile package
# author Neil Franklin, last modification 2006.09.15
# copyright ETH Zuerich Physics Departement
#   use under either modified/non-advertising BSD or GPL license
# this file is sourced with . so full normal sh syntax applies

# where we want the swapfile to be, this is the default
CONF_SWAPFILE=/swap.file

# size we want to force it to be, default (empty) gives 2*RAM
CONF_SWAPSIZE=2048

##
#  Give yourself three times the memory size of swap?
#
# mem=$(grep MemTotal /proc/meminfo |awk '{print $2}')
# CONF_SWAPSIZE=$(expr $mem \* 3)
#
http://www.debian-administration.org/ar ... swap_space

Acer Aspire One AO532h; CPU Atom n450 1.66Gh: 2GB RAM, duel boot with Win7: SolydK32

wayne
Posts: 178
Joined: 25 Feb 2013 14:58

Re: Jessie not playing nice with other distros (Rant)

Postby wayne » 29 Apr 2015 05:08

This is covered in Debian Wiki for Swap


https://wiki.debian.org/Swap


If you have multiboot, then it is less painful to NOT format swap during Debian installation, because after installation you change only one /etc/fstab :mrgreen:

Note

As of this writing with the Debian installer on the current stable images (version 6.0.1), the manual partitioning will default to formatting all found swap partitions on all disks. This will invalidate any UUID entry in the /etc/fstab files of any other installed GNU/Linux based system that is using those swap spaces.

In order for the installer not to format a swap partition, it must manually be marked "Do not use" during partitioning. The installer will format any swap partition not marked "Do not use" and use it for swap space on the installed system. If sharing the swap space with another instance of GNU/Linux you will need to update their /etc/fstab files manually. To do this simply run blkid with root privileges and put the UUID it outputs for the swap partition in place of the old UUID in the other Linux instance's /etc/fstab files.

User avatar
jsalpha2
Posts: 296
Joined: 28 May 2013 12:28

Re: Jessie not playing nice with other distros (Rant)

Postby jsalpha2 » 29 Apr 2015 09:37

In order for the installer not to format a swap partition, it must manually be marked "Do not use" during partitioning.
That is the option I could not find. I'll look closer next time. It is not just unchecking (un-selecting?) a box. You have to leave the check mark there and then click on a down arrow to Find the "Do not Use".
As of this writing with the Debian installer on the current stable images (version 6.0.1), the manual partitioning will default to formatting all found swap partitions on all disks. This will invalidate any UUID entry in the /etc/fstab files of any other installed GNU/Linux based system that is using those swap spaces.
Why do they do it that way? Is it just because they want to screw people up? Are they deliberately trying to break other distros? Does any other distro behave this way? If the default was changed would any harm be done?

Scenario: Thought bubble over Debian programmer's head. "Boy it is a good thing I installed Debian, because my (insert other distro here) just broke. I may as well get rid of it and only use Debian. Is that what they are thinking?

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Jessie not playing nice with other distros (Rant)

Postby just » 29 Apr 2015 12:18

jsalpha2 wrote:
In order for the installer not to format a swap partition, it must manually be marked "Do not use" during partitioning.
That is the option I could not find. I'll look closer next time. It is not just unchecking (un-selecting?) a box....
after some initial screens debian installer arrives at the point (screen), where it presents the list of all partitions found on the disk(s).

the swap partition(s) is identified as such (swap), by default the Format column reads F (format), there's the checkmark at the right of the partition (use it).

dounble-click on the line with the partition, or select it with mouse/arrows and hit Enter. the screen with the options for the selected partition opens. among them:
  • use it or not
  • what filesystem to use
  • what label to assign
  • space reserved for journal
  • ...
  • done setting this partition
on this screen simply double-click on the line which reads Use it as... (or something similar). it's the first line on the screen.

from the submenu that opens select Do not use.

finally, double-click the last option on this screen - Done setting this partition. this will return you one screen back - to the previous screen with the list of all found partitions.

the swap partition has no F in format column now (won't be formatted), has no checkmark on the right (won't be used).

set other partitions as you need, and proceed further - without swap, and ignoring installer's warning about missing swap.

wayne
Posts: 178
Joined: 25 Feb 2013 14:58

Re: Jessie not playing nice with other distros (Rant)

Postby wayne » 01 May 2015 01:29

Thanks just for the steps to 'disable' formatting swap in Debian installer.

I have several multiboot machines, I seldom bothered about swap being formatted, I knew another distro always format swap.

What about another 'work around'?
just let debian installer format swap, or the user might not know about this issue that affect another partition OS.
at the end of the installation,
go to another distros on the multiboot machine,
copy the UUID of the old swap from /etc/fstab
then just use this command to restore old swap's uuid
# tune2fs -U old_swap_uuid /dev/sdaX

I have not tried myself, just idea only :mrgreen:

User avatar
just
Posts: 297
Joined: 07 Nov 2013 08:06
Location: Rovaniemi, Finland

Re: Jessie not playing nice with other distros (Rant)

Postby just » 01 May 2015 06:01

by restoring the old swap's UUID you're making it inaccessible for initramfs of the freshly installed debian, aren't you?

if we let the bomb to explode (by formatting swap), and cure the consequences later in other linuxes, then it could be wise to regenerate their initram(s) instead. it will allow them to "see" the swap again, and won't hurt debian's initramfs.

for me is easier to remember to disarm the bomb only once (by disabling swap in debian installer), than adjust by hand fstab(s)/iniram(s) in 12 other linuxes, existing on this computer. i'm too lazy for this.

finally, the formatting problem impacts only on linuxes that use UUIDs in their fstab. it doesn't exist for those using device names (/dev/sdaN).

IMO, on multilinux computers device names in fstab are ideal if the partitions schema never changes, but existing partitions are frequently being formatted. on the other hand, UUIDs are ideal on a computer where partitions are frequently created or deleted, but existing partitions are never being formatted.


Return to “Open Chat / General Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests