Re: Script to change swap <-> FAT partition on reboot?



So anyway, it was like, 17:23 CET Mar 01 2007, you know? Oh, and, yeah,
sk8terg1rl was all like, "Dude,
Hi Johan,
On Mar 1, 4:07 pm, Johan Lindquist <s...@xxxxxxxxxxxxxx> wrote:
So anyway, it was like, 16:58 CET Mar 01 2007, you know? Oh, and, yeah,
sk8terg1rl was all like, "Dude,

[..]

I intend to use the FAT space mostly as a shared space I can
access with either operating system to transfer files, so I don't
mind that it will regularly get wiped.

Just a practical question, how do you plan to use it for just that
(transfer files) when every time you switch to one of the osen, you
mean to erase it?

So if I want to transfer files from Linux to Windows, I run the
script that changes my swap space to FAT. Linux's performance
shouldn't be drastically affected by not having swap if I'm about to
reboot anyway. I then copy the files to the new FAT partition and
reboot to Windows.

I rarely transfer files from Windows to Linux but if I do, could
GRUB be set up so that one of the boot options allows me to
choose whether I want to change the FAT partition to a swap one?
Alternatively I could always never change FAT -> swap on entering
Linux, and just do it manually.

Seems like a whole lot of work for something a <$30 (really, I dunno,
but you can get 4G for under 60 euro here at this time, so 1G sticks
should be pretty much thrown around as marketing gimmics by now) usb
stick would do without any of the hassle.

If that's not an option, then the next question would be whether
you're so starved for disk space that you can't have both a swap
partition and a transfer partition too. Sometimes being clever gets in
the way of being efficient.

If you're just looking for a manual way to add swap whenever you
need it tho, 'man mkswap' might be a good place to start.

I'll look at it. I think can accomplish the above via SuSE's GUI
"Partitioning" in Yast but I get the message:

"You have changed the FSID of an existing partition. In some cases,
this could have serious consequences, especially if you change the
FSID of a partition belonging to a different operating system. Only
proceed if you know exactly what you're doing."

If you'd looked at the manual page, you'd known that linux doesn't
actually need to have the id of a partition set to swap to use it. The
gooey wizard probably changes it for you, but you're not really up to
anything the wizard was intended for here.

In your case, keeping it set to fat32 (or the best match, don't recall
off-hand what it's called) may make windows recognise it properly when
it's formatted as that, while you can just tell linux to use it for
swap without changing the id.

Changing it to swap could be done with an init script, kept in its
own runlevel that you select from grub. Were it me, I wouldn't really
bother with all that tho.

Will I seriously mess up the system if I format and remount an
active swap partition?

Just 'swapoff' it, 'mkfs' to your heart's desire, 'mount'. No worries.

--
Time flies like an arrow, fruit flies like a banana. Perth ---> *
17:35:13 up 112 days, 15:16, 5 users, load average: 0.05, 0.07, 0.08
Linux 2.6.18.1 x86_64 GNU/Linux Registered Linux user #261729
.



Relevant Pages

  • Re: couple newbie questions (install & doc)
    ... a Linux power user, or at least quite familiar with it. ... Plan on swap size to be twice the ... real performance problems with swap spread over three hard drives. ... > suggestions as to how I should partition my disk2? ...
    (alt.os.linux.suse)
  • Re: duel booting with 2x *nix
    ... >> Is it possible to use a single swap partition for multiple distro's on ... >> do so with BSD and linux? ... the OSen that will share the swap, for the reasons Brian gives below. ... Backup backup backup. ...
    (freebsd-questions)
  • Re: Swap sharing
    ... > point is that Linux uses a dynamic numbering scheme for partitions. ... > swap space. ... This signature is added by mkswap. ... Linux will refuse to use the specified partition as swap ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Swap space settings and other partitioning qs
    ... > This is difficult if you configure a big swap partition. ... > Best regards, Paul ... This is for any game I may have but not be able to get to run in Linux ...
    (comp.os.linux)
  • Re: Swap space settings and other partitioning qs
    ... > This is difficult if you configure a big swap partition. ... > Best regards, Paul ... This is for any game I may have but not be able to get to run in Linux ...
    (alt.linux)