PDA

View Full Version : I deleted my swap partition by accident;how to create new?



jariep
04-03-2005, 04:58 AM
I accidentally deleted my swap partition with qtparted. How do I create a new swap partition for knoppix 3.6 to replace the one I deleted?

eco2geek
04-03-2005, 07:44 AM
I accidentally deleted my swap partition with qtparted. How do I create a new swap partition for knoppix 3.6 to replace the one I deleted?

The obvious solution would be to boot from the live CD (not from your hard drive), run QTParted as root, and recreate the swap partition, no?

ddrex
04-04-2005, 06:57 PM
I accidentally deleted my swap partition with qtparted. How do I create a new swap partition for knoppix 3.6 to replace the one I deleted?

The obvious solution would be to boot from the live CD (not from your hard drive), run QTParted as root, and recreate the swap partition, no?

This is exactly the sort of situation that knoppix live-CD shines at: emergency system recovery, even for itself.

Creating the swap partition is only the first step however. It also has to be initialised. QTParted apparently will do this. Select the appropriate partition, then go under Operations->&Format. Select a partition type of "linux-swap". Or, you can do it from a root shell using mkswap (see the man page). The next time you boot linux should find the swap and use it automagically just like always.