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.

First of all let me apologise for the extension of my post.

After a successful removal of Windows XP on my dualboot with Xubuntu 12.10, I tried to resize and move the /, /home partitions to use the leftover unallocated space left.

The problem is that I've made some stupid mistakes. First stupid mistake I've made was not to click on swap right click swap off so I wouldn't work with mounted partitions. Second, and even worst stupid mistake I've made was not to do a full backup before hand of all important data.

So now I'm stuck at a black screen with error: unknown file system grub rescue

Boot Info Script 5a35e00 + Boot-Repair extra info      [Boot-Info 22Jan2013]


============================= Boot Info Summary: ===============================

 => Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    in partition 1 for (,msdos2)/boot/grub.

sda2: __________________________________________________________________________

    File system:       
    Boot sector type:  -
    Boot sector info: 
    Mounting failed:   mount: unknown filesystem type ''

sda3: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  
    Boot files:        

sda4: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda2               2,048   181,475,797   181,473,750  83 Linux
/dev/sda3    *    181,477,376   230,219,775    48,742,400  83 Linux
/dev/sda4         230,219,776   234,440,703     4,220,928  82 Linux swap / Solaris


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/loop0                                              squashfs   
/dev/sda3        0060b00f-e13f-41c0-8058-00c6eff68771   ext4       
/dev/sda4        2cbcbc03-b2c8-429b-9179-673ee534ca89   swap       
/dev/sr0                                                iso9660    Xubuntu 12.10 i386

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/loop0       /rofs                    squashfs   (ro,noatime)
/dev/sda3        /media/xubuntu/0060b00f-e13f-41c0-8058-00c6eff68771 ext4       (rw,nosuid,nodev,uhelper=udisks2)
/dev/sr0         /cdrom                   iso9660    (ro,noatime)


=============================== StdErr Messages: ===============================

cat: write error: Broken pipe
File descriptor 8 (/proc/7921/mounts) leaked on lvscan invocation. Parent PID 12839: bash
  No volume groups found

ADDITIONAL INFORMATION :
=================== log of boot-repair 2013-01-25__00h06 ===================
boot-repair version : 3.197~ppa27~quantal
boot-sav version : 3.197~ppa27~quantal
glade2script version : 3.2.2~ppa45~quantal
boot-sav-extra version : 3.197~ppa27~quantal
boot-repair is executed in live-session (Ubuntu 12.10, quantal, Ubuntu, i686)
CPU op-mode(s):        32-bit, 64-bit
file=/cdrom/preseed/xubuntu.seed boot=casper initrd=/casper/initrd.lz quiet splash -- maybe-ubiquity

=================== os-prober:


=================== blkid:
/dev/loop0: TYPE="squashfs"
/dev/sda3: UUID="0060b00f-e13f-41c0-8058-00c6eff68771" TYPE="ext4"
/dev/sda4: UUID="2cbcbc03-b2c8-429b-9179-673ee534ca89" TYPE="swap"
/dev/sr0: LABEL="Xubuntu 12.10 i386" TYPE="iso9660"

=================== UEFI/Legacy mode:
This live-session is not EFI-compatible.
SecureBoot maybe enabled.


=================== PARTITIONS & DISKS:
sda3    : sda,    maybesepboot,    no-grubenv    nogrub,    no-docgrub,    no-update-grub,    32,    no-boot,    no-os,    not--efi--part,    part-has-no-fstab,    part-has-no-fstab,    no-nt,    no-winload,    no-recov-nor-hid,    no-bmgr,    notwinboot,    nopakmgr,    nogrubinstall,    no---usr,    part-has-no-fstab,    not-sep-usr,    standard,    farbios,    /media/xubuntu/0060b00f-e13f-41c0-8058-00c6eff68771.

sda    : not-GPT,    BIOSboot-not-needed,    has-no-EFIpart,     not-usb,    no-os,    2048 sectors * 512 bytes


=================== parted -l:

Model: ATA Hitachi HTS54161 (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
2      1049kB  92.9GB  92.9GB  primary
3      92.9GB  118GB   25.0GB  primary  ext4
4      118GB   120GB   2161MB  primary  linux-swap(v1)




Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.


Error: Can't have a partition outside the disk!

=================== parted -lm:

BYT;
/dev/sda:120GB:scsi:512:512:msdos:ATA Hitachi HTS54161;
2:1049kB:92.9GB:92.9GB:::;
3:92.9GB:118GB:25.0GB:ext4::;
4:118GB:120GB:2161MB:linux-swap(v1)::;



Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.


Error: Can't have a partition outside the disk!


=================== mount:
/cow on / type overlayfs (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
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)
/dev/sr0 on /cdrom type iso9660 (ro,noatime)
/dev/loop0 on /rofs type squashfs (ro,noatime)
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)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
gvfsd-fuse on /run/user/xubuntu/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=xubuntu)
/dev/sda3 on /media/xubuntu/0060b00f-e13f-41c0-8058-00c6eff68771 type ext4 (rw,nosuid,nodev,uhelper=udisks2)


=================== ls:
/sys/block/sda (filtered):  alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro sda2 sda3 sda4 size slaves stat subsystem trace uevent
/sys/block/sr0 (filtered):  alignment_offset bdi capability dev device discard_alignment events events_async events_poll_msecs ext_range holders inflight power queue range removable ro size slaves stat subsystem trace uevent
/dev (filtered):  alarm ashmem autofs binder block bsg btrfs-control bus cdrom cdrw char console core cpu cpu_dma_latency disk dri dvd dvdrw ecryptfs fb0 fd full fuse fw0 hpet input kmsg kvm log lp0 mapper mcelog mem net network_latency network_throughput null oldmem parport0 port ppp psaux ptmx pts random rfkill rtc rtc0 sda sda2 sda3 sda4 sg0 sg1 shm snapshot snd sr0 stderr stdin stdout uinput urandom vga_arbiter vhost-net zero
ls /dev/mapper:  control

