Upgrade 8.10 --> 9.04 : ext3 Filesystem read-only

Bug #371614 reported by pjw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu 9.04
linux-image-2.6.28-11-generic: 2.6.28-11.42

What I expoect: Booting into Gnome.
What happens:
Booting normal gives the messages (and a lot more):

* Loading cpufreq kernen modules...
* Starting sytem log daemon...
chown: changing ownership of '/var/og/mail.warn' : Read-only file system
chown: changing ownership of '/var/og/user.log' : Read-only file system
...
* Starting kernenl log daemon...
chown : ... : Read-only file system
mkfifo: ... : Read-only file system

I can login at console 2 and remount rw (but it's a bit late for most packages).
dmesg says all ok.
fsck says all ok.
Same problem with kernel 2.6.27-14.33.

Workaround:
- Grub booting with: kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda1 ro apm=off acpi=on splash

-- File /boot/grub/menu.lst:
...
title Ubuntu 9.04, kernel 2.6.28-11-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda1 ro apm=off acpi=on quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
savedefault
...

-- File /etc/fstab:
/dev/sda1 / ext3 defaults,relatime 0 1
/dev/sdb1 /mnt/media ext3 defaults,relatime 0 2
/var/swapfile none swap sw 0 0
tmpfs /dev/shm tmpfs defaults,size=600m 0 0
proc /proc proc defaults 0 0
/dev/hdc /media/cdrom iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/scd0 /media/dvd iso9660 defaults,ro,user,noexec,noauto 0 0
/dev/fd0 /media/floppy vfat defaults,user,noauto,showexec,umask=022 0 0

Revision history for this message
pjw (pjw1965) wrote :

error in initscripts

affects: ubuntu → sysvinit (Ubuntu)
Revision history for this message
pjw (pjw1965) wrote :

The upgrade intrepid -> jaunty did not write the defaults in /etc/default/rcS

RAMRUN=yes

is needed, if booted with 'splash quiet' (quiet makes VERBOSE=yes), because the script /etc/init.d/checkfs.sh (called at /etc/rcS.d/S20checkroot.sh) needs a writable /var/run:

PROGRESS_FILE=`mktemp -p /var/run` || PROGRESS_FILE=/var/run/checkroot_fsck
set -m
logsave -s $FSCK_LOGFILE fsck -C3 $force $fix -t $roottype $rootdev >/dev/console 2>&1 3>$PROGRESS_FILE &
set +m
usplash_progress "$PROGRESS_FILE"
rm -f $PROGRESS_FILE

checkfs.sh should also work whithout RAMRUN=yes (i.e.skip the $PROGRESSFILE thing)

Revision history for this message
pjw (pjw1965) wrote :

typo: checkroot.sh not checkfs.sh !

Why is it not possible to edit my own comment?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Please explain your comment: "
    error in initscripts
"

right now, this looks like you have a filesystem error that you haven't fixed

Changed in sysvinit (Ubuntu):
status: New → Incomplete
Revision history for this message
pjw (pjw1965) wrote :

https://bugs.launchpad.net/ubuntu/+bug/371614/comments/2 should explain it.

My Filesystem is fine! No errors, checked 3 times!
Reproduce it with "quiet splash" as kernel parameter and uncomment RAMRUN=yes /etc/default/rcS (only if you have ext2/ext3 filesystem, see source code).
On my system a "quiet splash" fails at the fsck and as a result (don't ask me why) it stays mounted read-only. But the boot continues (lots of error messages about a read-only fs, but no root-prompt).

checkroot.sh (with quiet as boot-parameter) is only working correct, if /var/run is writable (means RAMRUN=yes in /etc/defaults/rcS). The script wants to write to a progress file, which is only possible, if /var/run is mounted into the RAM.

Fixing the bug by skipping the hole $PROGRESSFILE thing or forcing the user to use RAMRUN.
Or better you shuld check for a writable /var/run/ directory before using it!

replacing the block:

PROGRESS_FILE=...
...
rm -f $PROGRESS_FILE

with

fsck $force $fix -t $roottype $rootdev

solved the problem.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 371614] Re: Upgrade 8.10 --> 9.04 : ext3 Filesystem read-only

On Wed, 2009-05-13 at 20:39 +0000, pjw wrote:

> https://bugs.launchpad.net/ubuntu/+bug/371614/comments/2 should explain
> it.
>
How did you install intrepid?

The default has always been RAMRUN=yes in Ubuntu

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
pjw (pjw1965) wrote :

Scott

> How did you install intrepid?

> The default has always been RAMRUN=yes in Ubuntu

Your're right. The normal user would never notice it.

But if the user has a choice, it should not broke the boot process.

Peter

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

On Thu, 2009-05-14 at 11:36 +0000, pjw wrote:

> > How did you install intrepid?
>
> > The default has always been RAMRUN=yes in Ubuntu
>
> Your're right. The normal user would never notice it.
>
> But if the user has a choice, it should not broke the boot process.
>
I'm not sure who added the choice.

It's certainly not one we support; most of the boot process
requires /var/run be writable - that's kinda why it's there.

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
pjw (pjw1965) wrote :

>I'm not sure who added the choice.

>It's certainly not one we support; most of the boot process
>requires /var/run be writable - that's kinda why it's there.

In intrepid I had RAMRUN=false and everything was fine. Something has changed during upgrade to jaunty.

The manual says:

$ man rcS

       RAMRUN Make /var/run/ available as a ram file system (tmpfs). Will
             also disable cleaning of /var/run/ during boot. Set to ’yes’ to
              enable, to ’no’ to disable. The size of the tmpfs can be con‐
              trolled using TMPFS_SIZE and RUN_SIZE in /etc/defaults/tmpfs.

Revision history for this message
pjw (pjw1965) wrote :

Please fix the bug for Ubuntu.

Don't breaks the boot process and use of configuration.

It's working in Debian, it should also in Ubuntu.

pjw (pjw1965)
Changed in sysvinit (Ubuntu):
status: Incomplete → New
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

We've removed the RAMRUN option, and any existing setting will be ignored. /var/run will always be a tmpfs.

Changed in sysvinit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.