[Solved] Swap File/Swap Partition

Help with issues regarding installation of Debian

[Solved] Swap File/Swap Partition

Postby supusr » 2020-06-07 19:51

I installed Debian (testing) from a netinst usb. Did it automatically install a swap partition or a swap file? swapon -s shows no such bash command exists, but my conky display shows some swap is available.
Last edited by supusr on 2020-06-09 04:15, edited 1 time in total.
supusr
 
Posts: 29
Joined: 2016-11-09 20:07

Re: Swap File/Swap Partition

Postby Head_on_a_Stick » 2020-06-07 20:34

supusr wrote:swapon -s shows no such bash command exists

viewtopic.php?f=16&t=142973
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12821
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Swap File/Swap Partition

Postby supusr » 2020-06-07 21:45

OK. Using su - and then swapon -s gives me:

Filename Type Size Used Priority
/dev/dm-1 partition 999420 420 -2

So, it looks like I have a swap partition of about 1G (?) and no swap file?

Is this, then, the installation default?
supusr
 
Posts: 29
Joined: 2016-11-09 20:07

Re: Swap File/Swap Partition

Postby cuckooflew » 2020-06-07 23:45

see the installation manual: https://debian-handbook.info/browse/stable/sect.installation-steps.html
You do not even tell us what partitioning method you used, ? If it was guided, then:
---edit-- added for clarification:
From:https://debian-handbook.info/browse/stable/sect.installation-steps.htmlAfter choosing the type of partition, the software calculates a suggestion, and describes it on the screen; the user can then modify it if needed. You can, in particular, choose another filesystem if the standard choice (ext4) isn't appropriate. In most cases, however, the proposed partitioning is reasonable and it can be accepted by selecting the “Finish partitioning and write changes to disk” entry.

Image
1.1 gb ,......
Based on what the installation manual says, but the default swap partition size will vary,depending on how much ram /memory is available, more information you neglect to give us.
This: https://wiki.debian.org/Swap
Is also educational. Maybe take the time to read it.
Postby supusr »So, it looks like I have a swap partition of about 1G (?) and no swap file?

Well, based on what you show, or say swapon shows, yes. Why do you expect a additional swap file ? Did you create one ?
Here is what mine looks like, and it also is a netinstall, default,..I have not modified or added any swap partitions, mine is aprox 498mb. Please note also, the use of code boxes:
Code: Select all
root@debian:~# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
fd0      2:0    1    4K  0 disk
sda      8:0    0   20G  0 disk
├─sda1   8:1    0 19.5G  0 part /
├─sda2   8:2    0    1K  0 part
└─sda5   8:5    0  498M  0 part [SWAP]
sr0     11:0    1 1024M  0 rom 
root@debian:~# swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda5                               partition       509948  0       -2
root@debian:~# swapon --show
NAME      TYPE      SIZE USED PRIO
/dev/sda5 partition 498M   0B   -2

========================
Code: Select all
cuckoo@debian:~$ free -m
              total        used        free      shared  buff/cache   available
Mem:            961          87         610           0         263         735
Swap:           497           0         497
Last edited by cuckooflew on 2020-06-08 16:15, edited 1 time in total.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: Swap File/Swap Partition

Postby supusr » 2020-06-08 13:21

Thanks to all for the input. I read the links you provided, and neither answers my specific question, which is: what is the default swap partitioning scheme? I used the graphical installation and selected guided, but under that method there is no option regarding swap. This is my output for lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 29G 0 disk
└─sda1 8:1 1 29G 0 part /media/rocket/backup1
sdb 8:16 1 14.4G 0 disk
└─sdb1 8:17 1 14.4G 0 part /media/rocket/backup21
sr0 11:0 1 1024M 0 rom
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p1 259:1 0 512M 0 part /boot/efi
├─nvme0n1p2 259:2 0 488M 0 part /boot
└─nvme0n1p3 259:3 0 237.5G 0 part
├─pc--vg-root 254:0 0 236.5G 0 lvm /
└─pc--vg-swap_1 254:1 0 976M 0 lvm [SWAP]
This shows a swap partition of around 1G. I am wondering how the installer decides this, and whether it can make different decisions based on one's hardware, etc. I have not stated that I expected a swap file or a swap partition, only that I would like to know the default swap process.
supusr
 
Posts: 29
Joined: 2016-11-09 20:07

Re: Swap File/Swap Partition

Postby cuckooflew » 2020-06-08 15:58

supusr wrote:I installed Debian (testing) from a netinst usb. Did it automatically install a swap partition or a swap file? swapon -s shows no such bash command exists, but my conky display shows some swap is available.

