logo       

Re: How to set a reiserfs partition to get an occasional fsck?: msg#00235

file-systems.reiserfs.general

Subject: Re: How to set a reiserfs partition to get an occasional fsck?

2004-01-29T23:15:10 Michael James:
> PS: I've just realized I can do it by adding an fsck
> into the linuxrc script of a cooked initrd image.

I'm sure there are many approaches that can be used, but it so
happens that I can specifically comment on that one, having recently
gotten started playing with initrds.

They're so easy, so fun!

If I wanted to make a "fsck boot", here's how _I_ would do it.

dd if=/dev/zero bs=1024k count=4 of=initrd.fs
mke2fs initrd.fs
mount -o loop initrd.fs /mnt
# copy a full busybox setup onto /mnt
# copy the statically-linked fsck binary I want to /mnt
sync
umount /mnt
gzip -9 <initrd.fs >initrd.img

That's a rescue disk. If you want it to be completely automated, add
this etc/init.d/rcS, mode 0755:

#!/bin/sh
fsck command I want
reboot

I've got a statically linked busybox (along with a lot of other
components, all statically linked against uClibc) available from
<URL:http://bent.latency.net/bent/>. For rescue disk creation you'll
want to unpack elsewhere and delete docs, and var/lib/bpm (where the
complete package sources are installed).

To boot such an initrd, besides specifying your kernel and initrd,
you want to add "rw" and "root=/dev/ram0" to your boot options.

But I don't think I'd actually respond this way to the problem
you've got. RAM is so cheap, run memtest86 to find out for sure
which bits are marginal, and replace 'em.

-Bennett

Attachment: pgpFMHnU8xqYK.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise