Installation of GRUB boot loader to hard disk fails
Solution 1
I had a similar problem. Pressing Alt+F4 to switch to the installer output, I could see Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea.
It would appear that my USB disk was detected as /dev/sda
, and my target hard disk was detected as /dev/sdb
, based on the output from cat /proc/partitions
.
So I fixed it by activating a shell in the Alt+F2 session and ran the following:
chroot /target grub-install /dev/sdb
Then I switched back to the installer (Alt+F1) and hit "Continue without bootloader".
Once installation had finished (I unplugged the USB stick), I was presented with a grub>
prompt, so I followed the instructions here, as follows (this assumes that your boot disk is /dev/sda
:
grub> ls
(hd0) (hd0,msdos5) (hd0,msdos1)
grub> set root=(hd0,msdos1)
grub> ls /
lost+found/ etc/ ...
grub> ls /boot
config-3.11.0-26-generic ...
grub> linux /boot/vmlinuz- # press Tab
# then add the following
root=/dev/sda1
grub> initrd /boot/initrd # press Tab
grub> boot
Once the system is booted, log in and then:
sudo update-grub
sudo grub-install /dev/sda
Reboot to check it's working:
sudo shutdown -r now
Solution 2
Please provide more information about why the GRUB install failed.
It is hard to suggest possible solutions when no information is available about why GRUB failed to install. Would you please try the following:
- boot an Ubuntu Live CD or USB
- mount your LVM partition (
/dev/sda2
) - run the command
cat syslog | grep grub
(wheresyslog
is the log file in/var/syslog
on/dev/sda2
) - add the output from the command to your question by editing it
Is the GRUB install problem related to UEFI?
My understanding is that the IBM 3650 M2 uses a UEFI BIOS. Is your problem installing GRUB possibly related to this? If so, perhaps one of the following links may be helpful.
- Ubuntu server, gpt partition table, mdadm, grub boot fail
- How to boot Ubuntu from EFI/UEFI?
- Setting up GRUB2 (U)EFI
Related videos on Youtube
William
Updated on September 18, 2022Comments
-
William over 1 year
I am installing Ubuntu Server 12.04 LTS on an IBM 3650 M2 with a hardware raid5 with three partitions:
sda1 /boot - 1 GB, ext3 sda2 lvm - 1 TB, ext4 sda3 swap - 24GB
During the GRUB installation, I get a message that the installer failed to load GRUB on a hard disk and get sent back to the installer menu.
-
irrational John almost 12 yearsWere the three partitions you list created on your RAID 5 array? Is your RAID 5 implemented in hardware or software? (In other words, is GRUB aware of the separate disks of the RAID 5 or would this be transparent to GRUB?) Why do you have a separate
/boot
partition?? -
William almost 12 yearshardware raid. the separate /boot partition is because I don't want to put grub or the MBR on an LVM.
-