Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've reinstall windows 7 on it's asignated partition and, as usually, it override the MBR with it's own stuff and, thus, it was not possible to boot to my ubuntu 12.04 partition.

I followed the step int this tutorial and everything went good.

When booting on my ubuntu 12.04 system after that, I got an error message telling me that there was an error while mounting /home/. I selected to ignore the error and the boot continue successfully until login screen. When trying to log into my account, nothing happened after I entered my password.

I opened a terminal and see a dummy /home/ with nothing inside.

Here is what my disk looks like:

# fdisk -l
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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: 0x000913aa

   Device Boot      Start         End      Blocks  Id  System
/dev/sda1    *         63   275803919  137901928+  7   HPFS/NTFS/exFat
/dev/sda2       275803290   317797829   20996955   83  Linux
/dev/sda3       317797954  1953520064  817861055+   5  Extended
/dev/sda5      1936716075  1953520064    8401995   82  Linux swap / Solaris

# blkid
/dev/sda1: UUID="4CD32DDF72FB084D" TYPE="ntfs"
/dev/sda2: UUID="dae0bc16-7133-4706-8a40-fdd84e281651" TYPE="ext4"
/dev/sda5: UUID="2daec68e-08b6-452f-8f75-2f59ebf61ba5" TYPE="swap"

Here is what happen when I try to mount it myself

# mount /dev/sda3 /mnt
[ 2680.555298] EXT3-fs (sda3): error: unable to read superblock
[ 2680.564065] EXT4-fs (sda3): unable to read superblock
mout: you must specify the filesystem type

# mount -t ext4 /dev/sda3 /mnt
[ 2863.195328] EXT4-fs (sda3): unable to read superblock
mount: wrong fs type, bad option, bad superblock on /dev/sda3,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

# dmesg | tail
... other stuff related to my sound card ...
[   21.538194] init: mountall main process (325) terminated with status 2
[ 2680.555298] EXT3-fs (sda3): error: unable to read superblock
[ 2680.564065] EXT4-fs (sda3): unable to read superblock
[ 2863.195328] EXT4-fs (sda3): unable to read superblock

Then, I read somewhere to try

# mke2fs -n /dev/sda3
mke2fs 1.42 (29-Nov-2011)
mk2fs: inode_size (128) * inodes_count (0) too big for a
       fylesystem with 0 blocks, specify higher inode_ratio (-i)
       or lower inode count (-N).

# fsck.ext4 /dev/sda3
e2fsck 1.42 (29-Nov-2011)
fsck.ext4: Attempt to read block from filesystem resulted in short read
           while trying to open /dev/sda3
Could this be a zero-length partition?

Basically, it seems that my partion /dev/sda3 is assumed to have a zero-length.

How can I solve this issue?

share|improve this question
1  
When posting logs/output here, it's good to have them in English. You can (usually) do that without modifying your system by doing LANG=C fdisk -l for instance. –  Mat Oct 13 '12 at 15:09
    
Ok, I'll reboot and update try that –  authchir Oct 13 '12 at 15:10
    
@Mat Ok, I've update the commands output. LANG=c <command> is a usefull command to remember. Thanks. –  authchir Oct 13 '12 at 15:23
    
Thanks for updating your post, much appreciated. (You'll also find it's usually easier to search for issues with the English version of error messages than with the French, so yes, that's pretty handy.) –  Mat Oct 13 '12 at 15:27
add comment

1 Answer 1

up vote 4 down vote accepted

You don't seem to have a separate home partition. /dev/sda3 is an extended partition (hence the "Étendue" in fdisk -l), you will not be able to mount it and it will not contain your /home.

Unless you have a 2nd hard disk, it appears you deleted your /home partition while installing Windows. The only partitions in sda are the Windows one (sda1), what I imagine is your linux root (sda2), the extended one (sda3) and a swap partition. If you have a second hard drive please update your question.

share|improve this answer
    
Ok, you are saying that installing windows 7 on /dev/sda1 changed my /dev/sda3 partition to change from ext4 to free space disk? If so, is there a way to return this space to a ext4 partition without loosing too much data? I remember I did not checked the option to format any partition while installing windows 7. Could it be only the structure/header of ext4 that is broken? –  authchir Oct 13 '12 at 15:29
    
It shouldn't have but something seems to have gone wrong. I guess it is possible that it is just a screwed up MBR but I would recommend asking a new question as this is not going to be simple to resolve. –  terdon Oct 13 '12 at 15:33
    
Ok, so the new question should be "how to restore a extended partition to it's original ext4 format?" or something like that? –  authchir Oct 13 '12 at 15:35
    
Almost :), what you lost was a logical partition within an extended one. See here for more information. –  terdon Oct 13 '12 at 15:45
    
Ok, I've create an other question: unix.stackexchange.com/questions/50782/… –  authchir Oct 13 '12 at 19:33
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.