linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux kernel problem (disklabel and swap)
@ 2003-07-06  5:53 Daniel Cavanagh
  2003-07-06 10:48 ` Andries Brouwer
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Cavanagh @ 2003-07-06  5:53 UTC (permalink / raw)
  To: linux-kernel

hi

i recently had the problem with a bsd disklabel and swap and as someone 
suggested, the swap slice did not have SWAPSPACE in it and that running 
mkswap would fix this. sure enough it did, but then i wondered why 
swapon allowed /dev/hda3 as a valid swap. so i had a look and SWAPSPACE2 
was there, right at the start of the openbsd partition, inside the 
disklabel. so i have come to the conclusion that openbsd tells the world 
via the disklabel that a partition/slice is swap rather than at the 
start of the swap slice. the linux kernel does not know this and wants 
SWAPSPACE2 at the start of the partition/slice. to test this i booted up 
openbsd and forced it to swap. it wrote over the SWAPSPACE2 in the 
slice. so i think that the linux kernel needs to be fix so that if an 
openbsd partition exists, the kernel expects SWAPSPACE2 in the disklabel 
rather than the actual swap slice. i don't know if this is true for 
other *BSD though.

i hope this helps.

thanks, daniel.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linux kernel problem (disklabel and swap)
  2003-07-06  5:53 linux kernel problem (disklabel and swap) Daniel Cavanagh
@ 2003-07-06 10:48 ` Andries Brouwer
  0 siblings, 0 replies; 2+ messages in thread
From: Andries Brouwer @ 2003-07-06 10:48 UTC (permalink / raw)
  To: Daniel Cavanagh; +Cc: linux-kernel

On Sun, Jul 06, 2003 at 03:53:27PM +1000, Daniel Cavanagh wrote:

> i recently had the problem with a bsd disklabel and swap and as someone 
> suggested, the swap slice did not have SWAPSPACE in it and that running 
> mkswap would fix this. sure enough it did, but then i wondered why 
> swapon allowed /dev/hda3 as a valid swap. so i had a look and SWAPSPACE2 
> was there, right at the start of the openbsd partition, inside the 
> disklabel. so i have come to the conclusion that openbsd tells the world 
> via the disklabel that a partition/slice is swap rather than at the 
> start of the swap slice.

I don't know about openbsd, but this sounds rather unlikely.
More likely is that you (or some installation script run by you)
marked that partition as swapspace.
mkswap for SWAPSPACE2 will preserve the first 1024 bytes, so it is possible
that you did this mkswap without destroying the disklabel.
Note that partition numbering is a black art, especially when you mix
several types of partition table. The name (number) of your partition
may depend on kernel version and on for what partition table types you
have support in your kernel.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-06 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-06  5:53 linux kernel problem (disklabel and swap) Daniel Cavanagh
2003-07-06 10:48 ` Andries Brouwer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).