Ubuntu Linux Install Error: “'grub-install /dev/sdb' failed”
in the year of our load 2012, installing a clean Linux from CD fails flat on its face, because it's Linux!
so, i got a old (~2005) laptop and wanted to Ubuntu. Downloaded the installer, burned it on a DVD, inserted to laptop, rebooted, and got the step-by-step install GUI screen. All good, until, near the end, i got this error:
Executing 'grub-install /dev/sdb' failed. This is a fatal error.
WTF is “grub” and WTF is “sdb”? Turns out, GRUB is the critical software for machine to start (called bootloader), and “sdb” is actually the CD drive. So, Ubuntu wants to install the OS onto the CD it's running from. Can Quality Assurance be possibly worse than this? Viva Linux!
For the record, this is “ubuntu-12.04.1-desktop-i386.iso”.
(my first Linux installation is 1998, MkLinux and Debian Linux.)
Try re-install, and it should work. Choose the main hard-disk partition to put the “GRUB” on (that's usually
Tech Info on Booting
Here's some relevant tech info.
GRUB (short for GNU GRand Unified Bootloader) is a boot loader package from the GNU Project. GRUB is the reference implementation of the Multiboot Specification, which provides a user the choice to boot one of multiple operating systems installed on a computer or select a specific kernel configuration available on a particular operating system's partitions.
Typically, “sda” is your main storage device (For example, the hard-disk main partition). You want to install grub there.
Disk partitioning is the act of dividing a hard disk drive into multiple logical storage units referred to as partitions, to treat one physical disk drive as if it were multiple disks.
On Linux, you can see partitions by
df -sk or
sudo fdisk -l /dev/sda. Things like “/dev/sda”, “/dev/sda1”, “/dev/sdb” are names of different devices. You can look at your partitions visually by
BIOS (Basic Input/Output System) is a de facto standard defining a firmware interface.
The BIOS software is built into the PC, and is the first code run by a PC when powered on ('boot firmware'). When the PC starts up, the first job for the BIOS is the power-on self-test, which initializes and identifies system devices such as the CPU, RAM, video display card, keyboard and mouse, hard disk drive, optical disc drive and other hardware. The BIOS then locates boot loader software held on a peripheral device (designated as a 'boot device'), such as a hard disk or a CD/DVD, and loads and executes that software, giving it control of the PC. This process is known as booting.
BIOS software is stored on a non-volatile ROM chip on the motherboard. It is specifically designed to work with each particular model of computer, interfacing with various devices that make up the complementary chipset of the system. In modern computer systems, the BIOS chip's contents can be rewritten without removing it from the motherboard, allowing BIOS software to be upgraded in place.
A BIOS has a user interface (UI), typically a menu system accessed by pressing a certain key on the keyboard when the PC starts. In the BIOS UI, a user can:
- configure hardware
- set the system clock
- enable or disable system components
- select which devices are eligible to be a potential boot device
- set various password prompts, such as a password for securing access to the BIOS user interface functions itself and preventing malicious users from booting the system from unauthorized peripheral devices.
A boot sector or boot block is a region of data storage device that contains machine code to be loaded into random-access memory (RAM) by a computer system's built-in firmware. The purpose of a boot sector is to allow the boot process of a computer to load a program stored on the same storage device.
On an IBM PC compatible machine, the BIOS selects a boot device, then copies the first sector from the device, into physical memory at memory address 0x7C00.
- A Master Boot Record (MBR) is the first sector of a data storage device that has been partitioned. The MBR sector may contain code to locate the active partition and invoke its Volume Boot Record.
- A Volume Boot Record (VBR) is the first sector of a data storage device that has not been partitioned, or the first sector of an individual partition on a data storage device that has been partitioned. It may contain code to load and invoke an operating system (or other standalone program) installed on that device or within that partition.
A Master Boot Record (MBR) is a special type of boot sector at the very beginning of partitioned computer mass storage devices like fixed disks or removable drives intended for use with IBM PC-compatible systems and beyond. The MBR holds the information on how the logical partitions, containing file systems, are organized on that medium. Besides that, the MBR functions as an operating system independent chain boot loader in conjunction with each partition's Volume Boot Record (VBR).
MBRs are not present on non-partitioned media like floppies, superfloppies or other storage devices configured to behave as such.
The ext4 or fourth extended filesystem is a journaling file system for Linux, developed as the successor to ext3.
A file system (or filesystem) is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data as well as manage the available space on the device(s) which contain it. A file system organizes data in an efficient manner and is tuned to the specific characteristics of the device. A tight coupling usually exists between the operating system and the file system. Some file systems provide mechanisms to control access to the data and metadata. Ensuring reliability is a major responsibility of a file system. Some file systems allow multiple programs to update the same file at nearly the same time.
- [grub failed to install to /dev/sda on retry By Jean-Baptiste Lallement. At https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/987927 , accessed on 2012-10-08 ]
- [I receive the error 'grub-install /dev/sda failed' while attempting to install Ubuntu as the computer's only OS. At http://askubuntu.com/questions/143678/i-receive-the-error-grub-install-dev-sda-failed-while-attempting-to-install-u ]
- [GRUB load error At http://askubuntu.com/questions/164494/grub-load-error , accessed on 2012-10-08 ]
If you have a question, put $5 at patreon and message me.