In my fstab file, I have some partitions specified using UUIDs and some using device nodes. Using KDE Partition Manager, I tried to add a mount point for a partition. In the dialog, I selected 'identify by UUID' and entered other fields. Finally, after completion of the operation, I checked my fstab file and found that pre-existing entries specified by device nodes were deleted. i.e. only those entries specified by UUIDs were present, along with the newly created entry. Reproducible: Didn't try
I couldn't start the program partition manager, ask me for a privileges that I don't know how to get these
(In reply to comment #1) > I couldn't start the program partition manager, ask me for a privileges that > I don't know how to get these Just fill your password. And bugs.kde.org is not a help forum, so such question should go to forum.kde.org. Even it is, it is not good to hijack other's thread .
I experienced this problem, under Fedora 25. When KPM added an fstab entry, it removed the entry for '/'. That was scary. :) I'll try to double-check, but I believe in this case, the removed line did include a UUID.
Ok, I'm trying to learn more about this program; I see that 3.0 is out. My crash occurred under 2.2.1 on fedora. I don't have a KDE neon installation, but I'm hoping to, soon. When I can, I'll test under 3.0, if still needed. Here are the fstab files before and after partitionmanager altered the file. They seem simple enough to paste rather than attach, but I have to note that in the "before" version, the first line was blank. I haven't done the testing yet to see if that makes a difference. before: """ # # /etc/fstab # Created by anaconda on Thu Feb 16 23:54:23 2017 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=aca13ca8-0061-455f-982e-e35c3e072f7b / btrfs subvol=root,noatime 0 0 UUID=cd538f0b-aa1d-461e-83fe-33d775f5eb24 /boot ext4 defaults,noatime 1 2 UUID=aca13ca8-0061-455f-982e-e35c3e072f7b /home btrfs subvol=home,noatime 0 0 UUID=0c29ed65-c366-4798-8137-299f33a0c840 swap swap defaults 0 0 """ After: """ UUID=cd538f0b-aa1d-461e-83fe-33d775f5eb24 /boot ext4 defaults 1 2 UUID=aca13ca8-0061-455f-982e-e35c3e072f7b /home btrfs subvol=home 0 0 UUID=0c29ed65-c366-4798-8137-299f33a0c840 swap swap defaults 0 0 /dev/sdb1 /mnt xfs noatime,nodiratime 0 0 """ Ideally I would like to retain the comments, as well. Hopefully I can add more later -- thank you.
*** Bug 378977 has been marked as a duplicate of this bug. ***
(In reply to Edward Donovan from comment #4) > Ok, I'm trying to learn more about this program; I see that 3.0 is out. My > crash occurred under 2.2.1 on fedora. I don't have a KDE neon installation, > but I'm hoping to, soon. When I can, I'll test under 3.0, if still needed. Well, this wasn't fixed, so 3.0 wouldn't start to work magically. Basically, KPM reads info from fstab that it recognizes and discards everything else. Then it recreates it from the information it knows.
The latest commit should improve behaviour a bit when there are multiple mount points corresponding to the same device. https://cgit.kde.org/partitionmanager.git/commit/?id=6889a3b17ce1dced3d728aa54f664c795acb8c21) This bug will need more work later but at least it will work better than before.
Looks like preserving comments might be a bit harder. We use mntent from glibc to read fstab (by the way, GParted also uses it for reading mount points). getmntent does not read comments at all. Maybe it can be fixed by only replacing one line in fstab instead of rewriting the whole file.
I added fstab parsing function to kpmcore, so that we don't have to rely on glibc's getmntend https://cgit.kde.org/kpmcore.git/commit/?id=34712dd2ed499dd2c78ea07de9b3b499f32c86f7 It reads comments as well. However, partition manager still needs to be ported to use this new code.
Git commit baec1573149498404a0ce9af670be787ff893b21 by Andrius Štikonas. Committed on 16/09/2017 at 19:40. Pushed by stikonas into branch 'master'. Add a function to write fstab file. M +53 -0 src/core/fstab.cpp M +1 -0 src/core/fstab.h https://commits.kde.org/kpmcore/baec1573149498404a0ce9af670be787ff893b21
Git commit 454845e14e1c34762cffa3021be7a552b1c64c46 by Andrius Štikonas. Committed on 16/09/2017 at 19:41. Pushed by stikonas into branch 'master'. Port from MountEntry to FstabEntry. This helps to preserve comments in fstab file M +2 -2 src/gui/editmountoptionsdialog.cpp M +5 -1 src/gui/editmountpointdialog.cpp M +54 -167 src/gui/editmountpointdialogwidget.cpp M +9 -8 src/gui/editmountpointdialogwidget.h https://commits.kde.org/partitionmanager/454845e14e1c34762cffa3021be7a552b1c64c46
Git commit 8dd1e70b2121047840b8d74fd7ae6d56ba31b90b by Andrius Štikonas. Committed on 16/09/2017 at 19:50. Pushed by stikonas into branch 'master'. Fix inline comment handling. M +2 -2 src/core/fstab.cpp https://commits.kde.org/kpmcore/8dd1e70b2121047840b8d74fd7ae6d56ba31b90b
Ok, this should be fixed now. Comments are fully preserved. No fstab entries should be deleted. Only whitespace inside fstab lines is not preserved, e.g. spaces can be replaced with tabs. But it should be good enough now.