SOLVED - LM19 xfce "login loop" / read only ext4 partition after crash

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Girafenaine

Re: LM19 xfce "login loop" / read only ext4 partition after crash

Post by Girafenaine »

Hello Fabien85,

I changed my name in joe in my post to keep it quite "secret", but actually it does appear in the boot-info :) so it is the same, on my computer there is only one user.

My uid is 501. I changed it to be able to share files with MacOS (whose first uid is 501).

As the documents partition was mounted automatically, it used uid=0. It is not my own setting, it is the default setting. The sda5 was mounted 5 times because of 5 bind mounts, as follow.

OK for the boot that should have nothing to do with my partition problem.

I made some experiments today, and I saw that some entries on my fstab file made the boot process go wrong. Actually just a line seems to be able to shut down by macbook between the grub menu and the desktop ! Here is the guilty lines :

Code: Select all

/mnt/Documents/Users/Joe/Documents /home/Joe/Documents auto bind,x-systemd.requires=/mnt/Documents 
/mnt/Documents/Users/Joe/Music /home/Joe/Musique auto bind,x-systemd.requires=/mnt/Documents 
/mnt/Documents/Users/Joe/Pictures /home/Joe/Images auto bind,x-systemd.requires=/mnt/Documents 
/mnt/Documents/Users/Joe/Movies /home/Joe/Vidéos auto bind,x-systemd.requires=/mnt/Documents   
/mnt/Documents/Users/Joe/Downloads /home/Joe/Téléchargements auto bind,x-systemd.requires=/mnt/Documents  
When I commented these lines, I can reach my desktop. With them the Macbook shuts down before the destkop. However, I use them for months without such a problem (login loop and desktop not to be reached). I guess these lines made my system somehow unstable and were involved in my login loop. I will look for the correct syntax.

Girafenaine
gm10

Re: LM19 xfce "login loop" / read only ext4 partition after crash

Post by gm10 »

Typically you'll set none for the filesystem of a bind mount, not auto. You could also try adding nofail to the options. I'm not sure that either of those will help with your login though since you seem to be booting up ok with the mounts in place.
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: LM19 xfce "login loop" / read only ext4 partition after crash

Post by fabien85 »

Just to say this is going beyond my expertise, so I will let gm10 (and possibly others) answer.
I dont know what a bind mount is, and as I said previously, the last time I tried to share hfs+ between Mint and MacOS I got permission problems I wasn't able to solve (and changing my uid to 501 made Mint unbootable). So the only help I can provide is to advise to backup the data and from macOS reformat the partition in FAT32.

In case you stop getting answers, I suggest to post a separate new thread with a title explaining the problem, since the problem stated in the current title is solved.

Good luck !

Fab
gm10

Re: LM19 xfce "login loop" / read only ext4 partition after crash

Post by gm10 »

fabien85 wrote: Mon Oct 08, 2018 5:01 am Just to say this is going beyond my expertise, so I will let gm10 (and possibly others) answer.
I dont know what a bind mount is, and as I said previously,
Eh, don't leave me alone here, I got nothing. As far as bind mounts go, you make one filesystem location also available in another location. Think symbolic link, although it's not the same.
fabien85 wrote: Mon Oct 08, 2018 5:01 am In case you stop getting answers, I suggest to post a separate new thread with a title explaining the problem, since the problem stated in the current title is solved.
Is it? I thought he was still looping when those mounts are active. See, I don't have any idea what's going on. :P
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: LM19 xfce "login loop" / read only ext4 partition after crash

Post by fabien85 »

gm10 wrote: Mon Oct 08, 2018 5:21 am
fabien85 wrote: Mon Oct 08, 2018 5:01 am In case you stop getting answers, I suggest to post a separate new thread with a title explaining the problem, since the problem stated in the current title is solved.
Is it? I thought he was still looping when those mounts are active. See, I don't have any idea what's going on. :P
Well, we found the culprit of the loop, and the ext4 partitions are fine, so strictly speaking the problem stated in the title is solved. Now the problem shifted to understand what goes on with this hfs+ partition.
I guess what I'm saying is that people tend to jump on a thread when it has few post counts and when the title gives them some idea what could be the problem. At least I do.


So let me try more, even if it's with no warranty.
The none or nofail option looks good to me.
The other thing that catch my eye is x-systemd.requires=/mnt/Documents. It could be that /mnt/Documents is not mounted yet, or there is some permission problem. Maybe try commenting out just this part.
Think symbolic link, although it's not the same.
Could girafenaine just do a symbolic link then instead ?
On my laptop, I have a data partition mounted at /home/fabien/data, and I made symbolic links of various folders in my home to folders on that partition, e.g.

Code: Select all

lrwxrwxrwx   1 fabien fabien      30 Apr 16  2017 Music -> /home/fabien/data/links/Music//
So maybe one could do

Code: Select all

ln -s /mnt/Documents/Users/Joe/Documents /home/Joe/Documents
Or would this not work for a non-linux filesystem ? (I just tried with a FAT32 partition, and it seems to work)
gm10

Re: LM19 xfce "login loop" / read only ext4 partition after crash

Post by gm10 »

fabien85 wrote: Mon Oct 08, 2018 9:28 am The other thing that catch my eye is x-systemd.requires=/mnt/Documents. It could be that /mnt/Documents is not mounted yet, or there is some permission problem. Maybe try commenting out just this part.
The requires part is something you want with bind mounts to make sure they get processed after their source is mounted. Of course we don't know if he's actually mounting the source, I've yet to see his /etc/fstab or a (full) list of his mounts.
fabien85 wrote: Mon Oct 08, 2018 9:28 am Could girafenaine just do a symbolic link then instead ?
On my laptop, I have a data partition mounted at /home/fabien/data, and I made symbolic links of various folders in my home to folders on that partition, e.g.
Sure, symlinks are the preferred way of doing this.
Girafenaine

