In trying to solve a problem with Windows, a tool I was using deleted some of my partitions. I used TestDisk to recover my partitions.
While it managed to recover all my data partitions, it couldn't recover my swap partition. Normally, that wouldn't be a big deal, since it's easy to create another swap partition. In this case, though, it also didn't find my extended partition, so all my recovered partitions are primary partitions, instead of logical partitions. Now, I can't create any more.
I want to re-create the layout shown in my pre-event fstab
:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=65340dbf-705f-409d-8bfa-54f408fe23c9 / ext4 errors=remount-ro 0 1
# /extra was on /dev/sda8 during installation
UUID=6921d03e-e64f-4403-9381-be2b2eed62e2 /extra ext4 defaults 0 2
# /home was on /dev/sda6 during installation
UUID=b1c33077-6a9b-4e1c-bde5-d44efc96ffbd /home ext3 defaults 0 2
# /windows was on /dev/sda1 during installation
UUID=F624495B2449204B /windows ntfs defaults,umask=007,gid=46 0 0
# swap was on /dev/sda2 during installation
#UUID=1e3afc3a-152e-44ab-9275-c5ca30efad0f none swap sw 0 0
# swap was on /dev/sda7 during installation
#UUID=2e41ce67-2a25-4ed3-a64e-b5480172477b none swap sw 0 0
/dev/mapper/cryptswap1 none swap sw 0 0
/dev/mapper/cryptswap2 none swap sw 0 0
# tmpfile stuff
tmpfs /tmp tmpfs defaults,size=512M,mode=1777 0 0
tmpfs /var/tmp tmpfs defaults,size=32M,mode=1777 0 0
Here's my current layout, expressed both as fdisk
output and a GParted screen shot:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000bfc8b
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 41945087 20971520 7 HPFS/NTFS/exFAT
/dev/sda2 41955328 83898367 20971520 83 Linux
/dev/sda3 83900416 764268543 340184064 83 Linux
/dev/sda4 764276373 970486649 103105138+ 83 Linux
GParted screenshot http://img7.imagebanana.com/img/vqt7wwq6/Screenshotfrom2012052800_04_35.png
Clearly, I don't want to delete any data to do this. Are there any tools that are capable of this? It seems that if I could write the partition table at a low level, I'd be able to accomplish this. What do you recommend?
By the way, I use an encrypted home directory (that's $HOME
, not /home
), and previously my swap was encrypted. I don't know how encrypted swap is set up.