Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: error: attempt to read or write outside of disk 'hd0'

  1. #1
    Join Date
    Oct 2009
    Beans
    165

    error: attempt to read or write outside of disk 'hd0'

    Hi,

    I have a Dell laptop model Precision M50 with dual boot XP and kubuntu. Today I decided to upgrade from 13.04 to 13.10. The upgrade went apparently fine, but at the end when I restarted the machine I got a right Grub menu, but when I hit the selection I get:

    Code:
    Loading Linux 3.11.0.-12-generic
    error: attempt to read or write outside of disk 'hd0'
    Loading initial ramdisk ...
    error: you need to load the kernel first.
    Press any key to continue...
    However, when I clicked on an older kernel it booted ok - is anything missing here?

    Thanks.

  2. #2
    Join Date
    Jan 2009
    Location
    Belgium (Ghent)
    Beans
    481
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: error: attempt to read or write outside of disk 'hd0'

    Remove the kernel version 3.11.0-12
    Install first synaptic, that easier to see al the installed packages. Look for that kernelversion. Take your time to do that. You need to look for linux-image and linux-headers.
    Do a grub update and restart.
    Than you do a update & upgrade via the update manager.

    Edit: I see now you use Kubuntu, so I don't now if synaptic is used by Kubuntu or if there is a other program for that in Kubuntu.
    Last edited by heir4c; October 19th, 2013 at 12:47 PM.
    Dutch speaking; understand English, writing is a bit difficult. Member of: http://forum.ubuntu-nl.org
    be Open be Free be Ubuntu Reg. User #485479
    Ubuntu 13.10 Saucy Salamander - Ubuntu 14.04 Trusty Tahr

  3. #3
    Join Date
    Oct 2009
    Beans
    165

    Re: error: attempt to read or write outside of disk 'hd0'

    Quote Originally Posted by heir4c View Post
    Remove the kernel version 3.11.0-12
    Install first synaptic, that easier to see al the installed packages. Look for that kernelversion. Take your time to do that. You need to look for linux-image and linux-headers.
    Do a grub update and restart.
    Than you do a update & upgrade via the update manager.

    Edit: I see now you use Kubuntu, so I don't now if synaptic is used by Kubuntu or if there is a other program for that in Kubuntu.
    prior to reading the reply I ran "update-initramfs -u -k all" and now all the past kernel versions give me the same problem, in other words I cannot boot the machine, what can I do?

    Thanks.

  4. #4
    Join Date
    Jan 2009
    Location
    Belgium (Ghent)
    Beans
    481
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: error: attempt to read or write outside of disk 'hd0'

    Can you boot in the recovery mode (modus?) ?
    Dutch speaking; understand English, writing is a bit difficult. Member of: http://forum.ubuntu-nl.org
    be Open be Free be Ubuntu Reg. User #485479
    Ubuntu 13.10 Saucy Salamander - Ubuntu 14.04 Trusty Tahr

  5. #5
    Join Date
    Oct 2009
    Beans
    165

    Re: error: attempt to read or write outside of disk 'hd0'

    Quote Originally Posted by heir4c View Post
    Can you boot in the recovery mode (modus?) ?
    Things are getting worse: No, I could not boot in recovery mode, so I used a "boot-repair" disk and clicked on "recommended repair" and after finishing I rebooted and the grub menu didn't come out, it went directly to boot XP as if there wasn't any linux installed. I repeated the same procedure again with the same result. On the other hand, this "boot-repair" disk mounts the linux disk without problem and all the files seem to be there. Furthermore, at the end I unmounted the linux system and ran 'e2fsck /dev/sdb1" and the response was that the system is clean.

  6. #6
    Join Date
    Jan 2009
    Location
    Belgium (Ghent)
    Beans
    481
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: error: attempt to read or write outside of disk 'hd0'

    I think it messed up with that commando. I never used that before so I don't now what it do. And I don't now how to solve that. Maybe with a grub renewing/install from live-dvd/usb. Or do a new install of 13.10.Boot up with a live-dvd/usb of Ubuntu 13.10. Backup your files first.
    Than do a new install of Ubuntu.
    Try it first out in the live session.
    Dutch speaking; understand English, writing is a bit difficult. Member of: http://forum.ubuntu-nl.org
    be Open be Free be Ubuntu Reg. User #485479
    Ubuntu 13.10 Saucy Salamander - Ubuntu 14.04 Trusty Tahr

  7. #7
    Join Date
    Oct 2009
    Beans
    165

    Re: error: attempt to read or write outside of disk 'hd0'

    Quote Originally Posted by heir4c View Post
    I think it messed up with that commando. I never used that before so I don't now what it do. And I don't now how to solve that. Maybe with a grub renewing/install from live-dvd/usb. Or do a new install of 13.10.Boot up with a live-dvd/usb of Ubuntu 13.10. Backup your files first.
    Than do a new install of Ubuntu.
    Try it first out in the live session.
    Using a live CD and after chroot I re-installed grub ('grub-install /dev/sdb') and then I got the list again, so I tried booting 3.11.0-12 giving me again the same problem (reading/writing outside of disk hd0), so I went back to the previous kernel and I was able to boot the machine. However is now in low-resolution and I can't figure out how to fix this. Also, using synaptic I re-installed 3.11.0-12 with all the related packages, e.g. headers, etc., but when I attempted to boot that kernel I got back the same problem. I don't care staying with the old kernel, but I have to figure out how to get the full resolution again (1600x1200), that is not appearing in the display settings GUI. I noticed that the size of the file for 3.11.0-12 is significantly bigger that all the previous kernels, I wonder if this has to do with the problem.

  8. #8
    Join Date
    Jan 2009
    Location
    Belgium (Ghent)
    Beans
    481
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: error: attempt to read or write outside of disk 'hd0'

    Can you post here a screenshot of gParted from the live-dvd/usb so we can see how your partitions are set?
    Dutch speaking; understand English, writing is a bit difficult. Member of: http://forum.ubuntu-nl.org
    be Open be Free be Ubuntu Reg. User #485479
    Ubuntu 13.10 Saucy Salamander - Ubuntu 14.04 Trusty Tahr

  9. #9
    Join Date
    Oct 2009
    Beans
    165

    Re: error: attempt to read or write outside of disk 'hd0'

    Quote Originally Posted by heir4c View Post
    Can you post here a screenshot of gParted from the live-dvd/usb so we can see how your partitions are set?
    This is the result for 'sudo fdisk -l'

    Code:
    Disk /dev/sda: 320.1 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x5f658c0d
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *          63   625137344   312568641    7  HPFS/NTFS/exFAT
    
    Disk /dev/sdb: 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: 0x0006d1ec
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1   *          63   300511889   150255913+  83  Linux
    /dev/sdb2       300511951   312576704     6032377    5  Extended
    /dev/sdb5       300511953   312576704     6032376   82  Linux swap / Solaris
    Ubuntu is on sdb, XP on sda

  10. #10
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,999
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: error: attempt to read or write outside of disk 'hd0'

    hd0 is the equivalent of /dev/sda, but your Linux installation is on /dev/sdb which grub calls hd1.

    Do you still get the menu of kernel choices if you boot from the hard drive? If so, you can try editing the commands to boot by going to Advanced, selecting the entry for the new kernel with the cursor, and hitting "e" to edit. Try replacing the entry for "hd0" in the "set root=" line with "hd1" and continuing the boot with F10. If that works, you can make the change permanent like this.

    Reboot and follow the same approach above but choose the "recovery mode" kernel instead. Choose "root shell" from the options when they are presented to you. Next run "mount -o remount,rw /" to make the filesystem writable. Now go to /boot/grub and run "chmod u+rw grub.cfg" so you can edit the file. Replace the "hd0" with "hd1" in the "set root=" line and save the file. Then use "chmod u-w grub.cfg" to make it read-only again. Now try rebooting and see if it uses the right hard drive.
    Last edited by SeijiSensei; October 21st, 2013 at 01:58 AM.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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