Re: LM19 xfce "login loop" / read only ext4 partition after crash

Post by Girafenaine »

Hello,

Thanks Fabien85 and gm10 for your help. I have to say that my initial problem is solved, and then I had a second problem that could have been adressed in another thread. I think now I am done with both problem, thanks to your advice and help and some experiments. I agree a "short thread" and clear title are important. I can stop here. Here is the present situation :

1. I had this "login loop" preventing me from logging in my own session. It happened after a crash for low power reason. I was not able to figure out what was the problem. I commented my fstab file with no effect. The Fabien's idea to make chroot from a live USB let me update my system "from the inner side". After that I could boot again. I don't know the file or folder involved in this first problem.

2. But my initial fstab file was still not supported. This was my second problem. The system booted only with a "one line" fstab. Then I experiment to build again my fstab file by adding one by one the initial lines. It was OK for swap, /efi/boot, even /Documents, but crashed again with my "bind mounts" that are made to "automount" all my Documents folders (movies, pictures, downloads, documents, Music). I changed some options until it worked again. So now, all seems to be OK. The login is OK, even with my full fstab file.

For information :
  • I don't know if the bind mount is better than symlink. But it is automatically mounted during the boot and works rather well (except during these last days !). Bind mount is made to access part of a mount on another mount point. It's what I need, but symlink can be as efficient as it is. Do you think symlink is better on some aspects ? I don't know the key differences if any.
  • Here is my fstab file. What made it to work again was to add "0 0" at the end of the lines for my bind mounts. I don't know why before this crash my fstab worked without them, and they are needed now. But it is normal to have these "0 0" at the end of the lines in the fstab file. I also changed "auto" in "none" as gm10 suggested but I believe this didn't change anything.

Code: Select all

# <file system> <mount point>   <type>  <options>       <dump>  <pass>

UUID=39591c06-37af-4ad1-b8a1-7b0fe10aa0ae	/	ext4	errors=remount-ro	0	1

# /boot/efi was on /dev/sda1 during installation
UUID=70D6-1701  /boot/efi       vfat    umask=0077      0       1

# swap was on /dev/sda4 during installation
UUID=8381e749-9e32-49ce-8bad-2ee3c17d872b none            swap    sw              0       0

#Shared documents partition
LABEL=Documents /mnt/Documents hfsplus nofail,rw,user,noauto,x-systemd.automount,relatime,nls=utf8 0   0

#last fstab line, 2018/08
#LABEL="Documents" /mnt/Documents hfsplus force,rw,user,uid=501,umask=022   0 0
#mtab line for inspiration
#LABEL=Documents /media/Joe/Documents hfsplus rw,relatime,umask=22,uid=0,gid=0,nls=utf8 0   0

#Bind mounts for shared documents
/mnt/Documents/Users/Joe/Documents /home/Joe/Documents none bind,x-systemd.requires=/mnt/Documents  0    0
/mnt/Documents/Users/Joe/Music /home/Joe/Musique none bind,x-systemd.requires=/mnt/Documents    0   0
/mnt/Documents/Users/Joe/Pictures /home/Joe/Images none bind,x-systemd.requires=/mnt/Documents  0   0
/mnt/Documents/Users/Joe/Movies /home/Joe/Vidéos none bind,x-systemd.requires=/mnt/Documents    0   0
/mnt/Documents/Users/Joe/Downloads /home/Joe/Téléchargements none bind,x-systemd.requires=/mnt/Documents    0   0

#Partition systeme MacOS
UUID=f07169e0-e9ab-3d4c-ba5e-4ad629623c0f /mnt/SystemeMacOS auto nosuid,nodev,nofail,noauto 0   0
  • As told by gm10, x-systemd.requires let the systemd process to mount the partition (or piece of a partition when it is a bind mount like in my case) only after and if another device is mounted, preventing some errors. It can be used to mount online partition too, only if the network is available for instance.
  • I changed since the install my uid in 501. To log in, one's has to modify a few files about "MIN_UID" parameters, which are default to 1001 and one's needs to set it at 501 in order one's user does appear on the login screen. This allows to use the same hfsplus partition in MacOS and Linux Mint without having to change anything on permissions, since the owner is the same (501 in both OS). You have to make the same changes for the group and gid.
    • Girafenaine
gm10

Re: LM19 xfce "login loop" / read only ext4 partition after crash

Post by gm10 »

Girafenaine wrote: Mon Oct 08, 2018 4:55 pm Here is my fstab file. What made it to work again was to add "0 0" at the end of the lines for my bind mounts. I don't know why before this crash my fstab worked without them, and they are needed now. But it is normal to have these "0 0" at the end of the lines in the fstab file. I also changed "auto" in "none" as gm10 suggested but I believe this didn't change anything.
Frankly I think the "none" is more likely to have fixed it than the 0 0 because the 0 0 is optional, it defaults to that if you don't set it explicitly. But doesn't matter, glad to hear you're finally fully operational again!
Girafenaine

Re: SOLVED - LM19 xfce "login loop" / read only ext4 partition after crash

Post by Girafenaine »

OK ! I believe you about the "none" type. But I still find it strange that "auto" used to work for several years before. Perhaps an update or a broken file somewhere made the "auto" type unstable.

Thanks for your help !
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: SOLVED - LM19 xfce "login loop" / read only ext4 partition after crash

Post by fabien85 »

Congrats !

Glad you fixed it because I was running out of ideas.
Locked

Return to “Storage”