Geez, another one of these,....ok let's try again, but also now you are asking a totally different question, from the above,..
Post by supusr » 2020-06-08 13:21
Thanks to all for the input. I read the links you provided, and neither answers my specific question, which is: what is the default swap partitioning scheme? I used the graphical installation and selected guided, but under that method there is no option regarding swap.

Yes there is, it is right there when you approve the suggested scheme, :
From:https://debian-handbook.info/browse/stable/sect.installation-steps.htmlAfter choosing the type of partition, the software calculates a suggestion, and describes it on the screen; the user can then modify it if needed. You can, in particular, choose another filesystem if the standard choice (ext4) isn't appropriate. In most cases, however, the proposed partitioning is reasonable and it can be accepted by selecting the “Finish partitioning and write changes to disk” entry.

Also see the image they use, I also included it in my previous post.
Apparently you did not really read them, and your original question was not about " What is the default swap partitioning scheme ? " Also, you seem to choose to ignore my request that you use code boxes,..it makes it easier to read the output you show.
Please re-read the link to the Debian wiki, I will quote part, but you need to read it all,..
From:https://wiki.debian.org/SwapInformation and considerations related to the amount of swap to use

The recommended amount of swap space has traditionally been double the amount of system memory. This has changed over time to one and half times system memory, both answers are decent baselines but are becoming less and less useful answers to the question as time passes. There are many variables about your system and intended use that will determine the available system swap you will want to have.

IF you use the guided partitioning, that is decided by the installer based on the baselines mentioned, (more details on the wiki).

"supusr" I have not stated that I expected a swap file or a swap partition, only that I would like to know the default swap process

But your question implies you are expecting swap file ?
So, it looks like I have a swap partition of about 1G (?) and no swap file?

There is NO set default process, the size of the swap partition will automatically decided by the installer, based on the amount of memory the HD has,... PLEASE read the install documentation, also I all read did tell you this, and the documentation is much better written, any way , PLEASE read it.
If you do not want a swap partion:
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

OR also if you want a specific size, then you MUST use the manual partitioning method.
From: https://debian-handbook.info/browse/stable/sect.installation-steps.htmlThe partitioning step is traditionally difficult for new users. It is necessary to define the various portions of the disks (or “partitions”) on which the Linux filesystems and virtual memory (swap) will be stored. This task is complicated if another operating system that you want to keep is already on the machine. Indeed, you will then have to make sure that you do not alter its partitions (or that you resize them without causing damage).
Fortunately, the partitioning software has a “guided” mode which recommends partitions for the user to make — in most cases, you can simply validate the software's suggestions.

There are more screen shots, to help explain,....please do not try to tell me you read it, obviously you did not, it is very detailed,
4.2.13.2. Manual Partitioning
Manual partitioning allows greater flexibility, allowing the user to choose the purpose and size of each partition. Furthermore,----snip---------

I also suggest that you read some of the other Debian documentation, it is not recommended that new users use the SID and Testing branch of Debian, for various reasons,...we expect someone that is using the testing or SID releases would know these basic things, and know how to do some simple searches to find common information,....I need to do that myself, especially since I am not a "sudoer" or "super user",.. have a good day, and I apologize for not being able to answer your many questions, .... I suppose I should not have even tried. Use some logic :
Did it automatically install a swap partition or a swap file?

Obviously it did, unless you created it :
but my conky display shows some swap is available.

===
So, it looks like I have a swap partition of about 1G (?) and no swap file?

Is this, then, the installation default?


Again, I must remind my self , use some logic,... I missed these hints at first, well, unless you added , modified, or resized what was created when you installed, then obviously that is the installation default,
gee whiz, I should have realized,.....ok, well the joke is on me, and it was fun,...it was real, and it was nice, but by no means was it real nice,... funny games people play. I Looooove it :mrgreen:
Last edited by cuckooflew on 2020-06-08 16:41, edited 1 time in total.
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: Swap File/Swap Partition

Postby cuckooflew » 2020-06-08 16:27

Head_on_a_Stick wrote:
supusr wrote:swapon -s shows no such bash command exists

viewtopic.php?f=16&t=142973

Should have done this before trying to answer:
Funny guy/gal we have here:
http://forums.debian.net/viewtopic.php?f=5&t=146282&p=721128#p721128

[Solved] UFW Not Behaving Properly

Postby supusr » 2020-05-20 20:59
I have installed ufw, but when I try to enable it in the terminal as root I get: bash: ufw: command not found
I have tried uninstalling and reinstalling, to no avail. Any ideas?

Then either read or just scroll down to:
http://forums.debian.net/viewtopic.php?f=5&t=146282&p=721128#p721073
Yes it does work as root, but using "sudo" works as well, it did not work as root, because you did not use 'su -' , just using 'su' does not put you in the correct path to correctly,
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west


Return to Installation

Who is online

Users browsing this forum: No registered users and 13 guests

fashionable