WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline baz

  • Full Member
  • ***
  • Posts: 216
GParted fails at creating SWAP partitions
« on: January 03, 2010, 09:03:21 PM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: GParted fails at creating SWAP partitions
« Reply #1 on: January 03, 2010, 09:29:18 PM »
-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 03, 2010, 09:33:03 PM »
Beautiful, just tested it and it works. The SwapOff command in GParted also now works. Thanks!