Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Unable to mount ext4 partition read/write
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
2bdkid
n00b
n00b


Joined: 26 Jul 2014
Posts: 14
Location: USA

PostPosted: Thu Jul 31, 2014 3:48 am    Post subject: [Solved] Unable to mount ext4 partition read/write Reply with quote

I just installed Gentoo on my laptop and while booting an error message comes up saying it is unable to mount my root ext4 partition read/write, I can read from it but I cannot write.

I looked through some older threads and they said to enable CONFIG_LBDAF in the kernel but this only applies to x86, not amd64 like my laptop. It does mount just fine in the installation media so it much me a missing kernel option.

I don't know what commands to use to solve this myself so any help would be appreciated. And also bear with me, it'll be hard getting stuff of computer with only CLI lol.


Last edited by 2bdkid on Thu Jul 31, 2014 7:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Thu Jul 31, 2014 7:51 am    Post subject: Reply with quote

boot, run
Code:
mount -o remount,rw /
not a fix but may restore capability while fixing. not having the following items has at times been reported as a cause of the reported problem.

Code:
grep -i "CONFIG_DEVTMPFS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_DEVTMPFS=y

Code:
grep -i "CONFIG_DEVTMPFS_MOUNT=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_DEVTMPFS_MOUNT=y

Code:
grep -i "CONFIG_FSNOTIFY=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_FSNOTIFY=y

Code:
grep -i "CONFIG_DNOTIFY=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_DNOTIFY=y

Code:
grep -i "CONFIG_INOTIFY_USER=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_INOTIFY_USER=y

Code:
grep -i "CONFIG_NET=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_NET=y

Code:
grep -i "CONFIG_PROC_FS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_PROC_FS=y

Code:
grep -i "CONFIG_SIGNALFD=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_SIGNALFD=y

Code:
grep -i "CONFIG_SYSFS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_SYSFS=y

Code:
grep -i "CONFIG_SYSFS_DEPRECATED is not set" /mnt/gentoo/usr/src/linux/.config

Quote:
# CONFIG_SYSFS_DEPRECATED is not set

Code:
grep -i 'CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"' /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"

Code:
grep -i "CONFIG_BLK_DEV_BSG=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_BLK_DEV_BSG=y

Code:
grep -i "CONFIG_TMPFS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_TMPFS=y

Code:
grep -i "CONFIG_TMPFS_POSIX_ACL=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_TMPFS_POSIX_ACL=y

Code:
grep -i "CONFIG_TMPFS_XATTR=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_TMPFS_XATTR=y

_________________
Defund the FCC.
Back to top
View user's profile Send private message
2bdkid
n00b
n00b


Joined: 26 Jul 2014
Posts: 14
Location: USA

PostPosted: Thu Jul 31, 2014 1:32 pm    Post subject: Reply with quote

DONAHUE wrote:
boot, run
Code:
mount -o remount,rw /
not a fix but may restore capability while fixing. not having the following items has at times been reported as a cause of the reported problem.

Code:
grep -i "CONFIG_DEVTMPFS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_DEVTMPFS=y

Code:
grep -i "CONFIG_DEVTMPFS_MOUNT=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_DEVTMPFS_MOUNT=y

Code:
grep -i "CONFIG_FSNOTIFY=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_FSNOTIFY=y

Code:
grep -i "CONFIG_DNOTIFY=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_DNOTIFY=y

Code:
grep -i "CONFIG_INOTIFY_USER=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_INOTIFY_USER=y

Code:
grep -i "CONFIG_NET=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_NET=y

Code:
grep -i "CONFIG_PROC_FS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_PROC_FS=y

Code:
grep -i "CONFIG_SIGNALFD=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_SIGNALFD=y

Code:
grep -i "CONFIG_SYSFS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_SYSFS=y

Code:
grep -i "CONFIG_SYSFS_DEPRECATED is not set" /mnt/gentoo/usr/src/linux/.config

Quote:
# CONFIG_SYSFS_DEPRECATED is not set

Code:
grep -i 'CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"' /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"

Code:
grep -i "CONFIG_BLK_DEV_BSG=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_BLK_DEV_BSG=y

Code:
grep -i "CONFIG_TMPFS=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_TMPFS=y

Code:
grep -i "CONFIG_TMPFS_POSIX_ACL=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_TMPFS_POSIX_ACL=y

Code:
grep -i "CONFIG_TMPFS_XATTR=y" /mnt/gentoo/usr/src/linux/.config

Quote:
CONFIG_TMPFS_XATTR=y


Ok I tried enabling all of these and it didn't fix it. I also tried using rootfstype=ext4 in grub and it didn't work.

When booting it says "mount -t ext4 -o ro" Would this be a problem with my fstab?

