Yup. It looks like you have a bad superblock. First I'll tell you the cause of the problem, and then give you the solution. : )
Ok. So when Ubuntu boots, it goes through 4 stages:
When your computer goes through BIOS, it executes the firmware code, which tells the important components like the CPU, RAM, Display and others: "Hey guys! Wake up, its time to work!" So once everyone wakes up, the computer moves on to the next stage:
When you see that purple screen that says something like "GRUB", then that's GRUB, the bootloader. It lets you choose which operating system you want to boot, advanced options for them, and other things like opening a command line. Once you have chosen an OS to boot, it moves on to the next stage:
The kernel stage is probably the most important of all because that's when the system mounts the hard drive, reads the important files on it, and actually 'put together' the computer. That's where you're having your problem. The system was most likely trying to mount the hard drive when you force closed it. It stuck midway through, and even though it reset, the drive still has an error. The superblock was damaged.
Get the DVD that you installed Ubuntu from, boot into it, and choose the 'Try Ubuntu without installing' option when it shows its temporary 'bootloader'.
Once it loads, open a terminal by pressing Ctrl + Alt + T
sudo fdisk -l
That will list all disk partitions. Now, you can find the partition your broken boot is on. Usually, the partition that holds your main OS is usually the one marked as bootable. This is the output of mine, as an example:
Device Boot Start End Blocks Id System /dev/sda1 * 2048 637770013 318883983 83 Linux /dev/sda2 637771774 1953523711 657875969 5 Extended Partition 2 does not start on physical sector boundary. /dev/sda5 1945303040 1953523711 4110336 82 Linux swap / Solaris /dev/sda6 637771776 1945303039 653765632 83 Linux
The bootable partition is marked with a *. That is most likely the broken one.
Execute this command:
sudo dumpe2fs /dev/(sda the live cd is on*) | grep superblock
- if your linux is a dual-booted one, list the partition that the broken boot is on
It will list all backup superblocks to fix the broken superblock. Output:
Primary superblock at 0, Group descriptors at 1-20 Backup superblock at 32768, Group descriptors at 32769-32788 Backup superblock at 98304, Group descriptors at 98305-98324 Backup superblock at 163840, Group descriptors at 163841-163860 Backup superblock at 229376, Group descriptors at 229377-229396 Backup superblock at 294912, Group descriptors at 294913-294932 Backup superblock at 819200, Group descriptors at 819201-819220 Backup superblock at 884736, Group descriptors at 884737-884756 Backup superblock at 1605632, Group descriptors at 1605633-1605652 Backup superblock at 2654208, Group descriptors at 2654209-2654228 Backup superblock at 4096000, Group descriptors at 4096001-4096020 Backup superblock at 7962624, Group descriptors at 7962625-7962644 Backup superblock at 11239424, Group descriptors at 11239425-11239444 Backup superblock at 20480000, Group descriptors at 20480001-20480020 Backup superblock at 23887872, Group descriptors at 23887873-23887892 Backup superblock at 71663616, Group descriptors at 71663617-71663636 Backup superblock at 78675968, Group descriptors at 78675969-78675988
Use this command to choose a backup superblock to fix the broken one:
sudo fsck -b (**superblock** that you chose) /dev/(sda the live cd is on) -y
Remember, you can choose any superblock, as long as it says it's a backup one. And, by the way, the -y at the end is to answer all the
Fix? questions. Trust me. There are a lot of them.
So, once you run it, it gets really cool, or creepy, (it's cool to me XD) because it will start to imitate a TV that is on a static channel. That was really funny when i first saw it! Take a video recording and turn it into a GIF if you like. (i might attach one one time ; )
So! Enough talking while we wait! Once that's done, move on to the next step:
Mount the drive:
sudo mount /dev/(sda that cd is on) /mnt
So you can test the filesystem.
Login to root:
If you're able to do all these commands without errors, then you're all set! Restart your computer the normal way, and enjoy!
Hope this works! ; )