2

I have my computer with both W7 and Ubuntu for quite a while now. I had made the Partitions with Easeus Partition Manager and no problem there.

I've grown fond of Ubuntu and wanted to allocate it more space. So with Easus partition manager I resized my W7 partitions and turned them to unallocated space.

When I re-started I got the Grub error "Unkown Filesystem", but I was able to repair it with Boot-Repair. I am now able to boot again into both OSs, but my swap partition is "not available" in System Monitor and Gparted and KPM can't find my filesystems.

My fdisk -l is this:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0xcc1175bb

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1            2048     3074047     1536000   27  Hidden NTFS WinRE
/dev/sda2   *     3074048    55745549    26335751    7  HPFS/NTFS/exFAT
/dev/sda3        55745552    97787654    21021051+   7  HPFS/NTFS/exFAT
/dev/sda4       269613055   312580095    21483520+   f  W95 Ext'd (LBA)
/dev/sda5       269613056   308674559    19530752   83  Linux
/dev/sda6       308674560   312580095     1952768   82  Linux swap / Solaris

Mount:

/dev/sda5 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/home/david/.Private on /home/david type ecryptfs 
(ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=2e10788bc7a3aea4,ecryptfs_fnek_sig=97c48f7ea38b799b)    
    gvfs-fuse-daemon on /home/david/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=david)

cat /etc/fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' 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/sda6 during installation
UUID=bd246bec-aa85-4b8e-84ec-dd2fa23a5dda /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
#UUID=bf8a85b1-f5ed-44f9-82a2-985ed51e06be none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

sudo blkid:

/dev/sda1: LABEL="TOSHIBA SYSTEM VOLUME" UUID="94D45BE5D45BC7DE" TYPE="ntfs" 
/dev/sda2: UUID="3C7452E57452A206" TYPE="ntfs" 
/dev/sda3: LABEL="Documents & Apps" UUID="01CC7A1011E57EA0" TYPE="ntfs" 
/dev/sda5: UUID="bd246bec-aa85-4b8e-84ec-dd2fa23a5dda" TYPE="ext4" 

@JOHN S GRUBER: I did not move SWAP partition. i only resized two primary partitions; one has the W7 OS, the other my W7 user info (My Documents, etc). MY fourth primary partition (which EASEUSPM could see but not modify) has two logical partitions: one is for all ubuntu, the other SWAP.

NOTE: "Swap" (as any other partition) do not show up in Gparted (or KPM) at all. So no right click option is possible.

Output of sudo parted -l:

david@davesLapU:~$ sudo parted -l
Error: Unable to satisfy all constraints on the partition.                

david@davesLapU:~$ 

Output of cat /etc/crypttab:

david@davesLapU:~$ cat /etc/crypttab
# <target name> <source device>     <key file>  <options>
cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
david@davesLapU:~$

@John S Gruber: I don't really know if I want it encrypted or not. I guess since it has non important data it could be non encrypted. If there is a notable advantage then maybe encryption would be better. Which do you recommend? (The focus of this machine is speed and performance though, so think about that for your advice.) Thank you.

Thanks for all the responses guys.

6
  • Could you please add the output of mount, cat /etc/fstab and sudo blkid to your question? Did the swap partition move? Aug 20, 2012 at 4:07
  • Have you tried "swapon" from the menu you get by right clicking on the swap partition in gparted? Aug 20, 2012 at 4:22
  • Please run sudo parted -l and add the output to your question. Aug 20, 2012 at 5:16
  • Could you add the output of cat /etc/crypttab? It appears that the swap file had been encrypted at one time, and then that was removed. The /etc/fstab line for swap is commented out. I can't tell whether the swap partition is uninitialized or initialized for encryption. It's probably not initialized for unencrypted swap since blkid doesn't find a UUID for it. Do you want to go for encrypted swap or unencrypted swap? Aug 20, 2012 at 13:45
  • I did not understand the last code in the answer provided. Please advice. Thanks. Aug 23, 2012 at 7:50

1 Answer 1

0

First, I assume that the disk has at least 312580095 + 1 sectors. If that's wrong it could explain why gparted doesn't want to access that partition.

It looks like it was set up, or sort of set up for encryption, and since the repair is not in good shape. Here's how to remove encryption for swap and reinitialize it.

The outline of this is from here.

 sudo swapoff -a

 sudo cryptsetup remove /dev/mapper/cryptswap1

I wouldn't be surprised if the above give you error messages as they may already be partially or fully complete at this point.

Comment out the /dev/sda5 line from /etc/crypttab. Note that cryptswap1 was pointing to /dev/sda5, your root partition. I don't understand that.

sudo /sbin/mkswap /dev/sda6

sudo swapon /dev/sda6

Check if swap is working now using free command.

To use swap automatically each time you boot:

sudo vi /etc/fstab

and change the line /dev/mapper/cryptswap1 none swap sw 0 0 to /dev/sda6 none swap sw 0 0

1
  • I was unable to change it. Using the keyboard strange things happen. Like for example using the left arrow inputs a D (up key a "B"), pressing delete or "INS" key, shifts the selected letter to Mayus or viceversa. I did not think I was so bad at using the terminal. There are also lots of blue squiglys in the terminal. That was weird. AND, when I was pressing lots of keys (Starting by numbers & pressing ALT &/or SHIFT) to find the squigly, my computer turned black and restarted or something!!! I think I really screwed it up :S. I am now backing up info and erasing ALL HDD to start fresh! Thanks Aug 25, 2012 at 0:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .