Gentoo Archives: gentoo-user

From: Aaron Nichols <adnichols@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re-post:How to get jfs root partition to properly fsck on power failure?
Date: Sun, 07 Aug 2005 05:24:05
Message-Id: ac05538405080622194a7f9e18@mail.gmail.com
1 Hey all, I know somebody here has got to have info that may be of help. If
2 I'm totally missing something obvious here feel free to beat me to a pulp -
3 but anything is better than silence :) Since I didn't get any responses last
4 time I'll try one more time.
5
6 Original message:
7
8 Hello Everyone,
9 I feel like the answer here should be obvious, but either my google skills
10 have deteriorated badly, I'm missing the obvious, or I've just run into a
11 strange problem (which I doubt).
12
13 I have a Gentoo install with the following filesystem layout (from fstab):
14
15 /dev/sda2 /boot ext3 noatime 1 2
16 /dev/sda6 / jfs noatime 1 1
17 /dev/sda3 none swap sw 0 0
18 /dev/sda5 /var jfs noatime 0 2
19 /dev/sda7 /home jfs noatime 0 2
20
21 Things work fine under normal circumstances, however if the machine is
22 powered off uncleanly (power button, power failure, etc) it refuses to boot.
23 The problem seems to stem from the fact that the root partition does not get
24 checked prior to mounting. I have the following grub stanza which boots the
25 system. It includes the "ro" option which is supposed to tell the kernel to
26 mount the root partition read-only at first to perform a fsck.
27
28 title=Gentoo Linux 2.6.12-r6
29 root (hd0,1)
30 kernel /kernel-genkernel-x86-2.6.12-gentoo-r6 root=/dev/ram0 init=/linuxrc
31 ramdisk=8192 real_root=/dev/sda6 udev hda=ide-scsi hde=ide-scsi ro
32 initrd /initramfs-genkernel-x86-2.6.12-gentoo-r6
33
34 When booting this it basicly starts udev, then tries to mount filesystems
35 and says /dev/sda6 is not a valid partition and drops me into busybox.
36
37 The way I'm able to recover this is to boot to the live CD,
38 fsck.jfs/dev/sda6 and then reboot and the remaining filesystems fsck
39 fine and the
40 system boots. However, one thing I notice is that once / is unmounted
41 unexpectedly, it cannot be mounted prior to an fsck (get errors from mount).
42 This seems like a bit of a chicken & egg situation.
43
44 I can't believe this is a unique problem I've stumbled upon - does anyone
45 have either an obvious answer to this question or some examples of a working
46 gentoo install using jfs as the root partition (please, no responses of
47 "yeah, works fine for me" if you can resist).
48
49 I'll happily provide more info as desired - but thought I'd start here.
50
51 Aaron

Replies

Subject Author
Re: [gentoo-user] Re-post:How to get jfs root partition to properly fsck on power failure? Benno Schulenberg <benno.schulenberg@×××××.com>