=================== df -Th:

Filesystem     Type       Size  Used Avail Use% Mounted on
/cow           overlayfs  1.5G  189M  1.3G  13% /
udev           devtmpfs   1.5G   12K  1.5G   1% /dev
tmpfs          tmpfs      606M  800K  606M   1% /run
/dev/sr0       iso9660    694M  694M     0 100% /cdrom
/dev/loop0     squashfs   665M  665M     0 100% /rofs
tmpfs          tmpfs      1.5G   20K  1.5G   1% /tmp
none           tmpfs      5.0M  4.0K  5.0M   1% /run/lock
none           tmpfs      1.5G   88K  1.5G   1% /run/shm
none           tmpfs      100M   16K  100M   1% /run/user
/dev/sda3      ext4        23G  694M   22G   4% /media/xubuntu/0060b00f-e13f-41c0-8058-00c6eff68771

=================== fdisk -l:

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 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: 0xd5d0f855

Device Boot      Start         End      Blocks   Id  System
/dev/sda2            2048   181475797    90736875   83  Linux
/dev/sda3       181477376   230219775    24371200   83  Linux
/dev/sda4       230219776   234440703     2110464   82  Linux swap / Solaris


No OS has been found on this computer.

=================== Recommended repair
Recommended-Repair
This setting will not act on the MBR.
The boot flag will be placed on sda3.


parted /dev/sda set 3 boot on


Information: You may need to update /etc/fstab.


Boot successfully repaired.

You can now reboot your computer.

After googling I came up with some solutions that didn't work for me, like runnig the command:

sudo e2fsck -f -y -v /dev/sda2
e2fsck 1.42.5 (29-Jul-2012)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sda2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

I tried the following:

sudo mke2fs -n /dev/sda2

And the output is:

mke2fs 1.42.5 (29-Jul-2012)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
5677056 inodes, 22684218 blocks
1134210 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
693 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000

So I tried to restore the superblock from the backups, and use:

sudo e2fsck -b backup_number /dev/sda2

But nothing, using all the backup numbers, I always get:

e2fsck 1.42.5 (29-Jul-2012)
e2fsck: Bad magic number in super-block while trying to open /dev/sda2

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

Another thing that might cast a light on the issue, the output of

cat /etc/fstab

is the following:

overlayfs / overlayfs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
/dev/sda4 swap swap defaults 0 0

And the output of

df -h

is:

Filesystem      Size  Used Avail Use% Mounted on
/cow            1.5G   87M  1.4G   6% /
udev            1.5G  4.0K  1.5G   1% /dev
tmpfs           606M  800K  606M   1% /run
/dev/sr0        694M  694M     0 100% /cdrom
/dev/loop0      665M  665M     0 100% /rofs
tmpfs           1.5G   16K  1.5G   1% /tmp
none            5.0M  4.0K  5.0M   1% /run/lock
none            1.5G   88K  1.5G   1% /run/shm
none            100M   12K  100M   1% /run/user

And the output of

ls -l /dev/ | grep sd

is:

brw-rw----  1 root    disk      8,   0 Jan 25 08:45 sda
brw-rw----  1 root    disk      8,   2 Jan 25 09:21 sda2
brw-rw----  1 root    disk      8,   3 Jan 25 08:45 sda3
brw-rw----  1 root    disk      8,   4 Jan 25 08:45 sda4

And of

sudo mount -t ext4 /dev/sda2 /mnt

is

mount: wrong fs type, bad option, bad superblock on /dev/sda2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

So I tried

dmesg | tail

and get this:

[   99.193167] iwl3945 0000:05:00.0: >loaded firmware version 15.32.2.9
[   99.262755] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   99.263044] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  102.005042] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[  102.005304] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  698.685105] cfg80211: Found new beacon on frequency: 2467 MHz (Ch 12) on phy0
[ 2469.909127] CE: hpet increased min_delta_ns to 20113 nsec
[ 2469.909743] CE: hpet increased min_delta_ns to 30169 nsec
[ 2469.910446] CE: hpet increased min_delta_ns to 45253 nsec
[ 2659.480451] EXT4-fs (sda2): VFS: Can't find ext4 filesystem

And finally

sudo parted -l

and get:

Model: ATA Hitachi HTS54161 (scsi)
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 2      1049kB  92.9GB  92.9GB  primary
 3      92.9GB  118GB   25.0GB  primary  ext4            boot
 4      118GB   120GB   2161MB  primary  linux-swap(v1)

Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.
Error: Can't have a partition outside the disk!

Can someone help me, please.

share|improve this question
    
First of all let me apologise for the extension of my post. Denied. Um, now what? Awkward. –  Non-Stop Time Travel Jan 25 '13 at 12:43
    
@satuon Why is it offtopic? –  Korrigan Nagirrok Jan 25 '13 at 12:54
    
Questions on Stack Overflow are expected to relate to programming or software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. –  sashoalm Jan 25 '13 at 12:55
    
possible duplicate of error: unknown file system grub rescue –  Eric Carvalho Jan 26 '13 at 15:54
    
Is this still a problem for you? I was wondering whether the partition was ext2 or ext4. It seems you tried to repair it with fsck as an ext2 but when you tried to mount it, you did it as ext4. –  Nil Apr 29 '13 at 18:22
add comment

migrated from stackoverflow.com Jan 25 '13 at 15:43

This question came from our site for professional and enthusiast programmers.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.