Welcome to the Linux Foundation Forum!

Grub Loading

jojocompasjojocompas Posts: 26

I'm using Ubuntu 9.04, it was working fine until today when I tried to login & as it seems like the system was hanged, I pressed reset & on reboot I have Grub Loading stage 1.5. Error 17

Any suggestion please let me know?

Comments

  • FBulovicFBulovic Posts: 5
    Boot from live CD, check

    https://answers.launchpad.net/ubuntu/+source/grub/+question/66606
    http://ubuntuforums.org/showthread.php?t=981371

    check cat /boot/grub/menu.lst and sudo fdisk -lu (or cat /proc/partitions) let us know what is outcome.

    Check BIOS settings, hardware problems ...
  • for my the bast option si reinstall grub. And alone one is configure

    "sudo aptitude install grub"
  • jojocompasjojocompas Posts: 26
    this is the outcome of the previous command

    [email protected]:~$ cat /boot/grub/menu.lst
    cat: /boot/grub/menu.lst: No such file or directory
    [email protected]:~$ cat /proc/partitions
    major minor #blocks name

    8 0 199148544 sda
    8 1 99860008 sda1
    8 2 1 sda2
    8 5 99281668 sda5
    8 16 199148544 sdb
    8 17 192306051 sdb1
    8 18 1 sdb2
    8 21 6835626 sdb5
    7 0 657224 loop0
    [email protected]:~$ sudo fdisk -lu

    Disk /dev/sda: 203.9 GB, 203928109056 bytes
    255 heads, 63 sectors/track, 24792 cylinders, total 398297088 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x914e914e

    Device Boot Start End Blocks Id System
    /dev/sda1 * 63 199720079 99860008+ 7 HPFS/NTFS
    /dev/sda2 199720080 398283479 99281700 f W95 Ext'd (LBA)
    /dev/sda5 199720143 398283479 99281668+ 7 HPFS/NTFS

    Disk /dev/sdb: 203.9 GB, 203928109056 bytes
    255 heads, 63 sectors/track, 24792 cylinders, total 398297088 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0xb376b6ac

    Device Boot Start End Blocks Id System
    /dev/sdb1 63 384612164 192306051 83 Linux
    /dev/sdb2 384612165 398283479 6835657+ 5 Extended
    /dev/sdb5 384612228 398283479 6835626 82 Linux swap / Solaris
    [email protected]:~$
  • mfillpotmfillpot Posts: 2,180
    It appears that you are running the commands from the live CD, by doing that you cannot confirm the menu.lst or fstab files because they are located on the installed disk not the ram disk that the Live CD is using.

    First mount your root partition onto a new directory in the Live CD root, (ie.. sudo mkdir /mnt/tmp;sudo mount /dev/sdb1 /mnt/tmp}, once that is done you can cat /mnt/tmp/boot/grub/menu.lst and cat /mnt/tmp/etc/fstab to see the proper output.

    The issue is either with your boot paramaters in manu.lst or the partition table in fstab.

    Please post the results from your physical partition here for review.
  • jojocompasjojocompas Posts: 26
    results from the previous command
    sudo mkdir /mnt/tmp
    [email protected]:~$ sudo mount /dev/sdb1 /mnt/tmp
    mount: you must specify the filesystem type
    [email protected]:~$
  • jojocompasjojocompas Posts: 26
    [email protected]:~$ sudo mount -t ext3 /dev/sdb1 /mnt/tmp
    mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so

    [email protected]:~$ sudo mount -t ext2 /dev/sdb1 /mnt/tmp
    mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail or so

    [email protected]:~$ dmesg | tail
    [ 183.196042] Bluetooth: RFCOMM TTY layer initialized
    [ 183.196047] Bluetooth: RFCOMM ver 1.8
    [ 187.835817] NET: Registered protocol family 17
    [ 192.634378] NET: Registered protocol family 10
    [ 192.635043] lo: Disabled Privacy Extensions
    [ 202.738418] eth0: no IPv6 routers present
    [ 590.012401] end_request: I/O error, dev fd0, sector 0
    [ 4105.607060] end_request: I/O error, dev fd0, sector 0
    [ 9571.464844] VFS: Can't find ext3 filesystem on dev sdb1.
    [ 9595.893362] VFS: Can't find an ext2 filesystem on dev sdb1.
    [email protected]:~$ sudo mount -t Linux /dev/sdb1 /mnt/tmp
    mount: unknown filesystem type 'Linux'
    [email protected]:~$
  • mfillpotmfillpot Posts: 2,180
    Well it looks like mount and you both can't figure out the FS type used in sdb1 (the partition I am assuming is your root partition).

    You can use any of the following commands to figure out the FS:types on your system.
    [ol][li]sudo file -s /dev/sdb*[/li]
    [li]sudo parted /dev/sdb print[/li][/ol]
  • jojocompasjojocompas Posts: 26
    here's what I have
    [email protected]:~$ sudo file -s /dev/sdb*
    /dev/sdb: x86 boot sector, Microsoft Windows XP MBR, Serial 0xb376b6ac; partition 2: ID=0x5, starthead 254, startsector 384612165, 13671315 sectors, extended partition table
    /dev/sdb1: data
    /dev/sdb2: x86 boot sector, extended partition table (last)\011
    /dev/sdb5: Linux/i386 swap file (new style) 1 (4K pages) size 1708905 pages
    [email protected]:~$ sudo parted /dev/sdb print

    Disk /dev/sdb: 204GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number Start End Size Type File system Flags
    1 32.3kB 197GB 197GB primary
    2 197GB 204GB 7000MB extended
    5 197GB 204GB 7000MB logical linux-swap

    Information: Don't forget to update /etc/fstab, if necessary.

    [email protected]:~$
  • FBulovicFBulovic Posts: 5
    If you can mount offending partition from live CD (Places -> xyz GB Media) then commands are:

    cat /media/disk/etc/fstab
    cat /media/disk/boot/grub/menu.lst

    Looking at file output it is not likely that you will manage to do that.
    BTW file output should contain some ext3 sections as well

    /dev/sdb5: Linux rev 1.0 ext3 filesystem data, UUID=ed2467b9-9778-41ae-8d72-24fd421a4348 (large files)
    /dev/sdb6: Linux/i386 swap file (new style), version 1 (4K pages), size 1486003 pages, no label, UUID=1ceb41fc-9133-4fe8-9776-74a02072b63

    Any recent hardware chages or win32 disk optimization operations?
  • jojocompasjojocompas Posts: 26
    mount won't work because filesystem can't be detected. When Ubuntu was working fine I believe the filesystem was ext3 but now I see it's either unknown or linux-swap or blank which doesn't help the cause too much. Until mount works, can' t execute any of those command to see what's in menu.lst.
    At this point I'm puzzled & desperate, don't know what to do?
    I'm open to any suggestion that will work.
  • skanaksaskanaksa Posts: 7
    From my point of view you have to check:
    1) MBR is well formed.
    2) FILESYSTEM data structures have some errors (superblock).

    If the system recognizes the Filesystem entry then the MBR should be correct (consider this assertion 80% true).

    To check the filesystem data structures try the command fsck (see here http://linux.die.net/man/8/fsck).

    If fsck fails to recognize the filesystem maybe data structures managed by kernel drivers are corrupted!!!
    Superblock is the most important data structure to check.
    Read also this: http://www.cyberciti.biz/tips/understanding-unixlinux-filesystem-superblock.html

    At this point the situation became very hard to solve.
  • jojocompasjojocompas Posts: 26
    [email protected]:/home/ubuntu# sfdisk -l /dev/sdb

    Disk /dev/sdb: 24792 cylinders, 255 heads, 63 sectors/track
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

    Device Boot Start End #cyls #blocks Id System
    /dev/sdb1 0+ 23940 23941- 192306051 83 Linux
    /dev/sdb2 23941 24791 851 6835657+ 5 Extended
    /dev/sdb3 0 - 0 0 0 Empty
    /dev/sdb4 0 - 0 0 0 Empty
    /dev/sdb5 23941+ 24791 851- 6835626 82 Linux swap / Solaris

    Can I have more info on the MBR
  • jojocompasjojocompas Posts: 26
    [email protected]:/home/ubuntu# dumpe2fs /dev/sdb1 | grep -i superblock
    dumpe2fs 1.40.2 (12-Jul-2007)
    dumpe2fs: Bad magic number in super-block while trying to open /dev/sdb1
    Couldn't find valid filesystem superblock.
    [email protected]:/home/ubuntu# dumpe2fs /dev/sdb2 | grep -i superblock
    dumpe2fs 1.40.2 (12-Jul-2007)
  • jojocompasjojocompas Posts: 26
    [email protected]:/home/ubuntu# dd if=/dev/sdb count=1 | hexdump -C
    1+0 records in
    1+0 records out
    512 bytes (512 B) copied, 6.7998e-05 seconds, 7.5 MB/s
    00000000 33 c0 8e d0 bc 00 7c fb 50 07 50 1f fc be 1b 7c |3.....|.P.P....||
    00000010 bf 1b 06 50 57 b9 e5 01 f3 a4 cb bd be 07 b1 04 |...PW...........|
    00000020 38 6e 00 7c 09 75 13 83 c5 10 e2 f4 cd 18 8b f5 |8n.|.u..........|
    00000030 83 c6 10 49 74 19 38 2c 74 f6 a0 b5 07 b4 07 8b |...It.8,t.......|
    00000040 f0 ac 3c 00 74 fc bb 07 00 b4 0e cd 10 eb f2 88 |..<.t...........|
    00000050 4e 10 e8 46 00 73 2a fe 46 10 80 7e 04 0b 74 0b |N..F.s*.F..~..t.|
    00000060 80 7e 04 0c 74 05 a0 b6 07 75 d2 80 46 02 06 83 |.~..t....u..F...|
    00000070 46 08 06 83 56 0a 00 e8 21 00 73 05 a0 b6 07 eb |F...V...!.s.....|
    00000080 bc 81 3e fe 7d 55 aa 74 0b 80 7e 10 00 74 c8 a0 |..>.}U.t..~..t..|
    00000090 b7 07 eb a9 8b fc 1e 57 8b f5 cb bf 05 00 8a 56 |.......W.......V|
    000000a0 00 b4 08 cd 13 72 23 8a c1 24 3f 98 8a de 8a fc |.....r#..$?.....|
    000000b0 43 f7 e3 8b d1 86 d6 b1 06 d2 ee 42 f7 e2 39 56 |C..........B..9V|
    000000c0 0a 77 23 72 05 39 46 08 73 1c b8 01 02 bb 00 7c |.w#r.9F.s......||
    000000d0 8b 4e 02 8b 56 00 cd 13 73 51 4f 74 4e 32 e4 8a |.N..V...sQOtN2..|
    000000e0 56 00 cd 13 eb e4 8a 56 00 60 bb aa 55 b4 41 cd |V......V.`..U.A.|
    000000f0 13 72 36 81 fb 55 aa 75 30 f6 c1 01 74 2b 61 60 |.r6..U.u0...t+a`|
    00000100 6a 00 6a 00 ff 76 0a ff 76 08 6a 00 68 00 7c 6a |j.j..v..v.j.h.|j|
    00000110 01 6a 10 b4 42 8b f4 cd 13 61 61 73 0e 4f 74 0b |.j..B....aas.Ot.|
    00000120 32 e4 8a 56 00 cd 13 eb d6 61 f9 c3 49 6e 76 61 |2..V.....a..Inva|
    00000130 6c 69 64 20 70 61 72 74 69 74 69 6f 6e 20 74 61 |lid partition ta|
    00000140 62 6c 65 00 45 72 72 6f 72 20 6c 6f 61 64 69 6e |ble.Error loadin|
    00000150 67 20 6f 70 65 72 61 74 69 6e 67 20 73 79 73 74 |g operating syst|
    00000160 65 6d 00 4d 69 73 73 69 6e 67 20 6f 70 65 72 61 |em.Missing opera|
    00000170 74 69 6e 67 20 73 79 73 74 65 6d 00 00 00 00 00 |ting system.....|
    00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    *
    000001b0 00 00 00 00 00 2c 44 63 ac b6 76 b3 00 00 00 01 |.....,Dc..v.....|
    000001c0 01 00 83 fe ff ff 3f 00 00 00 06 b7 ec 16 00 fe |......?.........|
    000001d0 ff ff 05 fe ff ff 45 b7 ec 16 93 9b d0 00 00 00 |......E.........|
    000001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
    00000200

    Please give me your suggestion!
    Thanks
  • jojocompasjojocompas Posts: 26
    Nothing can access my file system, gparted included and all of these previous steps I just did.
    Just to let you all know it all happened after I did an update on july 21st, then I logged out, 2 days after I came to log on and then this.
    I happen to know this after I booted with Ubuntu 9.04 live cd and then it detected that something went wrong after the last update and wanted me to report it in order to fix the bug.
    Now I believe I gonna have to re-install and lose all my files.
    c'est la vie
Sign In or Register to comment.