How to delete locked swap partition? [solved]

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

How to delete locked swap partition? [solved]

#1 Post by nubc »

A long while ago, I set up a Linux box with two partitions and swap. For some reason the swap partition is embedded inside an extended partition of the same approximate size. That extended partition is labeled sda2, and the swap partition is labeled sda5. The second partition is not really a formal partition, just blank space covering the last half of the 80 GB hard drive. When I run Wary 5.2 as live CD with the pfix=ram boot option, GParted shows both the swap partition and the extended container partition to be locked. So then, what are my options? I would rather not have to wipe (zero) this drive because the only quick wipe is from floppy, and this computer does not have a floppy drive. So then I am guessing that I must delete this partition from command line. I did a little research and came up with the following procedure using the fdisk command.

http://www.cyberciti.biz/faq/linux-how- ... k-command/

Any other suggestions on how to proceed?
Last edited by nubc on Sat 21 Apr 2012, 11:30, edited 1 time in total.

Lookinglass360
Posts: 79
Joined: Fri 22 May 2009, 13:50
Location: Largo, Florida USA

How to delete locked swap partition? Subject description: wh

#2 Post by Lookinglass360 »

Hi nubc

This has worked for me,then delete.

Good luck!

User avatar
rhadon
Posts: 1292
Joined: Thu 27 Mar 2008, 11:05
Location: Germany

#3 Post by rhadon »

Also from terminal you can use swapoff -a.

Your save file has nothing to do with swap, so pfix=ram is useless in this case.

HTH
Rolf
Ich verwende "frugal", und das ist gut so. :wink:
Raspberry Pi without Puppy? No, thanks.

User avatar
nubc
Posts: 2062
Joined: Tue 23 Jan 2007, 18:41
Location: USA

#4 Post by nubc »

In my version of GParted, swapoff was not available from the 'Partition' menu. Instead, one had to right click the partition itself, as listed under the graphic representation of the drive. I deleted the embedded swap partition first (sda5), and then the extended container partition (sda2).

Thanks for the tips.
Last edited by nubc on Mon 11 Mar 2013, 19:14, edited 1 time in total.

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#5 Post by nooby »

Thanks for the thread. I wanted to know these things too.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to delete locked swap partition?

#6 Post by Monsie »

For the record and just to clarify:

If you run Gparted within Wary, select the swap partition first, then click on "Partition" in Gparted and you will find that the "swapoff" feature will show up in the menu. If you do not select the swap partition first, then "swapoff" will not show up in the menu... tested and confirmed on my Wary desktop.

Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

Post Reply