Home » Questions » Computers [ Ask a new question ]

grub2 error: out of disk

grub2 error: out of disk

I'm trying to make a 250G USB hard disk Ubuntu-bootable on a Compaq nc6220 laptop.

Asked by: Guest | Views: 220
Total answers/comments: 1
Guest [Entry]

"Does Grub2 drop you into a grub rescue> prompt after this error? This thread suggests that getting the rescue prompt means Grub2 can't find a usable grub.cfg file. See Grub2 Rescue Mode for a method to locate your system installation and boot it. In short, you need these commands (see the link for details):

ls (displays the partitions and devices Grub can see)
set prefix=(hdX,Y)/boot/grub

  • set root=(hdX,Y)

  • set (shows Grub's environment; inspect the prefix= listing; make sure it matches what you set in step 3)
    ls /boot/ (should show the contents of your system's /boot -- kernels, initrd images, the grub folder, etc)
    insmod (hdX,Y)/boot/grub/linux.mod
    linux /vmlinuz root=/dev/sdXY ro [**]
    initrd /initrd.img
    boot

  • replace (hdX,Y) with a value shown in the output of step 1, such as (hd0,1) or (hd3,9)
    [**] replace sdXY with the correct designation, such as sda1 or sdc9. Y is the same as in (hdX,Y) but X will be a letter instead of a number.

    If you can boot following those directions, you may be able to fix grub just by running:

    sudo grub-install
    sudo update-grub2

    An alternative is suggested in this bug report. According to that, the error is generated by this line in Grub's configuration (grub.cfg):

    if [ -n ${have_grubenv} ]; then save_env recordfail; fi

    Removing that line seems to have helped fix booting problems, but some report the error still persists. See this post for how to remove that line from the Grub menu during boot, and for how to remove it from the configuration file generation script (/etc/grub.d/10_linux).

    Unfortunately neither of these resources indicate what's causing the error."