From: John Reiser on
> Is there anything architecture-specific about "mkswap"?

Read The Fine Manual page: give the command "man mkswap" to a shell program
in a terminal session. There you will see that mkswap depends on the native
page size of the hardware, usually 4KiB or 8KiB.

--
From: Kenny McCormack on
In article <9padncet96Ya6MrRRVn_vwA(a)giganews.com>,
John Reiser <jreiserfl(a)comcast.net> wrote:
>> Is there anything architecture-specific about "mkswap"?
>
>Read The Fine Manual page: give the command "man mkswap" to a shell program

So, what's the answer to the question?

--
Faced with the choice between changing one's mind and proving that there is
no need to do so, almost everyone gets busy on the proof.

- John Kenneth Galbraith -

From: Michael Black on
On Tue, 3 Aug 2010, Kenny McCormack wrote:

> Is there anything architecture-specific about "mkswap"?
>
> That is, is there anything wrong with using "mkswap" on a machine
> running Linux on one architecture (say, i386) to create a swap partition
> on a device, then using that device for swap under Linux running on
> another architecture (say, ARM). I.e., assume that, for whatever
> reason, "mkswap" does not exist on the target architecture.
>
> I assume the answer is "no", but thought I'd check - because one never
> knows... I'd assume that "mkswap" is pretty much analogous to "mke2fs",
> and obviously that's not architecture-specific.
>
I don't see why it would be specific. All you are doing is partitioning
a section of hard drive for swap and indicating it is for swap.

It's not as if you then continue to format the space, which then might
cause conflict. It's just a space, the operating system uses and does
whatever with that space when it needs it.

Note that I could multiple boot and have only one swap space for both
variants of Linux, and if I booted with one, it wouldn't care one bit
that I'd been using the swap partition with the other distribution. In
other words, it expects a "blank" partition, and acts accordingly, and
thus it can't expect anything to be on that partition, which means
whatever it needs for that parition, it will provide.

Michael
From: Robert Riches on
On 2010-08-03, John Reiser <jreiserfl(a)comcast.net> wrote:
>> Is there anything architecture-specific about "mkswap"?
>
> Read The Fine Manual page: give the command "man mkswap" to a shell program
> in a terminal session. There you will see that mkswap depends on the native
> page size of the hardware, usually 4KiB or 8KiB.

It appears some didn't understand that the page size _CAN_ be
architecture specific. Because mkswap depends on page size,
mkswap _CAN_ therefore be architecture specific. Now, whether
i386 and x86_64 have different page size, I don't happen to
know. All my home hardware is 32-bit (but hopefully for not too
much longer).

--
Robert Riches
spamtrap42(a)jacob21819.net
(Yes, that is one of my email addresses.)
From: John Reiser on
>>> Is there anything architecture-specific about "mkswap"?

>> Read The Fine Manual page: give the command "man mkswap" to a shell program

> So, what's the answer to the question?

The answer to the question is, "Yes." This answer is contained directly
in the *next* sentence, which you snipped:

There you will see that mkswap depends on the native
page size of the hardware, usually 4KiB or 8KiB.

Note the words, "mkswap depends on the native page size". That dependency
is architecture-specific.

--