WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: GParted fails at creating SWAP partitions  (Read 1623 times)

Offline baz

  • Full Member
  • ***
  • Posts: 216
GParted fails at creating SWAP partitions
« on: January 04, 2010, 12:03:21 AM »
If you try and create a SWAP partition using GParted it will fail because it tries to run the command: mkswap -L "" /dev/sda2 which returns *instructions* on how to use mkswap. The proper command is simply: mkswap /dev/sda2

Why is that?

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: GParted fails at creating SWAP partitions
« Reply #1 on: January 04, 2010, 12:29:18 AM »
-L "" is trying to ensure that any label is removed.
mkswap in the base is a busybox applet which does not support the label (-L) option.

If you load util-linux-ng it should work.
10+ Years Contributing to Linux Open Source Projects.

Offline baz

  • Full Member
  • ***
  • Posts: 216
Re: GParted fails at creating SWAP partitions
« Reply #2 on: January 04, 2010, 12:33:03 AM »
Beautiful, just tested it and it works. The SwapOff command in GParted also now works. Thanks!