Mepis root directory not being mounted read-only
Q Having successfully converted my computer from running from an old Mandrake Linux system to the SimplyMepis 3.4 distribution, I found that all ran so smoothly that I soon gave up using F2 during the boot process, as there never seemed to be any warnings. However, a few weeks ago I looked at the booting details and found a message that fsck could not run because the root directory was not mounted read-only. I found no satisfactory resolution on the web. On my machine, /boot/grub/menu.lst.example contains:
color cyan/blue white/blue foreground ffffff background 2f5178 gfxmenu /boot/grub/message title MEPIS at hda2, kernel 2.6 kernel (hd0,2)/boot/vmlinuz-2.6.12-586tsc root=/dev/hda2 nomce psmouse.proto=imps splash=verbose vga=791 initrd (hd0,2)/boot/initrd.img-2.6.12-586tsc
However, /boot/grub/menu.lst contains:
color cyan/blue white/blue foreground ffffff background 0639a1 gfxmenu /boot/grub/message title MEPIS at hda6, kernel 2.6.15-1-586tsc kernel /boot/vmlinuz-2.6.15-1-586tsc root=/dev/hda6 nomce quiet vga=791
where the format of the code booting the 2.6.15 kernel doesn't correspond to the example file. Although my OS works despite the warning message, I would obviously prefer to have fsck working where it is designed to, and would be grateful for any suggestions you may have as to the likely cause of this problem and the best way of fixing it.
A The ext2/3 filesystem runs fsck after a set time or number of mounts, which can be changed by tune2fs. It is likely that this problem has been there from day one but that you didn't hit the time limit until after you stopped looking at the boot messages. There are two main differences between your Grub configuration and the example setting. The first is that yours doesn't use an initrd to provide a splash, which has no bearing on your problem. The second is that no root path is provided for the Mepis boot. The kernel line should start with kernel (hd0,5)/boot/vmlinuz, otherwise you are relying on some indeterminate default. Alternatively, put root (hd0,5) at the top of the file. This is unlikely to affect the boot process's filesystem checks, but may cause more subtle problems. You can configure Grub to mount your root partition read-only: by adding ro to the list of options on the kernel line. The filesystem will be remounted, using the settings from /etc/fstab, early in the boot process but after fsck has been run. Your kernel line should look like this:
kernel (hd0,5)/boot/vmlinuz-2.6.15-1-586tsc root=/dev/hda6 ro nomce quiet vga=791
You can also run fsck yourself by booting in a minimal maintenance mode. When the Grub menu appears, select your Mepis entry, press E to edit it, select the kernel line and press E again. Remove quiet from the options and replace with ro init=/bin/sh. Press Enter to accept the change and B to boot. This will give you a command prompt and, as the root filesystem is mounted read-only, you can run
fsck -f /dev/hda6 && shutdown -r -n now
This will check the disk and then reboot the computer only if the fsck was successful.
- How to read root mail
- Locked out of /home directory
- Automatic Subversion root parameter
- Transfer Mepis from secondary drive onto primary drive
- Hard drive not being recognised by Mepis and PCLinuxOS