Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help ext4 root filesystem could not be mounted 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
juampii
n00b
n00b


Joined: 23 Oct 2009
Posts: 57
Location: Argentina

PostPosted: Thu Sep 03, 2015 2:25 am    Post subject: Help ext4 root filesystem could not be mounted read/write Reply with quote

Hello, im a happy gentoo user.

:)
I have little knowledge, so im a noob, and because of that i cannot figure out this problem
Maybe someone of you can help me. i will appreciate.
Also my english is not good :oops:
I have system working with this disk setup
4 hdd in raid 0, mounting in their partitions / swap and /home
and now i wish to transfer the setup to an ssd (i have windows there but it felt like a joke when i use it .win10.) so i pretend to maximize gentoo performance with ssd.


I create a stage5 backup and rsync backup from an ubuntu live cd

i use this to create and restore the stage 5 full backup

Code:

#mount working filesystem (complete) in /mnt/gentoinst
mount /dev/md125 /mnt/gentooinst
mount /dev/md126 /mnt/gentooinst/home
mount /dev/sdX2 /mnt/gentooinst/boot/efi

#mount ssd
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot/efi

#mount backup media
mount /dev/sdg1 /mnt/backup

#create stage 5
tar -cvvjpf /mnt/backup/stage5.tar.bz2

#restore
cd /mnt/backup
tar xvjpf stage5.tar.bz2 -C /mnt/gentoo/



Then i chroot
Code:
mount -t proc none /mnt/gentoo/proc && mount --rbind /sys /mnt/gentoo/sys && mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update && source /etc/profile && export PS1="(chroot) $PS1"


Now, the probem.

If i use xfs in the filesystem (in ssd), for example, and i put rootfstype=xfs in grub.cfg, it boot without a problem, even in UEFI mode.
but if i try to do this in ext4, when i reboot i get an error about the filesystem could not be mounted as read-write, and nothing works.
( i also change the rootfstype to ext4)
all of this installing grub before reboot, grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg
The strange this is in the original backup the filesystem is ext4, i copy the correrct UUID to fstab, i upload the initramfs .cpio to kernel and put the line root=(the partition uid)


Now im on the ssd but with xfs filesystem.
If i format the ssd / partition with ext4 from a live cd, restore backup, change settings in grub, fstab and reboot, i get the read only error, if i use xfs no.
I like to change to ext4, any workaround?
It is recomended ext4 over xfs? I read few post about data corruption in xfs without an ups or for hard ressets
this is an actual problem?
Any recomendations for an ssd? (the model is intel x-25m)

This is my /etc/fstab
Code:
UUID=f18546bf-33ee-4a1c-bda8-38f5d441be45       /               xfs     nobarrier,realtime,logbufs=8                    0       1
UUID=5DE1-A3AD                                  /boot/efi       vfat    defaults                                        1       2
proc                                            /proc           proc    defaults                                        0       0
shm                                             /dev/shm        tmpfs   nodev,nosuid,noexec                             0       0
tmpfs                                           /tmp            tmpfs   defaults,noatime,mode=1777,size=2048M           0       0


and when i try ext4 the fstab was
Code:
UUID=f18546bf-33ee-4a1c-bda8-38f5d441be45       /               ext4    realtime,discard                                0       1
UUID=5DE1-A3AD                                  /boot/efi       vfat    defaults                                        1       2
proc                                            /proc           proc    defaults                                        0       0
shm                                             /dev/shm        tmpfs   nodev,nosuid,noexec                             0       0
tmpfs                                           /tmp            tmpfs   defaults,noatime,mode=1777,size=2048M           0       0


Thanks
Back to top
View user's profile Send private message
juampii
n00b
n00b


Joined: 23 Oct 2009
Posts: 57
Location: Argentina

PostPosted: Thu Sep 03, 2015 5:00 am    Post subject: Reply with quote

I found the "solution" or my mistake

in /etc/fstab, the options
Code:
realtime,discard,defaults

are the problem, now i have
Code:
noatime,defaults

and it works.

Wich ones are the best options for an ssd, any inputs?

Thanks.
Back to top
View user's profile Send private message
wpkzz
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2013
Posts: 76

PostPosted: Fri Sep 04, 2015 12:08 am    Post subject: Reply with quote

For a root partition ("/") I think the default:

Code:

noatime, auto


is all you need, regardless of type of hardware.
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