# system mounting as readonly

## milomak

The problem I am sure is a result of my moving the Gentoo partition to a bigger one. I did from a debian install using rsync -avl <old partition mount point> <new partition mount point>.

I then chrooted into the install in the new partition and changed fstab amd grub, and also reinstalled grub.

When I chroot into the system, everything is as hunk dory as can be in a chroot environment. However when I boot into the system, it is read only.

/etc/fstab

```

/dev/sda8      /boot      ext3      noatime            0 2

/dev/sda9      /      ext4      relatime          0 1

/dev/sda6      none      swap      sw            0 0

/dev/sda5      /home      ext4      relatime         0 2

/dev/sdb6      /data/ntfs   ntfs-3g      defaults,exec         0 0

/dev/sdc1      /data/ext   ext4      relatime,exec         0 0

```

/boot/grub/menu.lst

```

default 0

timeout 5

title Gentoo Linux 2.6.30-gentoo-r4 (GUI)

# Partition where the kernel image (or operating system) is located

root (hd0,7)

kernel /boot/kernel-x86_64-2.6.30-gentoo-r4 root=/dev/sda9 softlevel=gui

```

----------

## Jaglover

Generally, Linux protects filesystems by mounting them read-only if "dirty bit" is set or corruption is detected. Usually running fsck fixes the problem.

----------

## milomak

i've run fsck on the partition and it reports no errors

EDIT: What log files can I look at to see what, if any, errors are generated during the boot process?

----------

## cach0rr0

dmesg will work

you can also

```
mount -o remount /dev/sd*
```

 replacing the asterisk obviously, and see if it lets you remount

you might also change your fstab to just 'noatime' for the ext4 partitions for now, just to rule out another suspicion. 

If you put invalid mount opts in fstab it ends up getting mounted read-only, from what ive seen (example - I had notail on an ext4 partition, and it caused this)

----------

## milomak

i tried mounting with noatime and the same thing happens.

when I then run mount -o remount /dev/sda9, the partition is mounted fine and I can then continue.

I don't know whether this is related to the problem, but I have also noticed that dbus fails to load properly. I get the error below

```

* Starting D-BUS system messagebus...Failed to start message bus: The pid file "

/var/run/dbus.pid" exists, if the message bus is not running, remove this file

* start-stop-daemon: failed to start '/usr/bin/dbus-daemon'

[!!]

*ERROR: dbus failed to start
```

After I remount the partion, I can delete the pid file and restart dbus.

Again I don't know i this may be part of the problem but I did run chown -R root: /

EDIT: I ran dmesg | grep sda9 from Gentoo and Debian

Debian

```

[   30.730934]  sda6 sda7 sda8 sda9 >

[  137.752354] kjournald2 starting: pid 5108, dev sda9:8, commit interval 5 seconds

[  137.755685] EXT4 FS on sda9, internal journal on sda9:8

[  137.756294] EXT4-fs: sda9: 1 orphan inode deleted

[  137.926149] EXT4-fs: mounted filesystem sda9 with ordered data mode

```

Gentoo

```

[    0.000000] Command line: root=/dev/sda9 softlevel=gui

[    0.000000] Kernel command line: root=/dev/sda9 softlevel=gui

[   34.938565]  sda9 >

[   36.442224] EXT3-fs: sda9: couldn't mount because of unsupported optional features (240).

[   36.459544] kjournald2 starting: pid 1027, dev sda9:8, commit interval 5 seconds

[   36.460048] EXT4-fs: mounted filesystem sda9 with ordered data mode
```

I notice that on Gentoo it first tries to mount it as ext3.

----------

## Jaglover

 *Quote:*   

> Again I don't know i this may be part of the problem but I did run chown -R root: /

 

Oh man, this is bad. All the permissions of files in a *NIX system are like well-tuned fine mechanism, you destroyed it all with just one hit. And there is no way to undo it.   :Sad: 

Hell, you cannot even use this system any more because you cannot log in as an user. What good can be a computer with only management account? Is it some headless server without local users?

----------

## milomak

i've nuked the gentoo install. so for my purposes this thread can be closed/deleted

----------

