Systemd does not install SWAP partition

Here is the link to the logs generated: EOS Log Tool link Systemd waits 1 min 30 s to try to do some journal flushing, fails and then does not setup my swap. I am also spammed in the tty terminal with a ton of systemd-journal info.

Can you show us your fstab?

fstab is in the linked Log’s:

#################### 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=0217-36C7 /boot vfat defaults 0 0
# /dev/sdb2
UUID=0dcbf4df-7cc8-4208-be9c-bb375f7a7a7f / btrfs rw,noatime,compress=zstd:4,space_cache=v2,commit=120,subvolid=256,subvol=/@ 0 0

# /dev/sdb2
UUID=0dcbf4df-7cc8-4208-be9c-bb375f7a7a7f /home btrfs rw,noatime,compress=zstd:4,space_cache=v2,commit=120,subvolid=257,subvol=/@home 0 0

# /dev/sdb2
UUID=0dcbf4df-7cc8-4208-be9c-bb375f7a7a7f /var/log btrfs rw,noatime,compress=zstd:4,space_cache=v2,commit=120,subvolid=258,subvol=/@log 0 0

# /dev/sdb2
UUID=0dcbf4df-7cc8-4208-be9c-bb375f7a7a7f /var/cache btrfs rw,noatime,compress=zstd:4,space_cache=v2,commit=120,subvolid=259,subvol=/@cache 0 0

# /dev/sda3 LABEL=SWAP
UUID=293ef9d4-bacd-49ec-a0e6-e701762a2b8b none swap defaults 0 0

please show us the results from the following commands:

sudo fdisk -l
ls -l /dev/disk/by-uuid/

Looking at your log, all the way at the bottom:

Disk /dev/sda: 125 GiB, 134217728000 bytes, 262144000 sectors
Disk model: UDisk           
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E44E0CA4-F5CA-4EDA-9EB2-8CC6B7031498

Device      Start       End   Sectors   Size Type
/dev/sda1    4096    413695    409600   200M Microsoft basic data
/dev/sda2  413696 262141951 261728256 124.8G Linux filesystem

There doesn’t seem to be any /dev/sda3 on your disk to be set up as swap as it shows in your fstab posted in the previous post.

4 Likes

Here is my fstab:

#################### 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).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>

UUID=0217-36C7  /boot  vfat  defaults  0  0
# /dev/sdb2
UUID=0dcbf4df-7cc8-4208-be9c-bb375f7a7a7f	/         	btrfs     	rw,noatime,compress=zstd:4,space_cache=v2,commit=120,subvolid=256,subvol=/@	0 0

# /dev/sdb2
UUID=0dcbf4df-7cc8-4208-be9c-bb375f7a7a7f	/home     	btrfs     	rw,noatime,compress=zstd:4,space_cache=v2,commit=120,subvolid=257,subvol=/@home	0 0

# /dev/sdb2
UUID=0dcbf4df-7cc8-4208-be9c-bb375f7a7a7f	/var/log  	btrfs     	rw,noatime,compress=zstd:4,space_cache=v2,commit=120,subvolid=258,subvol=/@log	0 0

# /dev/sdb2
UUID=0dcbf4df-7cc8-4208-be9c-bb375f7a7a7f	/var/cache	btrfs     	rw,noatime,compress=zstd:4,space_cache=v2,commit=120,subvolid=259,subvol=/@cache	0 0

# /dev/sda3 LABEL=SWAP
UUID=293ef9d4-bacd-49ec-a0e6-e701762a2b8b	none      	swap      	defaults  	0 0

Here is sudo fdisk -l:

Disk /dev/sdb: 125 GiB, 134217728000 bytes, 262144000 sectors
Disk model: UDisk           
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E44E0CA4-F5CA-4EDA-9EB2-8CC6B7031498

Device      Start       End   Sectors   Size Type
/dev/sda1    4096    413695    409600   200M Microsoft basic data
/dev/sda2  413696 262141951 261728256 124.8G Linux filesystem

/dev/sda2 is formatted as a btrfs partitition, with multiple (pools?/slices?) setup inside it as one is swap or at least it said so during install it created.

The installation doesn’t create a swap by default. You must have created one on your own.
If I remember correctly, btrfs subvolume can be used as swap but with care.
https://wiki.archlinux.org/title/Btrfs#Swap_file

It doesn’t look so judging by the entry in the fstab which seems to point to a partition:

# /dev/sda3 LABEL=SWAP
UUID=293ef9d4-bacd-49ec-a0e6-e701762a2b8b	none      	swap      	defaults  	0 0

which againn judging by the output of the fdisk -l doesn’t seem to be existent on the disk.

Something else I see:

and then:

Also in your fstab

… and different UUIDs.

Not sure what is going on with your setup :wink:

3 Likes

Hardware info shows /dev/sda

Partition:
  ID-1: / size: 124.8 GiB used: 2.93 GiB (2.3%) fs: btrfs dev: /dev/sda2
  ID-2: /boot size: 199.8 MiB used: 51.2 MiB (25.6%) fs: vfat dev: /dev/sda1
  ID-3: /home size: 124.8 GiB used: 2.93 GiB (2.3%) fs: btrfs dev: /dev/sda2
  ID-4: /var/log size: 124.8 GiB used: 2.93 GiB (2.3%) fs: btrfs dev: /dev/sda2
Swap:
  Alert: No swap data was found.

Fstab shows /dev/sdb? Except it’s showing /dev/sda3 as swap. Hardware info shows no swap! This is messed up.

1 Like

So, I found out why the ARM install script is doing this. I am running the install script in a VirtualBox Endeavour OS VM. For whatever reason when genfstab is run in the script it is seeing the SWAP partition inside this VM and adding it into the fstab of the thumb drive. So, I will need to either A) delete the SWAP line from my fstab or B) resize the btrfs partition to give space for a swap or C) create a btrfs swap slice. Thanks for all of the help!

From the arm install website: