From: Andries Brouwer <aebr@win.tue.nl>
To: Daniel Cavanagh <nofsk@vtown.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: bsd disklabel and swap
Date: Fri, 4 Jul 2003 09:06:23 +0200 [thread overview]
Message-ID: <20030704070623.GA16445@win.tue.nl> (raw)
In-Reply-To: <3F04FFD0.2060404@vtown.com.au>
On Fri, Jul 04, 2003 at 02:17:20PM +1000, Daniel Cavanagh wrote:
> i'm having a problem with a bsd disklabel and swap.
> my /dev/hda disk look like this
>
> partition 1: fat
> partition 2: ext2
> partition 3: openbsd
>
> it is a standard bsd disklabel with a as root and b as swap. this means
> that /dev/hda6 should be the swap partition. but "swapon /dev/hda6"
> prints "swapon: /dev/hda6: Invalid argument". it also prints that for
> any other valid partition. if i put this in /etc/fstab, on boot the
> kernel will print "Unable to find swap-space signature" before swapon
> prints the above message. but if i use /dev/hda3 instead, swapon will
> accept it and add a 512Mb swap, which is the correct size. but it
> appears that rather than writing at the start of the swap it starts
> writing at the start of the openbsd partition so my root partition is
> being corrupted. have i screwed or have you guys screwed up?
This sounds like user confusion.
A partition becomes a Linux swap partition by writing "SWAPSPACE" somewhere
at the beginning. (Yes, I know the details, don't tell me.)
If this signature is missing, the kernel refuses to swap to
the partition, in order to protect your data in case of a typo
in the swapon command.
The signature is written by the mkswap(8) command. Use it.
Andries
next prev parent reply other threads:[~2003-07-04 6:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-04 4:17 bsd disklabel and swap Daniel Cavanagh
2003-07-04 7:06 ` Andries Brouwer [this message]
2003-07-05 22:42 ` Ducrot Bruno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030704070623.GA16445@win.tue.nl \
--to=aebr@win.tue.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=nofsk@vtown.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox