Help needed editing fstab

I found this page , and am wondering if there is not an easier way ?

64d5c6b8-8098-497b-b56a-beb464958102 is the disk I want to auto mount ?

I already changed the rights from root root, to username user.
That did not work it still wants my password.

I hate vim, but already figured something out.
To quit vim you need to type :qa enter the semi collon ? is part of the command.

I need more help though. Or a good manual, on how to insert a line at the end of fstab.

I am also confused, and wonder if I am using vim or vi ?

I probably only want to mount a partition not the entire disk.

If you feel better with a GUI you can install gvim.
Command explanation:

Never ever do this beginner mistake! Don’t change the ownership of root owned files only to edit them! The biggest mistake what you can do!
Use editors like gvim as root to open the files and edit them instead!

vim is not the easiest editor available. You can use Kate (If in KDE) or any other text editor. From command line joe or nano may be easier to use. In any case there are lots and lots of editors available other then vim

To see all start Yast-Software Management set search in description and search for editor

1 Like

@Gps2010 Hi, Just use YaST Partitioner to add?

1 Like

omg, I will try that. :slight_smile:

I fixed it, changed it back to: root root

Thank you, I already hate vim.

1 Like

But you (root) can then change it to what is needed.

Let YaST first do it’s task and after that you do the fine tuning.

1 Like

I think it was vim what got me into trouble. This must be the most user-unfriendly program I ever used.

Even just quitting is a challenge. Then I googled and found, q and enter, q! and enter and qa and enter.

But to do this, you need to add : infront of qa .

Its starting to make sense now, the : tells vim your typing an command, and are not editing the text file.

I am trying to get better at the commandline, but am already regretting this. lol

YAST here I come.

VIM is OK once you know ALL the function keys . You never need to leave the keyboard .

But there a lot of text editors that are far easier to use. Just because a webpage suggests vim does not mean you can’t use any text editor that you are comfortable with. Text is just text :joy:


There is no need to write a vi(m) handbook here. I assume there are enough of them (and there is of course man vi).

And there is no need to use vi when you are trying to learn more about the command line. There are other command line editors and also you can use a GUI editor to write bash scripts. Do not try to learn everything all together, but concentrate on a few subjects. That is already steep enough.

I use vi for more the 40 years now, but I only know and use a very small subset of all the features. And I grab to the man page when I need something more complicated. But I will not recommend it to others, specially when they are new, to use it.

1 Like

I had a look in YAST partitionering.

Then I get confused again, it already has a mount point. This does make sense but…

I might have to ask a different question.

Right now when I want to browse a second harddisk/ partions,with dolphin, openSUSE wants a password.
I am trying to get rit of that password question.

Of course it asks. It has to create a proper entry for /etc/fstab and there it is needed. And when you have it already, then tell it YaST. And YaST is also very nice, when it does not exist already, it will create the mount point for you.

Every partition, that is not FAT or a USB disk need the root authorization to be mounted.

If you have multiple drives, multiple partitions you want to mount, eg Windows, you need to give them all individual mount points. Use Yast partition for that.

E.g. for windows

for all other partitions you have to do the same

This is a security feature.

It either the one or the other. You put them in /etc/fstab (where they belong IMHO) and then they will be mounted at boot and always be there, or you let a user fumble around with his/her Dolphin which will then try to get them mounted ad hoc. And for that you need the root password.

And try to understand what mounting is, what it does, and wherefore.
E.g. understand that “mounting a disk”. or “mounting a partition” is only a very sloppy shortcut to what is happening. What is mounted is a “file system”. And for that you need to address where that file system is. And for that you need to address the place where the file system is. And that can be all sorts of things like a Mass storage device (disk, revolving or solid state or whatever), partition of a disk, Logical Volume, RAID device, …

Well I managed to mess something up.

To get into opensuse, I now used a older snapshot. (which is called pre yast)

I am now first gonna google on how to get the second entry the main one.
I did this before, but its been a while so don’t know it from the top of my head. :slight_smile:

Found it:

sudo snapper rollback

For now taking a break, will continue tomorrow.

Pen and paper still exist. Thus make notes whenever you do things to your system. Specially when you have the slightest idea that you may need them again.

1 Like

I added the last line

UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /                       btrfs  defaults                      0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /var                    btrfs  subvol=/@/var                 0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /usr/local              btrfs  subvol=/@/usr/local           0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /srv                    btrfs  subvol=/@/srv                 0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /root                   btrfs  subvol=/@/root                0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /opt                    btrfs  subvol=/@/opt                 0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /home                   btrfs  subvol=/@/home                0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
UUID=9c8140f9-0b81-41eb-ab94-d7342c38d218  /.snapshots             btrfs  subvol=/@/.snapshots          0  0
UUID=3AB8-553F                             /boot/efi               vfat   utf8                          0  2
UUID=b9cf1de0-e38d-46a4-ba88-08665ca8d340  /home/guus/VMmount      ext4   data=ordered                  0  2
UUID=64d5c6b8-8098-497b-b56a-beb464958102  /home/guus              ext4   defaults                      1  2

Does this look right ?
Or do I need to add something after /home/guus ?

sdb3 is the partiton. Its part of an opensuse leap install, if that matters?
There are 3 actual harddisk

One for tumbleweed nvme
One for windows sda
One for Leap sdb

guus@localhost:~> lsblk
sda           8:0    0 931,5G  0 disk 
├─sda1        8:1    0   529M  0 part 
├─sda2        8:2    0    99M  0 part 
├─sda3        8:3    0    16M  0 part 
└─sda4        8:4    0 930,9G  0 part 
sdb           8:16   0 931,5G  0 disk 
├─sdb1        8:17   0   512M  0 part 
├─sdb2        8:18   0  48,8G  0 part 
├─sdb3        8:19   0 800,8G  0 part /run/media/guus/64d5c6b8-8098-497b-b56a-beb464958102
├─sdb4        8:20   0     2G  0 part 
└─sdb5        8:21   0  79,4G  0 part /home/guus/VMmount
nvme0n1     259:0    0 931,5G  0 disk 
├─nvme0n1p1 259:1    0   512M  0 part /boot/efi
└─nvme0n1p2 259:2    0   931G  0 part /var

What users really need:

erlangen:~ # lsblk -o path,label,uuid
PATH           LABEL  UUID
/dev/sda1      Data   0e9f8bb1-2e36-4a6e-aab8-50a12a269d37
/dev/nvme1n1p1        19CF-0B54
/dev/nvme1n1p2 System 0e58bbe5-eff7-4884-bb5d-a0aac3d8a344
/dev/nvme0n1p1        4BC8-3C8D
/dev/nvme0n1p2 Backup 972278a5-61f5-41c1-aa5d-5fc8f458fe26
erlangen:~ # 
1 Like