Had a power failure, and now all is see is the word GRUB when I boot up
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
That's because fsck does nothing more then checking your filesystem is OK. It is, it's just the stored data that's corrupted. Boot into the DVD, find out what name the root partition has, then issue the command:
Code:
install-grub /dev/sda1
Assuming /dev/sda1 is your root partition. This (re-)installs grub to the drive, so hopefully you can boot it again. If it doesn't, come back with the exact error message and a description of what you've done to get to that stage.
So I was able to boot into live-cd and run grub-install /dev/sda (MBR) and it errored out at that point. Something about a a blocklist or something, can't remember really. It was recommended not to do it with --force.
So I was able to boot into live-cd and run grub-install /dev/sda (MBR) and it errored out at that point. Something about a a blocklist or something, can't remember really. It was recommended not to do it with --force.
The response you describe appears when you try to install GRUB to a partition on your device rather than to the MBR ofthe device itself. Are you sure you didn't mistakenly type
If you've retried running grub-install /dev/sda from the live CD without success, you might want to try the following:
1. Boot off the live CD
2. chroot to your Debian partition
3. run grub-install /dev/sda
Do you realise (and any of the other participants) that /dev/dsa is only correct IF on your system the disk your system resides on is actually named /dev/sda by the kernel of the live-distro? Most certainly it isn't, so you need to alter the command to reflect where the kernel actually has allocated your harddrive! Also: it's very much possible the kernel is instructed to use UUID's instead of the conventional node names (the /dev/sda names). Post the contents of the file /etc/fstab so we can get an idea of what the kernel is to work with.
Try this: boot the machine from a live cd, while on the live session, download the boot info script, and execute it as root. Then post the RESULTS.txt file here. Also, if you get any error please copy the exact error (verbatim), so we can have precise clues about the problem.
Here is the error when I run: grub-install /dev/sda
Is this the correct command to install grub to my MBR on /dev/sda??
Code:
/usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
/usr/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: if you really want blocklists, use --force.
Here is the output of bootinfoscript:
Code:
Boot Info Script 0.61 [1 April 2012]
============================= Boot Info Summary: ===============================
=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at sector
3676127474 of the same hard drive for core.img, but core.img can not be
found at this location.
sda1: __________________________________________________________________________
File system: ext3
Boot sector type: Grub2 (v1.97-1.98)
Boot sector info: Grub2 (v1.97-1.98) is installed in the boot sector of
sda1 and looks at sector 3676176434 of the same hard
drive for core.img, but core.img can not be found at
this location.
Operating System: Debian GNU/Linux 6.0
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img
sda2: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 1 3,907,029,167 3,907,029,167 ee GPT
GUID Partition Table detected.
Partition Start Sector End Sector # of Sectors System
/dev/sda1 34 3,900,998,080 3,900,998,047 EFI System partition
/dev/sda2 3,900,998,081 3,907,029,134 6,031,054 Swap partition (Linux)
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/sda1 33cc2a56-5bfb-4043-a327-7610a96d6666 ext3
/dev/sda2 74e3941f-6166-403a-aa2f-1d7be8f393e4 swap
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/sda1 / ext3 (rw,errors=remount-ro)
=========================== sda1/boot/grub/grub.cfg: ===========================
--------------------------------------------------------------------------------
#
# 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 ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
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 {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_gpt
insmod ext2
set root='(hd0,gpt1)'
search --no-floppy --fs-uuid --set 33cc2a56-5bfb-4043-a327-7610a96d6666
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_gpt
insmod ext2
set root='(hd0,gpt1)'
search --no-floppy --fs-uuid --set 33cc2a56-5bfb-4043-a327-7610a96d6666
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
insmod part_gpt
insmod ext2
set root='(hd0,gpt1)'
search --no-floppy --fs-uuid --set 33cc2a56-5bfb-4043-a327-7610a96d6666
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=33cc2a56-5bfb-4043-a327-7610a96d6666 ro
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
insmod part_gpt
insmod ext2
set root='(hd0,gpt1)'
search --no-floppy --fs-uuid --set 33cc2a56-5bfb-4043-a327-7610a96d6666
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=33cc2a56-5bfb-4043-a327-7610a96d6666 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-amd64' --class debian --class gnu-linux --class gnu --class os {
insmod part_gpt
insmod ext2
set root='(hd0,gpt1)'
search --no-floppy --fs-uuid --set 33cc2a56-5bfb-4043-a327-7610a96d6666
echo 'Loading Linux 2.6.26-2-amd64 ...'
linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=33cc2a56-5bfb-4043-a327-7610a96d6666 ro
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.26-2-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
insmod part_gpt
insmod ext2
set root='(hd0,gpt1)'
search --no-floppy --fs-uuid --set 33cc2a56-5bfb-4043-a327-7610a96d6666
echo 'Loading Linux 2.6.26-2-amd64 ...'
linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=33cc2a56-5bfb-4043-a327-7610a96d6666 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.26-2-amd64
}
### 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 ###
### 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 $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
=============================== sda1/etc/fstab: ================================
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1 / ext3 errors=remount-ro 0 1
UUID=33cc2a56-5bfb-4043-a327-7610a96d6666 / ext3 errors=remount-ro 0 1
# /dev/sda2 none swap sw 0 0
UUID=74e3941f-6166-403a-aa2f-1d7be8f393e4 none swap sw 0 0
# /dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/cdrom /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
--------------------------------------------------------------------------------
=================== sda1: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
1752.999058723 = 1882.268406784 boot/grub/core.img 1
1752.890645027 = 1882.151998464 boot/grub/grub.cfg 1
1752.991154671 = 1882.259919872 boot/initrd.img-2.6.26-2-amd64 3
1752.888840675 = 1882.150061056 boot/initrd.img-2.6.32-5-amd64 7
1752.885739326 = 1882.146731008 boot/vmlinuz-2.6.26-2-amd64 2
1752.963337898 = 1882.230051840 boot/vmlinuz-2.6.32-5-amd64 3
1752.888840675 = 1882.150061056 initrd.img 7
1752.991154671 = 1882.259919872 initrd.img.old 3
1752.963337898 = 1882.230051840 vmlinuz 3
1752.885739326 = 1882.146731008 vmlinuz.old 2
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628
Rep:
Use your live CD again and chroot into your install. Run (as root)
Code:
apt-get purge grub-pc grub-common
then, again as root;
Code:
apt-get install grub-pc grub-common
This should get you a working install of grub working and should install it on the mbr as opposed to sda1 where it is now installed according to your boot info.
Before doing this make very sure that your connection is not going to disapear while you do this. Not a real big concern as grub is not working now but having to do it several times would get very old very fast.
After you do this run the boot info script again and make sure that grub is installed to the mbr rather than sda1 or elsewhere and that it is actually finding the files it needs.
If not post all errors from the installation process and the new information text.
One imagines the gpt reference might be a hint.
Looks like the type field of sda1 has been changed to x'ee' - if that was changed back to x'83' I suspect all would again work as expected. I would do it from fdisk personally, but any of the partitioning tools should be o.k.
And yes, "grub-install /dev/sda" command looks correct.
This should get you a working install of grub working and should install it on the mbr as opposed to sda1 where it is now installed according to your boot info.
Where do you see that it is installed to /dev/sda1 instead of MBR on /dev/sda?
---------- Post added 11-18-12 at 05:34 AM ----------
Quote:
Originally Posted by syg00
One imagines the gpt reference might be a hint.
Looks like the type field of sda1 has been changed to x'ee' - if that was changed back to x'83' I suspect all would again work as expected. I would do it from fdisk personally, but any of the partitioning tools should be o.k.
And yes, "grub-install /dev/sda" command looks correct.
~$ sudo fdisk /dev/sda
[sudo] password for a:
Command (m for help): t
Partition number (1-12): 1
Hex code (type L to list codes): 83
Changed system type of partition 1 to 83 (Linux)
Command (m for help): w
Last edited by RockDoctor; 11-18-2012 at 07:28 AM.
Reason: fix formatting
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.