Fstab, was mache ich falsch?

Hasllo,

ich habe mir heut einmal die fstab angeschaut:

# /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=37ac8057-0442-4925-adb2-27004514d7d4 /              ext4    noatime    0 1
UUID=bf204ef2-474a-4755-a503-c2837ddc6dfb /home          ext4    noatime    0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

## UUID=113719c7-dd95-4438-b743-9390bf043c23     none        swap        defaults     0 0

Dabei habe ich festgestellt, das die swap partition nicht benutzt wird. warum auch immer. Nun wollte ich diese eintragen und die Zeile tmpfs ersetzen. (untere Zeile). Nachdem ich das getan hatte konnte ich kein Programm mehr starten.
Wo liegt mein Fehler?

Hier die Ausgabe von blkid

/dev/sdb1: UUID="312cb74c-ee9e-4a50-adaa-677f2a61c50b" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="274c31b8-01"
/dev/sda2: UUID="113719c7-dd95-4438-b743-9390bf043c23" TYPE="swap" PARTUUID="d2cda590-02"
/dev/sda3: UUID="bf204ef2-474a-4755-a503-c2837ddc6dfb" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d2cda590-03"
/dev/sda1: UUID="37ac8057-0442-4925-adb2-27004514d7d4" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="d2cda590-01"

die UUID passt

You don’t have the following line in your fstab:

/swapfile	none	swap	defaults	0	0

If you have a swap partition it will be different. See https://wiki.archlinux.org/title/Swap

So in your case it would be:

UUID=113719c7-dd95-4438-b743-9390bf043c23 none swap defaults 0 0

So wie @BendTheKnee sagt, fehlt dir ein Eintrag.

Füge /swapfile none swap defaults 0 0 hinzu.

So sollte es dann aussehen: Ignoriere efi, das ist nur bei mir so.

UUID=74af6462-ba4b-48bf-993b-164ba88fbabb /home          ext4    defaults,noatime 0 2
UUID=D3E2-C3D4                            /efi           vfat    defaults,noatime,umask=077 0 2
UUID=de0eeb1f-095d-408b-b6c3-ebda58df6d41 /              ext4    defaults,noatime 0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

#Swapfile
/swapfile none swap defaults 0 0


EDIT: Sorry ich habe swap-partition überlesen. dann so:

So in your case it would be:

UUID=113719c7-dd95-4438-b743-9390bf043c23 none swap defaults 0 0

https://wiki.archlinux.org/title/Tmpfs#Usage

Arch uses a tmpfs /run directory, with /var/run and /var/lock simply existing as symlinks for compatibility. It is also used for /tmp by the default systemd setup and does not require an entry in fstab unless a specific configuration is needed.

deepl.com
Arch verwendet ein tmpfs /run-Verzeichnis, wobei /var/run und /var/lock aus Kompatibilitätsgründen einfach als Symlinks existieren. Es wird auch von der standardmäßigen systemd-Einrichtung für /tmp verwendet und erfordert keinen Eintrag in der fstab, es sei denn, eine spezielle Konfiguration ist erforderlich.

<mount point> und <type> sollten als swap gekennzeichnet sein:

# <file system> <mount point> <type> <options> <dump> <pass>
...
UUID=113719c7-dd95-4438-b743-9390bf043c23 swap swap defaults  0 0
...

Ach, und natürlich die Kommentierung entfernen, also ohne "## "

Du hast jetzt mehrere Anfragen noch offen. Wenn Du der Meinung bist, dass einige erfolgreich waren, könntest Du diese mit einer Deiner Meinung nach richtigen Lösungsantwort mit “Solved” schließen? Danke.

1 Like

Also /dev/sda2 wird als swap benutzt.

swapon --show
NAME      TYPE      SIZE   USED PRIO
/dev/sda2 partition 7,8G 528,3M   -2

muss jetzt die Zeile:

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

in der fstab stehen bleiben?

@humanoid Ich habe jetzt alle anderen Fragen auf gelöst gesetzt. Hoffe ich zumindest

Yes leave that line alone!

ok :wink:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.