Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[errno 30] read-only file system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
PutinIsLove
n00b
n00b


Joined: 24 Apr 2016
Posts: 5

PostPosted: Sun Apr 24, 2016 2:05 pm    Post subject: [errno 30] read-only file system Reply with quote

Hi guys, i' m very new to linux and i want to install a gentoo x64 machine.


After the GRUB2 and the reboot,i log as root and after that i can' t edit any files and i' m really stuck.

I can' t even do a emerge --sync

I' ve got this error : emergelog(): [Errno 30] Read-only filesystem: b'/var/log/emerge.log


Here is my fstab and my fdisk.

https://imgur.com/a/XCtWS

And here is the details of what i need :

Bios/grub 32M / (bootloader)
boot 512M ext2 (boot)
swap 1G swap (swap)
root everything ext4 (root)

Thanks !!
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Sun Apr 24, 2016 3:50 pm    Post subject: Reply with quote

Code:
/dev/sda4       /       ext4       noauto,ro       0 1

First you should not use noauto on /, i'm unsure what will go when it try to remount / and see that
Second, "ro" mean ro, so even if it remount it and not listen to your noauto, it will remount it read only.

the noauto should be set on /boot, just use defaults on /
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Sun Apr 24, 2016 4:08 pm    Post subject: Reply with quote

PutinIsLove,

Welcome to Gentoo.

The init system will mount your root readonly until it has run rootfsck.
I would expect the noauto in your fstab to be ignored for root, as its not mounted by the localmount service, which is what reads /etc/fstab to determine what to mount where and with what options.

Root has to be mounted to read /etc/fstab so its a bit late to decide not to mount it later.
The ro option may be obeyed though. While that's fine on an embedded system, if that's really what you want its a problem on a desktop install.

Root should be mounted with the noatime option. This avoids every read costing a write to update the last access time of the file.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
PutinIsLove
n00b
n00b


Joined: 24 Apr 2016
Posts: 5

PostPosted: Sun Apr 24, 2016 5:40 pm    Post subject: Reply with quote

Thanks to you guys ! It seems like it' s working now. I' ve still plenty of work to do, to reach my goal.


Thanks again !
Back to top
View user's profile Send private message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Sun Mar 19, 2017 12:30 am    Post subject: Reply with quote

I am experiencing a very similar issue here on my recent Gentoo installation but the root entry in my fstab under the <opts> column does not have the 'ro' attribute.

Neddy: You said that root should be mounted with noatime option, and the root line in my fstab has it. Yet my fs is still read only.

Since I can't use wgetpaste (b/c wgetpaste needs to write temporary files), here is a screenshot of my fstab: http://imgur.com/a/Lt4qw
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Tue Mar 21, 2017 12:00 am    Post subject: Reply with quote

Drone4four,

You can cheat a little.

Log in as root. Run the command
Code:
mount -o remount,rw /

If your path is not set, it will be
Code:
/bin/mount -o remount,rw /


That will remount root read write so you can use wgetpaste.
Pastebin your dmesg.

If you can't pastebin it directly, run
Code:
dmesg > /dmesg.txt

From a liveCD you can mount your root partition at /mnt/gentoo and pastebin /mnt/gentoo/dmesg.txt

Your system will appear to be horribly broken with root being read only.
Its not really, it just all the things that failed to start.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Tue Mar 21, 2017 2:41 am    Post subject: Reply with quote

Thanks, NeddySeagoon, for your reply!

I ran both your suggested mount commands. The output for both were 'mount: can't find UUID=[$hash]'

So I booted my live media, chrooted in, installed wgetpaste, collected my dmesg. Here is my dmesg: https://paste.pound-python.org/show/b6J5E6lEsgcl7VRiorLB/

Thanks again for your attention.

edit: grammar correction
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54220
Location: 56N 3W

PostPosted: Tue Mar 21, 2017 3:27 pm    Post subject: Reply with quote

Drone4four,

That's the liveCD dmesg, not yours. No matter.

Drone4four wrote:
The output for both were 'mount: can't find UUID=[$hash]'
tells what we need to know.

At boot time, the kernel finds its root filesystem using the root= on the kernel command line.
It can't read /etc/fstab because that would need root to be mounted.
To be safe, root is mounted read only by the kernel. This allows it to be checked and possibly repaired during the boot process.
Only after this process completes successfully is mount remounted read write.

The rootfsck process reads /etc/fstab to discover the root filesystem type.
Your message suggests that /etc/fstab contains an incorrect UUID, so rootfsck fails and root remains read only.

Using your livecd, what does blkid say the UUID is for your root?
Check the /etc/fstab entry (in /mnt/gentoo/etc/fstab)
The format is
Code:
UUID=cf559dbe-81bb-45b7-bbdd-0bcdc81e066b               /               ext4            noatime         0 1

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Wed Mar 22, 2017 7:30 pm    Post subject: Reply with quote

Thank you, Neddy: I booted the live media and changed the old UUID reference in my fstab with the more up-to-date UUID produced via blkid. I then booted without the live media and - - presto - - the read only issue is gone!

Now I have moved on to tackling some other issues with my Gentoo, including virtualbox guest additions.
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum