• to swap or not to swap? That is the question.

    • why would one disable the swap partition? it has no dissadvantages keeping it (except the loss of a bit of harddisk space)
      • systems do not become “faster” by disabling the swap partition, it is more of a risk, that one day, the system might encounter massive amounts of data to process and run out of RAM, then the system could become instable (OSX btw. also HATES it to run out of RAM or swap)
      • RAM is faster than swap and swap partitions are faster than swap-files
  • per default GNU Linux is a very RAM efficient OS, for exmaple: GNU Linux Debian MATE gnome2 + lightdm use only 500MBytes of RAM!
  • let’s look at two examples:
    • this system has enough RAM and uses it effectively for harddisk caching (orange)) (but still a little bit of swap is used)
      • per default GNU Linux does not “waste” unused RAM but uses all RAM that is not used-reserved by programs or program’s data for harddisk i/o buffering (RAM harddisk caching = good = faster)
    • this system has most of it’s RAM (5.62GBytes) used by programs and program’s data
      • it is short of RAM, aka disabling the swap partition here would lead to massive ERROR and the system in the worst case becoming unusable.

how fix the “Begin: Running /scripts/local-block … mdadm: No arrays found in config file or automatically” problem

it delays startup by quiet a bit and thus a bit annoying…

lsb_release -a; # tested on Debian 11 too
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster

# this runs for about 20 sec
Begin: Running /scripts/local-block … done
Begin: Running /scripts/local-block … done
Begin: Running /scripts/local-block … done
...
su - root
blkid; # show all UUID of all storage devices
blkid|grep swap; # try to grep only the swap partition
/dev/sde5: LABEL="swap" UUID="d405e2d2-4a92-4d1a-8642-825d86208b2e" TYPE="swap" PARTUUID="80e8e8aa-05"

# it is pretty obvious to spot the swap partition
/dev/mapper/volume-group-swap: UUID="423f9db5-5ca6-4c20-8343-abb46ea59343" TYPE="swap"
...

# works SOMETIMES
blkid | grep swap | cut -d "\"" -f2
blkid | grep swap | cut -d "\"" -f4
423f9db5-5ca6-4c20-8343-abb46ea59343
 
# make sure swap UUID is correct in this config file:
vim /etc/initramfs-tools/conf.d/resume
RESUME=UUID=423f9db5-5ca6-4c20-8343-abb46ea59343
 
# update initial ram disk image
update-initramfs -u

# also double check that in fstab the uuid of the swap partition matches
cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#              
UUID=423f9db5-5ca6-4c20-8343-abb46ea59343 none            swap    sw              0       0

# also can't hurt X-D
mdadm --detail --scan >> /etc/mdadm.conf

# reboot
reboot

creditz:

https://mike632t.wordpress.com/2021/03/21/error-message-running-scripts-local-block-on-boot/

https://lists.debian.org/debian-user/2015/07/msg00845.html

Solving the Running /scripts/local-block loop while booting in linux

admin