Quote:
Originally Posted by project722
Ok here is where I am at now:
Device Boot Start End Blocks Id System
/dev/sda1 2048 32505855 16251904 83 Linux
/dev/sda2 32507902 33552383 522241 5 Extended
/dev/sda5 32509950 33552383 521217 82 Linux swap / Solaris
That is as close as I could get the structure to the way it was BEFORE I did anything. Below is the way it was originally:
/dev/sda1 * 2048 32505855 16251904 83 Linux
/dev/sda2 32507902 33552383 522241 5 Extended
/dev/sda5 32507904 33552383 522240 82 Linux swap /
As you can see - sda5/swap here in the original exist in the same space(almost) as sda2. I don't really get that but what I had to do to get it to look like this again was actually create sd5 as a logical partition in order to list it as partition "5" then I attempted to convert it to swap space by using "mkswap /dev/sda5". But this failed with "device or resource busy". So I checked to see if it was mounted and it was not. At that point I was not sure what could be keeping me from converting the space into swap so I simply went back into fdisk and changed the ID to 0x82 to identify it as swap. So as of now I have a similar look to the original table.
|
An extended partition is a container for holding logical partitions (partition numbers 5 and higher). It is normal (required, actually) that the logical partitions are within it.
The reason sda5 appears busy is because the kernel is using what used to be sda5 for swap. Until you reboot, the kernel's notion of sda5 will be at its old starting location.
Your only problem now is that the swap partition doesn't start at the same place it did before. That isn't a fatal problem. It just means that the automatic
swapon when you reboot will fail because there is no swap signature present on the new sda5. After you reboot, you will need to run "mkswap -U e0de16fa-8e60-4237-af98-3ebaafb594e5 /dev/sda5" to label the new swap space with the same UUID it had before. Then you can run "swapon -av" to activate that swap space.
Do not forget to reinstall your boot loader. You won't be able to reboot until you do.