Re: [bug report] umsdos ruins ext2 file system

Theodore Ts'o (tytso@mit.edu)
Fri, 21 Jul 1995 11:25:12 +0200


Date: Tue, 18 Jul 1995 18:31:55 -0700 (PDT)
From: cloister bell <cloister@hhhh.org>

> Let me clarify something --- 0.5b is already released; if your
> filesystem was created using 0.5b mke2fs, you won't need to worry about
> the FAT magic number being present in the book sector.

that's cool. so do those of us with ext2 filesystems older than that
need to worry about what may or may not be in our boot sectors? if so,
what do you recommend that we do about it?

If your partition was not previously used as a FAT filesystem, you don't
need to worry. If you have installed the LILO boot blocks in the first
block of the filesystem, you don't need to worry.

If the partition was previously used as a FAT filesystem, and you
haven't installed LILO on the boot blocks of the partition, AND you are
afraid that at some point in the future you or someone else might do
something stupid and accidentally mistype a command which mounts your
ext2fs filesystem as a MSDOS filesystem, then there is something you can
do:

dd if=/dev/zero of=/dev/hdaX bs=512 count=1

WARNING! WARNING! WARNING! If you are accidentally mistype
this command, you can experience severe data loss. In particular, if
you specify /dev/hda instead of /dev/hda{1,2,3,4} in the above line, you
will destroy your partition table; recovery can be very painful.
Alternatively if you zero out a boot blook which LILO is relying on, you
will no longer be able to boot your Linux system.

- Ted