All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zan Lynx <zlynx@acm.org>
To: Jason Price <japrice@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fwd: show label for swap partition.
Date: Mon, 28 Jan 2008 20:10:42 +0000	[thread overview]
Message-ID: <1201551042.9135.5.camel@localhost> (raw)
In-Reply-To: <83f15e30801281158s36b0da3el210f5a97b0348ea3@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]


On Mon, 2008-01-28 at 14:58 -0500, Jason Price wrote:
> I apologize if this is the wrong forum.  Please CC me on replies.
> 
> A admin accidentally deleted the swap line from the fstab file.  We
> mount the swap filesystem via labels.  However, there seems to be no
> way to list the label on an existing swap partition, via the command
> line swap tools (mkswap, swapon/off, etc)
> 
> Is this blindness on my part, or should there be an analog to e2label
> for swap partitions?

There's this cheesy way to get it:
# dd if=swapfile bs=4k count=1 | xxd -a
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 6.2589e-05 s, 65.4 MB/s
0000000: 0000 0000 0000 0000 0000 0000 0000 0000  ................
*
0000400: 0100 0000 ffff 0000 0000 0000 f209 fce3  ................
0000410: 7bc9 486d ac86 5d63 af25 3c99 466c 6173  {.Hm..]c.%<.Flas
0000420: 6853 7761 7000 0000 0000 0000 0000 0000  hSwap...........
0000430: 0000 0000 0000 0000 0000 0000 0000 0000  ................
*
0000ff0: 0000 0000 0000 5357 4150 5350 4143 4532  ......SWAPSPACE2

You can see it is marked as SWAPSPACE2.  The label is FlashSwap.  Looks
like it appears at offset 0x41c.
-- 
Zan Lynx <zlynx@acm.org>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-01-28 20:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <83f15e30801281151w21466ef9m82dc50ab09dc390f@mail.gmail.com>
     [not found] ` <83f15e30801281156od91c2a8p3ec439cb16232386@mail.gmail.com>
2008-01-28 19:58   ` Fwd: show label for swap partition Jason Price
2008-01-28 20:10     ` Zan Lynx [this message]
2008-01-28 20:53       ` Jan Engelhardt

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=1201551042.9135.5.camel@localhost \
    --to=zlynx@acm.org \
    --cc=japrice@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.