PDA

View Full Version : [SOLVED] Cannot boot after some partition alterations..



maja_z
October 16th, 2010, 03:38 AM
I'm posting this as a new thread, but the troubles really started here http://ubuntuforums.org/showthread.php?t=1592456.. (http://ubuntuforums.org/showthread.php?t=1592456)

Basically after using testdisk to fix my partitions and some creative rewriting of fstab, I now cannot boot : I get the error "Mount of root filesystem failed. A maintenance shell will now be started." and a prompt
Here's what fdisk says:


ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sda1 * 5222 8486 26214400 83 Linux
/dev/sda2 8486 21540 104857600 7 HPFS/NTFS
/dev/sda3 21540 77826 452113408 7 HPFS/NTFS
ubuntu@ubuntu:~$
And here's my fstab:

# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda1 :
UUID=b5f8506a-2a23-48c8-987e-086385d48f2b / ext4 errors=remount-ro 0 1
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

/dev/sda1 / ext4 defaults,locale=en_US.UTF-8 0 0
/dev/sda2 /media/d ntfs-3g defaults,locale=en_US.UTF-8 0 0
/dev/sda3 /media/e ntfs-3g defaults,locale=en_US.UTF-8 0 0

/mnt/4096Mb.swap none swap sw 0 0(After testdisk the system booted fine, but the second two partitions did not mount automatically. Hence the meddling with fstab. If it is relevant at all, the system used to be on sda2, because Win7 was on sda1, but that space is currently unallocated).

I tried running fsck at the prompt and in like 0.2 seconds it just says /dev/sda1 clean xxx/xxxy files...

So I tried fsck -f and it goes from 1. to 5. but also only takes about 4 seconds, and finishes with the line
/dev/sda1 xxx/xxxy files...

I'm in a live cd now (having rebooted about 20 times now...) Please help!
m.

drs305
October 16th, 2010, 03:45 AM
# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
# Entry for /dev/sda1 :
UUID=b5f8506a-2a23-48c8-987e-086385d48f2b / ext4 errors=remount-ro 0 1
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

/dev/sda1 / ext4 defaults,locale=en_US.UTF-8 0 0
/dev/sda2 /media/d ntfs-3g defaults,locale=en_US.UTF-8 0 0
/dev/sda3 /media/e ntfs-3g defaults,locale=en_US.UTF-8 0 0

/mnt/4096Mb.swap none swap sw 0 0


You have two entries for /. Eliminate one by making it a comment (#). They may be pointing to the same place, but you still don't want 2 of them.

Also, at the Grub menu, try editing the highlighted Grub entry by pressing "e".

Remove the entire "search" line, and in the "linux" line change the "root=UUID=<uuid>" part to "root=/dev/sda1".

Then press CTRL-x and see if it boots. If it does, run "sudo update-grub". If it doesn't, run the boot info script from the LiveCD desktop and post the results:
http://bootinfoscript.sourceforge.net/

maja_z
October 16th, 2010, 04:04 AM
Man I feel like a right dunce. Of course there were two entries! Commented out the second one and its all good!
Thank you so much drs305 for that quick save!