Skip to main content

Thread: Boot drops to GRUB Rescue Prompt


i have ubuntu server set grub2 installed bootloader.

first hard drive contains 2 partitions, 1 of os , other data. os partition beginning fill , 2nd partition had spare, used gparted live cd extend os partition data partition.


however, due way arranged partitions @ install, there swap partition between 2, necessary remove in order adjust sizes before remaking swap partition. has caused numbers in boot details change , on boot, system drops grub rescue prompt.

using following quote from: http://ubuntuforums.org/showthread.php?t=1195275
quote posted drs305
booting rescue mode
@ grub rescue> prompt, accomplish following actions attempt boot latest kernel:
  • ls display known devices , partitions. information, user must determine device , partition on system installed.
  • search -f /vmlinuz should find linux kernels located in partitions located "ls".
  • set check current settings. note prefix listing. if not pointing correct location:
    • set prefix=(hdx,y)/boot/grub examples: sda1 (hd0,1), sdb5 (hd1,5)

  • set root=(hdx,y) x device/drive, starting 0. y partition, starting 1. (example: (hd0,1) sda1. (hd3,5) sdc5.
    • for wubi installs, use: set root=(loop0)

  • ls /boot inspect contents. user should see varioius kernels, initrd images , grub folder. if not, use ls command inspect device , attempt find these files , folders. if necessary, set device root.
  • insmod /boot/grub/linux.mod load linux module. without module loaded, user receive "unknown command linux" message when trying load kernel.
  • linux /vmlinuz root=/dev/sdxy ro load linux kernel, substituting correct designations "x" , "y" (example: sda1). user see message showing kernel has been loaded. (see graphic above)
    • note: wubi installs within windows, use code: linux /vmlinuz root=/dev/sdxy loop=/ubuntu/disks/root.disk ro

  • initrd /initrd.img load initrd image. when pressing enter, user may or may not see message in terminal. (see highlighted graphic above)
  • boot

more command line recovery options available in "command line & rescue mode" section of ubuntu grub 2 community doc.
i have managed reboot system os.

@ command set @ grub rescue prompt, believes root (hd0,6) when should (hd0,5). after managing boot using information above, ran update-grub , completed successfully, creating grub.cfg file

code:
# # not edit file # # automatically generated /usr/sbin/grub-mkconfig using templates # /etc/grub.d , settings /etc/default/grub #  ### begin /etc/grub.d/00_header ### if [ -s /boot/grub/grubenv ];   have_grubenv=true   load_env fi set default="0" if [ ${prev_saved_entry} ];   saved_entry=${prev_saved_entry}   save_env saved_entry   prev_saved_entry=   save_env prev_saved_entry fi insmod ext2 set root=(hd0,5) search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad if loadfont /usr/share/grub/unicode.pf2 ;   set gfxmode=640x480   insmod gfxterm   insmod vbe   if terminal_output gfxterm ; true ; else     # backward compatibility versions of terminal.mod don't     # understand terminal_output     terminal gfxterm   fi fi if [ ${recordfail} = 1 ];   set timeout=-1 else   set timeout=3 fi ### end /etc/grub.d/00_header ###  ### begin /etc/grub.d/05_debian_theme ### set menu_color_normal=white/black set menu_color_highlight=black/white ### end /etc/grub.d/05_debian_theme ###  ### begin /etc/grub.d/10_linux ### menuentry "ubuntu, linux 2.6.31-22-server" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     set quiet=1     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-22-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro   quiet splash     initrd    /boot/initrd.img-2.6.31-22-server } menuentry "ubuntu, linux 2.6.31-22-server (recovery mode)" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-22-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro single      initrd    /boot/initrd.img-2.6.31-22-server } menuentry "ubuntu, linux 2.6.31-20-server" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     set quiet=1     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-20-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro   quiet splash     initrd    /boot/initrd.img-2.6.31-20-server } menuentry "ubuntu, linux 2.6.31-20-server (recovery mode)" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-20-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro single      initrd    /boot/initrd.img-2.6.31-20-server } menuentry "ubuntu, linux 2.6.31-19-server" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     set quiet=1     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-19-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro   quiet splash     initrd    /boot/initrd.img-2.6.31-19-server } menuentry "ubuntu, linux 2.6.31-19-server (recovery mode)" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-19-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro single      initrd    /boot/initrd.img-2.6.31-19-server } menuentry "ubuntu, linux 2.6.31-17-server" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     set quiet=1     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-17-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro   quiet splash     initrd    /boot/initrd.img-2.6.31-17-server } menuentry "ubuntu, linux 2.6.31-17-server (recovery mode)" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-17-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro single      initrd    /boot/initrd.img-2.6.31-17-server } menuentry "ubuntu, linux 2.6.31-14-server" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     set quiet=1     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-14-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro   quiet splash     initrd    /boot/initrd.img-2.6.31-14-server } menuentry "ubuntu, linux 2.6.31-14-server (recovery mode)" {         recordfail=1         if [ -n ${have_grubenv} ]; save_env recordfail; fi     insmod ext2     set root=(hd0,5)     search --no-floppy --fs-uuid --set a7d56894-74f7-4f7c-b1c4-7fcc31df95ad     linux    /boot/vmlinuz-2.6.31-14-server root=uuid=a7d56894-74f7-4f7c-b1c4-7fcc31df95ad ro single      initrd    /boot/initrd.img-2.6.31-14-server } ### end /etc/grub.d/10_linux ###  ### begin /etc/grub.d/20_memtest86+ ### menuentry "memory test (memtest86+)" {     linux16    /boot/memtest86+.bin } menuentry "memory test (memtest86+, serial console 115200)" {     linux16    /boot/memtest86+.bin console=ttys0,115200n8 } ### end /etc/grub.d/20_memtest86+ ###  ### begin /etc/grub.d/30_os-prober ### if [ ${timeout} != -1 ];   if keystatus;     if keystatus --shift;       set timeout=-1     else       set timeout=0     fi   else     if sleep --interruptible 3 ;       set timeout=0     fi   fi fi ### end /etc/grub.d/30_os-prober ###  ### begin /etc/grub.d/40_custom ### # file provides easy way add custom menu entries.  type # menu entries want add after comment.  careful not change # 'exec tail' line above. ### end /etc/grub.d/40_custom ###
which shows root set (hd0,5), upon reboot, still drops grub rescue prompt, root set (hd0,6) , have go through steps of quote again reboot succesfully.

should make sure reboot works successfully? have no other ideas update-grub has set drive correctly , yet still not work.

quote posted iamnotauser view post
what should make sure reboot works successfully? have no other ideas update-grub has set drive correctly , yet still not work.
can boot recovery mode?

if so, boot recovery mode of latest kernel , go root session.

find bootloader location running...

code:
grub-probe -t device /boot/grub
once there re-install grub2 mbr issuing following command....

code:
grub-install /dev/sda
(note:.... above /dev/sda assumes first drive on sata disk machine , result of grub-probe returned device starting /dev/sda?)

proceed run update-grub again

code:
update-grub
see if works out.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Installation & Upgrades [SOLVED] Boot drops to GRUB Rescue Prompt


Ubuntu

Comments

Popular posts from this blog

Joomla site hacked, cant see front and - Joomla! Forum - community, help and support

Christian Home School Programs - Joomla! Forum - community, help and support

Trouble with PF_OutFlag_I_USE_AUDIO and PF_CHECKOUT_LAYER_AUDIO