User Tools

Site Tools


centos7_usb_boot_install_fail

CentOS7 USB Boot Install Fail

Jul 2017

Introduction

We have some servers that we have been using for test systems using CentOS 6.x. These have been mainly running MFEL. When I tried to install (or upgrade) to CentOS 7, the units would always fail to boot from the USB Sticks.

I would see the boot screen and it would like like the following:

/var/log/messages-20161113:Nov 13 02:16:16 localhost kernel: BUG: soft lockup - CPU#0  stuck for 22s! [rcuos/4:22]
/var/log/messages-20161113:Nov 13 02:26:40 localhost kernel: BUG: soft lockup - CPU#10 stuck for 22s! [rcuos/4:22]
/var/log/messages-20161113:Nov 13 02:27:09 localhost kernel: BUG: soft lockup - CPU#0  stuck for 22s! [rcuos/4:22]
/var/log/messages-20161113:Nov 13 02:46:28 localhost kernel: BUG: soft lockup - CPU#10 stuck for 22s! [rcuos/2:20]
/var/log/messages-20161113:Nov 13 02:46:56 localhost kernel: BUG: soft lockup - CPU#0  stuck for 22s! [rcuos/2:20]
/var/log/messages-20161113:Nov 13 02:54:04 localhost kernel: BUG: soft lockup - CPU#10 stuck for 22s! [rcuos/7:25]
/var/log/messages-20161113:Nov 13 02:54:32 localhost kernel: BUG: soft lockup - CPU#0  stuck for 22s! [rcuos/7:25]
/var/log/messages-20161113:Nov 13 03:00:25 localhost kernel: BUG: soft lockup - CPU#10 stuck for 22s! [rcuos/2:20]


The server would never boot, and I was doomed to stay on CentOS 6.x forever, which was a shame because these were capable servers, but the products were all moving to CentOS 7.


Solution


After a lot of Google-ing, I found this. When you boot from the USB stick, you get a boot menu that looks something like the following:



If you select the menu entitled Install CentOS Linux 7 and press <TAB> on your keyboard, you will see the command line that this menu launches at the bottom of the page, in my example I see the following;

  vmlinuz initrd=initrd.img ins.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet


At the end of this command, just after quiet enter the command nomodeset. Your full command line should now look like the following:

  vmlinuz initrd=initrd.img ins.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet nomodeset



Edit your USB Stick


You can make this even easier by editing the USB Stick you created, so that you don't have to remember to do this. (I have not tested to see what effect this has not a server that does not exhibit this behaviour).

Open USB Stick in Windows/Linux


Navigate to the USB stick, and go to the following location:

  <drive>:\EFI\BOOT\ 


In here you will see several files, we are interested in the grub.cfg file.

<sxh [text][; options for SyntaxHighlighter]> 05/12/2016 13:20 <DIR> . 05/12/2016 13:20 <DIR> .. 05/12/2016 13:20 <DIR> fonts 05/12/2016 13:20 1,296,176 BOOTX64.EFI 05/12/2016 13:20 1,283,952 MokManager.efi 05/12/2016 13:20 1,025,920 grubx64.efi 12/07/2017 11:18 1,347 grub.cfg

             4 File(s)      3,607,395 bytes
             3 Dir(s)         227,328 bytes free

</sxh>
Open the grub.cfg file in a text editor, and look for the line:
<sxh [text]> menuentry 'Install CentOS Linux 7' –class fedora –class gnu-linux –class gnu –class os { </sxh>

This is the menu line you see when you boot from the USB stick. Under this title you will the line: <sxh [text]> linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet </sxh>

Edit this line by adding the nomodeset switch to the end of it. <sxh [text]> linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet nomodeset </sxh>

The whole section for this menu item should look as follows: <sxh [text]> ### BEGIN /etc/grub.d/10_linux ### menuentry 'Install CentOS Linux 7' –class fedora –class gnu-linux –class gnu –class os {

linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 quiet nomodeset
initrdefi /images/pxeboot/initrd.img

</sxh>
Save the file, eject the USB stick properly and test.

centos7_usb_boot_install_fail.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1