partitioning - "A disk read error occurred" after choosing to boot into Windows XP from GRUB

06
2014-04
  • kellogs

    "A disk read error occurred" appears on screen after choosing to boot into Windows XP from GRUB.

    [root@localhost linux]# fdisk -lu
    
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0x48424841
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1              63   204214271   102107104+   7  HPFS/NTFS
    Partition 1 does not end on cylinder boundary.
    /dev/sda2       204214272   255606783    25696256   af  HFS / HFS+
    Partition 2 does not end on cylinder boundary.
    /dev/sda3       255606784   276488191    10440704    c  W95 FAT32 (LBA)
    Partition 3 does not end on cylinder boundary.
    /dev/sda4       276490179   312576704    18043263    5  Extended
    /dev/sda5   *   276490240   286709759     5109760   83  Linux
    /dev/sda6       286712118   310488254    11888068+   b  W95 FAT32
    /dev/sda7       310488318   312576704     1044193+  82  Linux swap / Solaris
    

    Here, sda is a 160GB hard disk with quite a few partitions and 3 OSes installed. I am able to boot into Linux and Mac OS fine, but not into Windows anymore. The Windows system is located on /dev/sda1.

    I cannot recall how exactly have I used testdisk but it once said:

    Disk /dev/sda - 160 GB / 149 GiB - CHS 19458 255 63 
    The harddisk (160 GB / 149 GiB) seems too small! (< 169 GB / 157 GiB)  
    Check the harddisk size: HD jumper settings, BIOS detection...
    

    So far I have tried to "fixboot" and "chkdsk" from a recovery console on the affected windows partition (/dev/sda1), the plug off power cord for 15 seconds trick, reinstalling GRUB, repairing the MFT and boot sector of the affected partition via testdisk, what next please?

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    linux - GRUB boot menu disapeared after NTFS partition deleted?
  • MA1

    I have a dual boot system with Windows XP and Fedora12.

    Following is the partition structure of my harddisk.

    Disk /dev/sda: 80.1 GB, 80060424192 bytes
    255 heads, 63 sectors/track, 9733 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x5e5e5e5e
    
     Device    Boot      Start       End      Blocks    Id  System
    /dev/sda1               1        1912    15358108+   7  HPFS/NTFS
    /dev/sda2            1913        9733    62822182+   f  W95 Ext'd (LBA)
    /dev/sda5            1913        3824    15358108+   7  HPFS/NTFS
    /dev/sda6            3825        6374    20482843+   7  HPFS/NTFS
    /dev/sda7            6375        7941    12586896    7  HPFS/NTFS
    /dev/sda8            7942        8018      618471    7  HPFS/NTFS
    /dev/sda9            8019        8203     1485950    7  HPFS/NTFS
    /dev/sda10  *        8204        8229      204799+  83  Linux
    /dev/sda11           8229        9733    12084924   8e  Linux LVM
    

    I deleted the "/dev/sda8" through Windows Disk Management, and when i restarted the system. GRUB boot menu vanished and a GRUB console appeared.

    Then I booted my system using Fedora12 live USB and created a new partition at same place from where i deleted it, and then after restart my started working normally as it was before partition deletion.

    But, I don't understand what actually happened.

    Can anyone tell me in detail what happened and why and what to do to avoid such things in future?


  • Related Answers
  • quack quixote

    My guess is that Grub couldn't find it's configuration.

    It looks like /dev/sda10 is your boot partition, which is where Grub's configuration and second-stage bootloader lives. The partition you deleted came before this.

    Here's the way your disk looks to Grub, before and after the partition deletion:

    Device       Grub before[*]  Grub after
    ======       ===========     ==========
    /dev/sda1     (hd0,0)         (hd0,0)
    /dev/sda2     (hd0,1)         (hd0,1)
    /dev/sda5     (hd0,2)         (hd0,2)
    /dev/sda6     (hd0,3)         (hd0,3)
    /dev/sda7     (hd0,4)         (hd0,4)
    /dev/sda8     (hd0,5)           --
    /dev/sda9     (hd0,6)         (hd0,5)
    /dev/sda10    (hd0,7)         (hd0,6)
    /dev/sda11    (hd0,8)         (hd0,7)
    
    [*] Grub1-style enumeration; Grub2 starts counting at 1, so 
        /dev/sda1 would be (hd0,1).
    

    See that? Grub expected to find its configuration on (hd0,7) but it's now on (hd0,6). This explains why it broke, and also why it was fixed when you created a new partition in that space.

    You should have deleted the partition while booted into Linux. You might've only needed to update the entries in Grub's configuration file, but you could have made those changes before rebooting and avoided the trouble. You might also need to rerun grub-install.

    (On Debian/Ubuntu, these are /boot/grub/menu.lst for Grub1 or /boot/grub/grub.cfg for Grub2, although you'd probably just run update-grub to do it automatically. According to Distrowatch, Fedora 12 defaults to using Grub v0.97, ie Grub1, but I'm not sure where Fedora's Grub configuration lives.)