Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I boot my computer, whether it be from the OS software reboot button or the physical power button on my laptop, GRUB gives me a command line.

That, by itself, isn't so strange. I'd just assume I misconfigured something, except that if I type reboot into GRUB's command line, my computer reboots and GRUB gives me the normal boot menu as if nothing happened.

If I press c in the normal boot menu to get the command line again, and then type reboot into that, GRUB still returns to the normal menu after the reboot.

What could cause GRUB 2 to only initialize successfully when the reboot was instigated by its own command line?

I'm dual-booting Windows 7 and Arch Linux, both 64-bit. I'm using MBR, not UEFI. Here are the contents of /boot/grub/grub.cfg, which has been automatically generated by Arch's grub-mkconfig tool.

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="2"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=white/red
set menu_color_highlight=red/white

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  cdd2682e-3d7c-476f-bca9-9ce2d5be28f7
else
  search --no-floppy --fs-uuid --set=root cdd2682e-3d7c-476f-bca9-9ce2d5be28f7
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=30
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux, with Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-cdd2682e-3d7c-476f-bca9-9ce2d5be28f7' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  cdd2682e-3d7c-476f-bca9-9ce2d5be28f7
    else
      search --no-floppy --fs-uuid --set=root cdd2682e-3d7c-476f-bca9-9ce2d5be28f7
    fi
    echo    'Loading Linux core repo kernel ...'
    linux   /boot/vmlinuz-linux root=UUID=cdd2682e-3d7c-476f-bca9-9ce2d5be28f7 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initramfs-linux.img
}
menuentry 'Arch Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-cdd2682e-3d7c-476f-bca9-9ce2d5be28f7' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos5'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  cdd2682e-3d7c-476f-bca9-9ce2d5be28f7
    else
      search --no-floppy --fs-uuid --set=root cdd2682e-3d7c-476f-bca9-9ce2d5be28f7
    fi
    echo    'Loading Linux core repo kernel ...'
    linux   /boot/vmlinuz-linux root=UUID=cdd2682e-3d7c-476f-bca9-9ce2d5be28f7 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initramfs-linux-fallback.img
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-CE7C7A0D7C79F097' {
    insmod part_msdos
    insmod ntfs
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  CE7C7A0D7C79F097
    else
      search --no-floppy --fs-uuid --set=root CE7C7A0D7C79F097
    fi
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###
share|improve this question

1 Answer 1

up vote 2 down vote accepted

I remember similar issues, on different occasions, and I started noticing it was happening anytime there were kernel upgrades or grub upgrades (I believe so anyway, re-install always fixed it).

Have Arch regenerate grub.cfg at minimum, although it kinda sounds like initrd/initramfs and grub went out of sync. There is another boot resource that might not hurt to check, but I can't thing of it.

Anyway, if you made any updates/installs, go check your syslogs and find out what they were, and undo them one at a time, or just roll them all back.

Maybe your BIOS is also going schizophrenic on you, but its much more likely that package updates were not gracefully synchronized.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.