Error 21 in grub during the upgrade to newer SLES 11 (SPx)
This document (7014290) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 11 Service Pack 2
SUSE Linux Enterprise Server 11 Service Pack 1
SUSE Linux Enterprise Server 11
Situation
Symptoms
During the upgrade process from a previous OS version (i.e. SLES 10 SP4, or older SLES 11 SP) to a newer version of SLES 11, an error is encountered when the grub bootloader is installed. The relevant text of the error is similar to:
grub> install --stage2=/boot/grub/stage2 (hd0,0)/boot/grub/stage1 d (hd0) (hd0,0)/boot/grub/stage2 0x8000 (hd0,0)/boot/grub/menu.lstIf using a graphical install, you may see the following:
Error 21: Selected disk does not exist
grub> quit
Resolution
- Revert the VM back to the snapshot before applying the update/installation.
- Modify the /boot/grub/device.map to point to the proper disk/partition.
Ideally, you will want to use either:- /dev/disk/by-id
or - /dev/disk/by-uuid
- /dev/disk/by-id
- Reboot and run the upgrade again.
Cause
Additional Information
(hd0) /dev/disk/by-id/cciss-xxxxxxxxxxxxxxxxxxxxAfter being converted to a virtual server, the old name will only work as long as grub isn't modified -- which occurs when upgrading to a new OS version or service pack.
(hd1) /dev/disk/by-id/cciss-xxxxxxxxxxxxxxxxxxxx
Therefore, in order to avoid this error, use the appropriate entry in /dev for your device. Try to avoid using disk names, like cciss devices, and use the links to your disks under /dev/disk/by-id or /dev/disk/by-uuid -- pointing to devices similar to /dev/sda, /dev/sdb... in most of configurations).
############################################################################
Here is an example. Before upgrading my machine, I see that /boot/grub/device.map shows:
(hd0) /dev/disk/by-id/cciss-3600508b1001039565a353152494a0000and that my /boot is on partition /dev/sda1 (as it is part of the '/' partition):
(fd0) /dev/fd0
/dev/sda1 on / type ext3 (rw,acl,user_xattr)In looking at the /dev/disk/by-id directory, the following is seen:
lrwxrwxrwx 1 root root 9 2015-01-22 21:34 edd-int13_dev80 -> ../../sdaTo correct this system, I will want to modify my /boot/grub/device.map to contain:
lrwxrwxrwx 1 root root 10 2015-01-22 21:34 edd-int13_dev80-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2015-01-22 21:34 edd-int13_dev80-part2 -> ../../sda2
lrwxrwxrwx 1 root root 9 2015-01-22 21:34 edd-int13_dev81 -> ../../sdb
lrwxrwxrwx 1 root root 10 2015-01-22 21:34 edd-int13_dev81-part1 -> ../../sdb1
(hd0) /dev/disk/by-id/edd-int13_dev80-part1
(fd0) /dev/fd0
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7014290
- Creation Date: 13-Dec-2013
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com