[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [debian-knoppix] Recognizing SWAP partitions (incorrectly) and loop inputs



On Thu, Sep 30, 2004 at 08:29:50PM -0700, Stephen Samuel wrote:
> Klaus Knopper wrote:
> >Hello Stephen,
> >
> >On Mon, Sep 27, 2004 at 03:52:34PM -0700, Stephen Samuel (leave the email 
> >alone) wrote:
> >
> >>I ran into a situation this weekend where I had a disk which
> >>had ONCE been formatted as a Linux SWAP partition and then later
> >>as a BSD filesystem... IT turns out that the bsd newfs program
> >>does NOT stomp on the Linux swap magic string, meaning that when
> >>knoppix booted, it used the new BSD filesystem as a swap partition.
> >>Since the machine in question is low on memory, the swap was
> >>quickly ued, and the filesystem trashed.
> 
> >That's bad, but I would rather say it's a definitive bug of the bsd newfs
> >program not to clear a swap signature when creating a file system header!
> 
> No. The design of newfs is to NOT delete stuff at the beginning of the 
> partition,
> because sometimes other programs (eg. boot loaders ) use it.

That's something entirely different. If you reformat a partition, the header
should be cleared. What good is a boot record on a partition when the content
is gone?

> -- and since 
> various
> filesystems have their signatures at various places (eg: Reiserfs is at 
> 64K),
> if you took that responsibility, you'd essentially have to zero the entire 
> partition
> (or at least the first megabyte).

But mkreiserfs clears the swap signature.

> I originally reported this as a bug to the OpenBSD people (I thought that 
> the
> two partition type numbers were the same.. I was wrong).

I, too, think that it is a bug in newfs. Could it be that the BSD people are
just wanting their newfs to be different?

Regards
-Klaus Knopper


Reply to: