You are not logged in.

#1 2024-12-12 23:42:13

geopardo
Member
From: Europe
Registered: 2021-03-23
Posts: 169

[SOLVED] How to edit fstab? (For SSD device)

I need to edit a line in the fstab file, since I only mounted SSD's. I need to change the option from default to discard.

“To enable boot discard, add discard to the options in fstab for the swap device.”
The wiki says

How should I proceed without live CD?

Is it correct to edit the fstab file as root, and run the command

genfstab -U /mnt >> /mnt/etc/fstab

?

apparently not, since the device is primarily mounted. Secondly, I'm not in the /mnt environment..

Did I understand correctly?

Last edited by geopardo (2024-12-14 00:43:04)


Some 'security people are f*cking morons' says Linus Torvalds..

Offline

#2 2024-12-13 00:02:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,197

Re: [SOLVED] How to edit fstab? (For SSD device)

That would write the entire file again (and duplicate existing entries since >> appends to already existing lines)

It's a simple text file, if it's just about editing an existing entry, use any text editor as root to edit /etc/fstab... to prevent some issues with GUIs in a root context you're strongly advised to use some terminal editor for this, like vim or nano or so...

https://wiki.archlinux.org/title/Fstab

Last edited by V1del (2024-12-13 00:05:04)

Offline

#3 2024-12-14 00:41:45

geopardo
Member
From: Europe
Registered: 2021-03-23
Posts: 169

Re: [SOLVED] How to edit fstab? (For SSD device)

OK V1del work fine tnx..
Just one question, It's correct put discard option for swap device, and leave rw, relatime on others devices whit periodic trim timer enabled?
Isn't that shortening the life of the SSD disk?


Some 'security people are f*cking morons' says Linus Torvalds..

Offline

Board footer

Powered by FluxBB