damien7400
Posts: 8
Joined: Mon May 01, 2017 3:26 pm

PI3: fstab failure, not writable

Sat May 13, 2017 8:16 pm

Hello,

I've done a failure, I've installed a "ext4" Harddrive on the Raspberry,
no problem, until I reboot,

I've identified the failure, the HD is 2 times declared in the /etc/fstab file, I've forgot the "#" before the older line.

I'm blocked in root, i can open /etc/fstab with "sudo nano /etc/fstab", i change the line, but can't save it while the file is in unwritable mode.... :(

what can i do ?

Martin Frezman
Posts: 1009
Joined: Mon Oct 31, 2016 10:05 am

Re: PI3: fstab failure, not writable

Sat May 13, 2017 8:54 pm

mount -o remount,rw /
If this post appears in the wrong forums category, my apologies.

damien7400
Posts: 8
Joined: Mon May 01, 2017 3:26 pm

Re: PI3: fstab failure, not writable

Sat May 13, 2017 9:42 pm

Great,
mount -o remount,rw / allow to write in the root

but now the server X doesn't start,

startx ->
xinit: unable to connect to x server
server error
error in locking authority file /home/pi/.authority

I check the restore image I've done the 5 May (pretty fresh :) )
something goes wrong with the accounts ("sudo" tell: not possible to resolve host....)

User avatar
Paeryn
Posts: 2966
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: PI3: fstab failure, not writable

Sun May 14, 2017 1:35 am

damien7400 wrote:Great,
mount -o remount,rw / allow to write in the root

but now the server X doesn't start,

startx ->
xinit: unable to connect to x server
server error
error in locking authority file /home/pi/.authority

I check the restore image I've done the 5 May (pretty fresh :) )
something goes wrong with the accounts ("sudo" tell: not possible to resolve host....)
Slightly odd looking error message, the xinit error should read error in locking authority file /home/pi/.Xauthority (note the capital X).

Normally I would think you tried doing sudo startx at some point (which causes that error when you next try running startx properly) but I'm not sure if the following error you have could cause xinit to give that error. If you did do sudo startx at some point then you need to either delete /home/pi/.Xauthority or change it's ownership back to pi:pi (running startx with sudo causes that file to be owned by root and so startx cannot subsequently write to it as pi).

The error about not possible to resolve host could be down to a Debian thingy of resolving hostname to 127.0.1.1 if it doesn't have a permanent IP address. In /etc/hosts have a line that reads 127.0.1.1 hostname replacing hostname with the same name that is listed in /etc/hostname e.g.

Code: Select all

pi@rpi3:~ $ cat /etc/hostname
rpi3
pi@rpi3:~ $ cat /etc/hosts
127.0.0.1       localhost
::1             localhost ip6-localhost ip6-loopback
ff02::1         ip6-allnodes
ff02::2         ip6-allrouters

127.0.1.1       rpi3
Something to do with a workaround for some software.
The IP address 127.0.1.1 in the example may not be found on some other Unix-like systems. The Debian Installer creates this entry for a system without a permanent IP address as a workaround for some software (e.g., GNOME) as documented in the bug #719621.
For a system with a permanent IP address, that permanent IP address should be used here instead of 127.0.1.1.

For a system with a permanent IP address and a fully qualified domain name (FQDN) provided by the Domain Name System (DNS), that canonical <host_name>.<domain_name> should be used instead of just <host_name>.
She who travels light — forgot something.

damien7400
Posts: 8
Joined: Mon May 01, 2017 3:26 pm

Re: PI3: fstab failure, not writable

Sun May 14, 2017 7:23 am

Thanks a lot !!!

the magic solution mount -o -remount,rw / is great, but unsecure :)
I use a mini screen, and deleted the false line (partition -02 of SD-Card is in "EXT4" too) in etc/FSTAB

Only my failure,
but, I've followed a tutorial with another file system (NTFS), I've here "ext4" for my external HD and "ext4" for the second partition of the SD-Card... so i missed something

I've got it now (lucky to have an Image, I've read the originals files and compared), the Raspberry runs good !!

Return to “Troubleshooting”