# Systemd does not install SWAP partition

**URL:** <https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367>\
**Category:** General system\
**Created:** [April 23, 2022, 4:10pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367 "2022-04-23T16:10:12Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoFax](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/n/53a042/32.png) [@NeoFax](https://forum.endeavouros.com/u/NeoFax)\
**Post date:** [April 23, 2022, 4:10pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/1 "2022-04-23T16:10:12Z")

</div>

Here is the link to the logs generated: [EOS Log Tool link](https://clbin.com/Fcr2z) 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.

---

<div class="post-metadata">

**Author:** ![sradjoker](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/sradjoker/32/64224_2.png) [@sradjoker](https://forum.endeavouros.com/u/sradjoker)\
**Post date:** [April 23, 2022, 4:15pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/2 "2022-04-23T16:15:30Z")

</div>

Can you show us your fstab?

---

<div class="post-metadata">

**Author:** ![pycrk](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pycrk/32/71109_2.png) [@pycrk](https://forum.endeavouros.com/u/pycrk)\
**Post date:** [April 23, 2022, 4:29pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/3 "2022-04-23T16:29:15Z")

</div>

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**

---

<div class="post-metadata">

**Author:** ![pycrk](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pycrk/32/71109_2.png) [@pycrk](https://forum.endeavouros.com/u/pycrk)\
**Post date:** [April 23, 2022, 4:40pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/4 "2022-04-23T16:40:05Z")

</div>

please show us the results from the following commands:

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

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [April 23, 2022, 5:03pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/5 "2022-04-23T17:03:13Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![NeoFax](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/n/53a042/32.png) [@NeoFax](https://forum.endeavouros.com/u/NeoFax)\
**Post date:** [April 23, 2022, 6:49pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/6 "2022-04-23T18:49:28Z")

</div>

Here is my fstab:

```auto
#################### 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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![sradjoker](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/sradjoker/32/64224_2.png) [@sradjoker](https://forum.endeavouros.com/u/sradjoker)\
**Post date:** [April 23, 2022, 7:00pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/7 "2022-04-23T19:00:50Z")

</div>

> [@NeoFax](#):
>
> , 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](https://wiki.archlinux.org/title/Btrfs#Swap_file)

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [April 23, 2022, 7:23pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/8 "2022-04-23T19:23:33Z")

</div>

> [@NeoFax](#):
>
> /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.

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

```auto
# /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:

> [@NeoFax](#):
>
> `Disk /dev/sdb: 125 GiB`

and then:

> [@NeoFax](#):
>
> ```auto
> Device Start End Sectors Size Type
> /dev/sda1 4096 413695 409600 200M Microsoft basic data
> /dev/sda2 413696 262141951 261728256 124.8G Linux filesystem
> 
> ```

Also in your fstab

> [@NeoFax](#):
>
> ```auto
> # /dev/sdb2
> UUID=0dcbf4df-7cc8-4208-be9c-bb375f7a7a7f	
> 
> ```

… and different UUIDs.

Not sure what is going on with your setup 😉

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [April 24, 2022, 3:02am UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/9 "2022-04-24T03:02:15Z")

</div>

Hardware info shows /dev/sda

```auto
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.

---

<div class="post-metadata">

**Author:** ![NeoFax](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/n/53a042/32.png) [@NeoFax](https://forum.endeavouros.com/u/NeoFax)\
**Post date:** [April 24, 2022, 11:57am UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/10 "2022-04-24T11:57:47Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![sradjoker](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/sradjoker/32/64224_2.png) [@sradjoker](https://forum.endeavouros.com/u/sradjoker)\
**Post date:** [April 24, 2022, 12:28pm UTC](https://forum.endeavouros.com/t/systemd-does-not-install-swap-partition/26367/11 "2022-04-24T12:28:35Z")

</div>

From the arm install website:  
[https://arm.endeavouros.com/automated-base-install/](https://arm.endeavouros.com/automated-base-install/)

![Screenshot_20220424-082732_Chrome](https://forum.endeavouros.com/uploads/default/original/3X/8/a/8abcfedcd1de2d07a276d2bc39e314246b731e01.png)
