Slashdot Mirror


fsck-less Booting?

patrick42 asks: "I am working on a project where I'll be replacing a DOS/Windows-based system with that of Linux or FreeBSD. The company for whom I'm working uses cheap PC's running some proprietary software on DOS/Windows to perform a certain task. The machines are deployed in environments where there are no keyboards or displays, and minimum-wage clerks are the people watching these machines. The company has decided to go with a free Unix system because they no longer wish to pay the licensing fees for Windows. The machines get unplugged all the time when they are moved or whatnot. They do not get a proper shutdown procedure ever, and it's not possible to change this due to the environments in which they are deployed. I've been told that they've never had a problem running DOS in terms of filesystem corruption. So I guess I'm looking for the safest filesystem possible that I can use with either FreeBSD or Linux. My head would be served on a platter if I picked something that sometimes requires user-intervention." Note that Ask Slashdot covered a similar question back in 1999, the situations differed, but the need remains the same: can Linux work in environments where proper shutdowns are rare-to-non-existant?

"I have run many Linux machines, and I've experienced firsthand (only on occassion) where a machine did not get properly shutdown, and then on the next boot user-interaction was required to run fsck manually.

I really want to use either FreeBSD or Linux, but if there is any chance of this happening (hardware failures excluded) where someone needs to manually run fsck, I will not be able to use them.

I've been reading about the ext3 filesystem, and how corruption is quite rare, but it still seems possible. UFS claims to be quite stable as well, but fsck-less booting will not be available until FreeBSD 5.0 (from what I've read).

These machines aren't doing too much writing to the disk -- they are mostly just reading data, but that isn't to say that there will be no disk writes at all.

Can anyone offer some advice?"

3 of 50 comments (clear)

  1. Simplest solution: go read-only for system-data by earthy · · Score: 3, Insightful

    The simplest solution is to go read-only for all system data, such as binaries and static configuration. Even better: use something of a commit-system to commit configuration changes to disk and have the disk be read-write only when committing changes.

    Even though you'll still run with fsck this will not be a problem, as stuff can't have changed for reasons other than hardware failure... and you're not going to work around that in software anyway.

  2. Re:Synchronous by orangesquid · · Score: 4, Insightful

    Be wary of modern hard drives---some of them may use a write cache internally (from what I have heard, anyway).

    As for manually running fsck, you don't have to; calling /sbin/fsck -A -a will automatically repair the filesystems, without prompting for questions. On slackware, the appropriate file to edit is /etc/rc.d/rc.S --- Of course, your distribution might be one of those with a million confusing files in /etc/init.d and /etc/rc*.d in which case I can't help you :)

    If you want to disable e2fsck:

    The root filesystem will be checked first unless the -P option is specified (see below). After that, filesystems will be checked in the order specified by the fs_passno (the sixth) field in the /etc/fstab file. Filesystems with a fs_passno value of 0 are skipped and are not checked at all.
    -- fsck(8)

    --
    --TheOrangeSquid Is it any wonder things seem so awry? We swim in a sea of confusion and don't have to think to survive
  3. Diskless? by Col.+Klink+(retired) · · Score: 5, Insightful
    Are the machines networked? You could use Etherboot to boot over the network and have no local disks (or just a floppy if you don't want to make boot EPROMs).

    You didn't really say much about what the "certain task" these machines do. Do they need to save a lot of data? You could boot off a CD-ROM and use RAM disks for /var and other writeable partitions. Each time the machine is unplugged, it returns entirely to its initial state.

    If you want to save a small amount of data, you could put a VFAT formatted floppy and write persistent data there.

    --

    -- Don't Tase me, bro!