Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have reinstalled Ubuntu 5 times already and I can't find what is wrong

I messed with /etc/fstab and seems I don't have swap space

Can some one help me and tell if this is a healthy fdisk -l, and if not what I should do?

Disk /dev/sda: 20.4 GB, 20416757760 bytes
255 heads, 63 sectors/track, 2482 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000675f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        2483    19936256    7  HPFS/NTFS

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xafe6fd0f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          13      102400    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdb2   *          13        5839    46793727+   7  HPFS/NTFS
/dev/sdb3           15808       19457    29312000    7  HPFS/NTFS
Partition 3 does not end on cylinder boundary.
/dev/sdb4            5839       15807    80071552+   5  Extended
/dev/sdb5            6165       15517    75123712   83  Linux
/dev/sdb6           15518       15807     2329393+  82  Linux swap / Solaris
/dev/sdb7            5839        6165     2618368   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/dm-0: 2385 MB, 2385298944 bytes
255 heads, 63 sectors/track, 289 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6afd02f5

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2681 MB, 2681208832 bytes
255 heads, 63 sectors/track, 325 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4438c22c

Disk /dev/dm-1 doesn't contain a valid partition table

Output of ls /dev/mapper:

control  cryptswap1  cryptswap2

Sometimes, my computer drops to an initramfs shell on boot or becomes very slow. I think it's because there is something wrong with my swap space.

This is my fstab file:

# /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/sdb5 during installation
UUID=f78f1d1f-82e3-48bd-b3e5-03fd8b75dfcc /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdb6 during installation
#UUID=a3c19631-c3ed-44b2-b409-7ed31fd3d7aa none            swap    sw             0       0
# swap was on /dev/sdb7 during installation
#UUID=5e8beccd-8dbb-431b-aa65-c1f073b30b10 none            swap    sw             0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
/dev/mapper/cryptswap1 none swap sw 0 0
/dev/mapper/cryptswap2 none swap sw 0 0 

this is outpost of mount.

/dev/sdb5 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
n    one on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/home/lerry/.Private on /home/lerry/Private type ecryptfs (ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=bbdcf1ee6db39142,ecryptfs_fnek_sig=aab58941a7c801da)
gvfs-fuse-daemon on /home/lerry/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=lerry)
share|improve this question
    
I'm not sure why you have dm-N devices there. Post the output of ls /dev/mapper –  psusi Jun 8 '11 at 14:03
    
Could you provide the output of mount? Add it to your question, do not post it as answer. –  Lekensteyn Jun 8 '11 at 17:31
add comment

1 Answer 1

I've converted that output to an image:

graphical representation

At first, I thought there was something wrong. Looking closer, I noticed that you've just removed some partitions from the middle of the disk and created new ones: the extended partition holding the swap, the root partition and another swap (in that order). You do not need two swaps, I suggest:

  • remove one swap (sdb7)
  • expand the root partition (sdb5) with the space from the removed swap
  • shrink the root partition on the right
  • expand the swap (sdb6) To do this, boot into a LiveCD and start the Disk Utility.

The output is OK, there is nothing wrong with it except for a strange partitioning order which is caused by removing / creating partitions. The sdb4 partition is a special one, the extended partition. All partitions with a number greater than 4 are logical partitions inside the extended partition. Partitions 1-3 are primary partitions.

Th next time, do not mess that much with the system configuration files without making a backup of those.

Regarding your fstab file, you don't have an encrypted root system, let alone a swap. I've not the slightest clue how you got one (perhaps a remaining from a previous install?). So you'd better replace the last two lines with:

/dev/sdb7 none swap sw 0 0
/dev/sdb6 none swap sw 0 0

The floppy one looks suspicious too, why would you automatically mount a floppy? I would remove it. (or comment it out)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.