For my root partition I just have <opts> set at default.
Back to top
View user's profile Send private message
2bdkid
n00b
n00b


Joined: 26 Jul 2014
Posts: 14
Location: USA

PostPosted: Thu Jul 31, 2014 1:37 pm    Post subject: Reply with quote

Ok I just tried using default,noatime,rw in my fstab and that didn't fix anything.
Back to top
View user's profile Send private message
2bdkid
n00b
n00b


Joined: 26 Jul 2014
Posts: 14
Location: USA

PostPosted: Thu Jul 31, 2014 1:42 pm    Post subject: Reply with quote

mount -o remount,rw / gives me "mount: / not mounted or bad option"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jul 31, 2014 4:15 pm    Post subject: Reply with quote

2bdkid,

Is your / listed in /dev

Does it shaw in the output of mount and df.

root is always mounted read only to start with so rootfsck can be run.
When that succeeds. root is remounted rw.
If it fails, you should see something in dmesg.

ext2 and ext3 can mount some ext4 fs, depending on the ext4 options in use.
In some cases, as read only. df and/or mount will show that.

As a throw away snippet, the root entry in fstab is not used to mount root.
That would be chicken and egg, since root has to be mounted to read /etc/fstab.
However, /etc/fstab is used to know the root filesystem type for rootfsck.

I suspect that rootfsck is failing for some reason, so root remains read only.

Is /etc/mtab a real file or a symlink?
For openrc, both work, systemd users must have the symlink. This is the table of mounted filesystems and will be consulted by -o remount
_________________
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
2bdkid
n00b
n00b


Joined: 26 Jul 2014
Posts: 14
Location: USA

PostPosted: Thu Jul 31, 2014 5:31 pm    Post subject: Reply with quote

NeddySeagoon wrote:
2bdkid,

Is your / listed in /dev

Does it shaw in the output of mount and df.

root is always mounted read only to start with so rootfsck can be run.
When that succeeds. root is remounted rw.
If it fails, you should see something in dmesg.

ext2 and ext3 can mount some ext4 fs, depending on the ext4 options in use.
In some cases, as read only. df and/or mount will show that.

As a throw away snippet, the root entry in fstab is not used to mount root.
That would be chicken and egg, since root has to be mounted to read /etc/fstab.
However, /etc/fstab is used to know the root filesystem type for rootfsck.

I suspect that rootfsck is failing for some reason, so root remains read only.

Is /etc/mtab a real file or a symlink?
For openrc, both work, systemd users must have the symlink. This is the table of mounted filesystems and will be consulted by -o remount


Yes I can see sda3 in /dev

df says it cannot read table of mounted file systems

/etc/mtab is just a file, I'm using openrc

Here is dmesg: https://dl.dropboxusercontent.com/u/74532228/dmesg.txt

Would it be best to reinstall and have a seperate boot partition?
Back to top
View user's profile Send private message
2bdkid
n00b
n00b


Joined: 26 Jul 2014
Posts: 14
Location: USA

PostPosted: Thu Jul 31, 2014 5:48 pm    Post subject: Reply with quote

I have a feeling it's because I need a boot partition. I'm just going to reinstall, I wont lose anything.
Back to top
View user's profile Send private message
2bdkid
n00b
n00b


Joined: 26 Jul 2014
Posts: 14
Location: USA

PostPosted: Thu Jul 31, 2014 7:33 pm    Post subject: Reply with quote

Well I just reinstalled and added a boot partition. Everything is working fine now.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jul 31, 2014 7:58 pm    Post subject: Reply with quote

2bdkid,

By reinstalling, you have lost a learning opportunity.

Your dmesg says
Code:
[   10.945769] EXT4-fs (sda3): Unrecognized mount option "default" or missing value
which tells that your /etc/fstab was incorrect. Reinstalling allowed you an opportunity to not make that mistake again. A /boot partition is needed only if
a) the BIOS cannot read the entire HDD.
b) root on raid/LVM/encrypted or other less common installs.

Your dmesg also says
Code:
 [10841.343765] FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

You probably removed tho volume without unmounting it first. Thats a very bad thing.
_________________
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
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Thu Jul 31, 2014 8:01 pm    Post subject: Reply with quote

dmesg said
Quote:
EXT4-fs (sda3): Unrecognized mount option "default" or missing value
correct spelling is defaults, apparently got corrected during the reinstall
_________________
Defund the FCC.
Back to top
View user's profile Send private message
2bdkid
n00b
n00b


Joined: 26 Jul 2014
Posts: 14
Location: USA

PostPosted: Fri Aug 01, 2014 12:53 am    Post subject: Reply with quote

I see what you mean. I guess I missed that in dmesg.
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