Find the answer to your Linux question:
Results 1 to 5 of 5
Hi All, I have searched and searched. Though this kind of problem seems quite popular, I am unable to resolve this irritating problem with my setup. Flashback: Things working on ...
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    3

    centos-windows7 dual boot - unable to recover grub - repeated attempts

    Hi All,

    I have searched and searched. Though this kind of problem seems quite popular, I am unable to resolve this irritating problem with my setup.

    Flashback:
    Things working on my dual boot machine when Windows XP crashed. So a local PC repair guys reinstalled with Windows 7 and ofcourse all Linux had to disappear.

    I knew about recovery of grub and all that, but somehow when I try to look for the correct device, etc.

    With all the experiments I happened to overwrite MBR (using testdisk, etc.) and I lost Windows 7. Multiple attempts with testdisk ensured that I couldn't recover the original MBR content. SO had to reinstall Windows7.

    Now to the present:
    Am using systemrescue disk to be writing this content right now.

    When I run grub and try to look for hd*, I get the following error:
    =================
    grub> root (hd0,
    Possible partitions are:
    Partition num: 0, Filesystem type unknown, partition type 0x7
    Partition num: 1, Filesystem type unknown, partition type 0x7
    Partition num: 4, Filesystem type unknown, partition type 0x7
    Partition num: 5, Filesystem type unknown, partition type 0x7
    Partition num: 6, Filesystem type unknown, partition type 0x8e
    ===============

    My fdisk output:
    ================
    /dev/sda1 * 1 13 102400 7 HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    /dev/sda2 13 2563 20483072 7 HPFS/NTFS
    /dev/sda3 2564 19457 135701055 f W95 Ext'd (LBA)
    /dev/sda5 2564 10849 66557263+ 7 HPFS/NTFS
    /dev/sda6 10850 15418 36700461 7 HPFS/NTFS
    /dev/sda7 15419 19457 32443236 8e Linux LVM
    ===============

    Entry point at testdisk:
    =================
    Select a media (use Arrow keys, then press Enter):
    Disk /dev/sda - 160 GB / 149 GiB - ATA ST3160215AS
    Disk /dev/mapper/VolGroup00-LogVol00 - 31 GB / 29 GiB - ST3160215AS
    Disk /dev/mapper/VolGroup00-LogVol01 - 2080 MB / 1984 MiB - ST3160215AS
    Disk /dev/sr0 - 261 MB / 249 MiB (RO) - HL-DT-ST DVD-RAM GSA-H55N
    ======================

    Why are my earlier linux partitions including swap showing up as above??

    Analyse output for LogVol00 and LogVol01:
    ==========
    Disk /dev/mapper/VolGroup00-LogVol00 - 31 GB / 29 GiB - CHS 60817408 1 1
    Partition Start End Size in sectors
    P ext3 0 60817407 60817408
    ++++++++
    Disk /dev/mapper/VolGroup00-LogVol01 - 2080 MB / 1984 MiB - CHS 4063232 1 1
    Current partition structure:
    Partition Start End Size in sectors

    P Linux SWAP 2 0 4063231 4063232
    ==========


    Analyse on Disk /dev/sda - 160 GB / 149 GiB - ATA ST3160215AS gives me:
    ===========
    Disk /dev/sda - 160 GB / 149 GiB - CHS 19457 255 63
    Current partition structure:
    Partition Start End Size in sectors

    1 * HPFS - NTFS 0 32 33 12 223 19 204800 [System Reserved]
    Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
    2 P HPFS - NTFS 12 223 20 2562 229 35 40966144
    3 E extended LBA 2563 0 1 19456 254 63 271402110
    5 L HPFS - NTFS 2563 1 1 10848 254 63 133114527
    X extended 10849 0 1 15417 254 63 73400985
    6 L HPFS - NTFS 10849 1 1 15417 254 63 73400922 [VolumeE]
    X extended 15418 0 1 19456 254 63 64886535
    7 L Linux LVM 15418 1 1 19456 254 63 64886472
    ====================

    A quick search further gives me:
    ==============
    Disk /dev/sda - 160 GB / 149 GiB - CHS 19458 255 63
    Partition Start End Size in sectors
    * Linux 0 1 1 12 254 63 208782 [/boot]
    L HPFS - NTFS 2563 1 1 10848 254 63 133114527
    L HPFS - NTFS 10849 1 1 15417 254 63 73400922 [VolumeE]
    L Linux LVM 15418 1 1 19456 254 63 64886472
    ===============

    Disk /dev/sda - 160 GB / 149 GiB - CHS 19458 255 63

    Partition Start End Size in sectors

    1 * Linux 0 1 1 12 254 63 208782 [/boot]
    2 E extended LBA 2563 0 1 19456 254 63 271402110
    5 L HPFS - NTFS 2563 1 1 10848 254 63 133114527
    6 L HPFS - NTFS 10849 1 1 15417 254 63 73400922 [VolumeE]
    7 L Linux LVM 15418 1 1 19456 254 63 64886472

    =============


    And a deeper search gives me:
    ==========
    Disk /dev/sda - 160 GB / 149 GiB - CHS 19458 255 63
    Partition Start End Size in sectors
    D Linux 0 1 1 12 254 57 208776 [/boot]
    D HPFS - NTFS 0 32 33 12 223 19 204800 [System Reserved]
    D HPFS - NTFS 12 223 20 2562 229 35 40966144
    D HPFS - NTFS 13 1 1 2562 254 63 40965687
    D HPFS - NTFS 2563 1 1 10848 254 63 133114527
    D HPFS - NTFS 10836 1 1 15404 254 63 73400922
    D HPFS - NTFS 10836 1 1 19456 254 63 138496302
    D HPFS - NTFS 10849 1 1 15417 254 63 73400922 [VolumeE]
    D Linux 15405 1 1 15417 254 57 208776 [/boot]
    D Linux LVM 15418 1 1 19456 254 63 64886472
    ==================

    Now.. thats some info.

    Can anyone help me? What am I missing here?
    Really need to get back to linux.

    Thanks in advance
    - Ben

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Hi and Welcome !

    /boot partition is missing in first output of fdisk command.
    What is current partition status of your Hard disk?
    Post the output of fdisk -l command again.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Apr 2010
    Posts
    3
    fidsk -l says:

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 13 102400 7 HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    /dev/sda2 13 2563 20483072 7 HPFS/NTFS
    /dev/sda3 2564 15418 103257787+ f W95 Ext'd (LBA)
    /dev/sda5 2564 10849 66557263+ 7 HPFS/NTFS
    /dev/sda6 10850 15418 36700461 7 HPFS/NTFS
    =============

    The first analyse on testdisk always gives me:
    Disk /dev/sda - 160 GB / 149 GiB - CHS 19458 255 63
    Partition Start End Size in sectors
    * Linux 0 1 1 12 254 63 208782 [/boot]
    L HPFS - NTFS 2563 1 1 10848 254 63 133114527
    L HPFS - NTFS 10849 1 1 15417 254 63 73400922 [VolumeE]
    L Linux LVM 15418 1 1 19456 254 63 64886472
    ===============
    A 'P' on each shows that I have the linux boot partition contents alright. The next two are my Windows D and E drives with the contents correct too.
    It never shows my my Windows C drive (even though I have done a few attempts of marking the drive, through deeper search, etc. as Primary, Logical, etc.).

    Any idea, when I do a deeper search:

    ====
    D Linux 0 1 1 12 254 57 208776 [/boot]
    D HPFS - NTFS 0 32 33 12 223 19 204800 [System Reserved]
    D HPFS - NTFS 12 223 20 2562 229 35 40966144
    D HPFS - NTFS 13 1 1 2562 254 63 40965687
    D HPFS - NTFS 2563 1 1 10848 254 63 133114527
    D HPFS - NTFS 10836 1 1 15404 254 63 73400922
    D HPFS - NTFS 10836 1 1 19456 254 63 138496302
    D HPFS - NTFS 10849 1 1 15417 254 63 73400922 [VolumeE]
    D Linux 15405 1 1 15417 254 57 208776 [/boot]
    D Linux LVM 15418 1 1 19456 254 63 64886472
    ==========

    Which should I mark as bootable/ Primary/ Logical?

    - Ben

  4. #4
    Just Joined!
    Join Date
    Apr 2010
    Posts
    3
    Btw. thanks for the welcome.
    You sure seem to have been around!

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    If you recover /boot partition, Windows 7 might not boot up. Are you ready for that?

    Is there any reason for using LVM instead of standard ext3/ext4 partitions?
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...