Hot answers tagged

63

After struggling for 2 hours, I have found a much easier way to achieve this. I just RTFM. ;) Add two lines to /etc/default/grub GRUB_SAVEDEFAULT=true GRUB_DEFAULT=saved Do the sudo update-grub, reboot, get into your grub menu and select whichever menu or submenu item you need. The choice will be saved and next time your computer will boot into it ...


62

I think most distributions have moved additional kernels into the advanced options sub menu at this point, as TomTom found was the case with his Arch. I didn't want to alter my top level menu structure in order to select a previous kernel as the default. I found the answer here: http://www.humans-enabled.com/2014/08/how-to-set-default-grub-kernel-boot....


36

The kernel parameters are documented at kernel.org. To understand what acpi_osi does, you roughly need to know how ACPI works. ACPI consists of so-called tables that the BIOS loads into RAM before the operating system starts. Some of them simply contain information about essential devices on the mainboard in a fixed format, but some like the DSDT table ...


34

You can't boot Windows from a grub rescue prompt, unless the partition with the grub modules is available. That's why you get the unknown command error. Your best solution is to reinstall the Windows bootloader. To do this boot from a Windows 7 repair CD or the Windows Installation DVD to a repair prompt and run: bootrec /fixmbr If you don't have a Windows ...


34

Just enter the command exit. It should take you to another menu that makes you select the Windows bootloader. Worked on Lenovo Y50


34

Okay, after joe pointed me the right direction in comments, this is how I did it: basicly just install pacman -S linux-lts (optional) check if kernel, ramdisk and fallback are available in ls -lsha /boot remove the standard kernel pacman -R linux update the grub config grub-mkconfig -o /boot/grub/grub.cfg reboot Note, for syslinux you'll need to edit the ...


32

To sum up: Use the show the differences between the versions to check what the differences are. From the diff view, you can recognize the changes you have made to the file (if any), and the differences between current file and the maintainer file. Now you need to merge the maintainer file with the local changes: either install the package maintainer's ...


29

After analyzing the scripts in Fedora, I realize that the configuration file path is read from the symlink /etc/grub2.conf. The correct grub2-mkconfig line is thus: grub2-mkconfig -o "$(readlink -e /etc/grub2.conf)" As noted in comments, it might be /etc/grub2.cfg, or /etc/grub2-efi.cfg on a UEFI system. Actually, both links might be present at the same ...


22

As mentioned in the comments, you can set the default kernel to boot into using the grub-set-default X command, where X is the number of the kernel you want to boot into. In some distributions you can also set this number by editing the /etc/default/grub file and setting GRUB_DEFAULT=X, and then running update-grub. The number is the index to an array of ...


19

In file /etc/grub.d/30_os-prober the line OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`" makes all drives spin (standby -> idle). Os-prober is a utility to find Linux installations at drives other then your boot drive. It is the os-prober that needs to be disabled. One way is to remove the package: apt-get --purge remove os-prober. Another way is ...


19

Here is the problem in your understanding: My understanding is that the bootloader GRUB2, is mounted to /boot. GRUB is not "mounted" on boot. GRUB is installed to /boot, and is loaded from code in the Master Boot Record. Here is a simplified overview of the modern boot process, assuming a GNU/Linux distribution with an MBR/BIOS (not GPT/UEFI): The BIOS ...


19

From the wiki on Grub Setup GRUB_CMDLINE_LINUX Entries on this line are added to the end of the 'linux' command line (GRUB legacy's "kernel" line) for both normal and recovery modes. It is used to pass options to the kernel. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" This line imports any entries to the end of the 'linux' line (GRUB legacy's "kernel" line). ...


18

bootx64.efi doesn't get started first. Most of the time, it doesn't get started at all. The EFI firmware has its own "boot menu", analogous to the menu presented by GRUB but at an earlier stage in the boot process. Just as GRUB lets you choose which Linux kernel to run, the EFI boot menu lets you choose which EFI boot program to run — choices being things ...


18

The entire kernel is loaded into memory at boot, typically along with an initramfs nowadays. (It is still possible to set up a system to boot without an initramfs but that's unusual on desktops and servers.) The initramfs's role is to provide the functionality needed to mount the "real" filesystems and continue booting the system. That involves kernel ...


17

I'm assuming you're using GRUB2 as your bootloader. You can disable the timeout by opening the file /etc/default/grub and changing the value of GRUB_TIMEOUT: GRUB_TIMEOUT=-1 Then you need to run sudo update-grub to re-generate /boot/grub/grub.cfg after editing /etc/default/grub. See here for more information and settings.


17

Reinstall input device drivers sudo apt-get install --reinstall xserver-xorg-input-all


17

The following worked for me with a GPT partitioned disk. insmod part_gpt insmod chain set root=(hd0,gpt1) chainloader /EFI/Microsoft/Boot/bootmgfw.efi boot Note that you can enter a command line from the grub boot menu and just type commands as above to test out different combinations. You need to enter the id of the EFI boot partition (not the windows ...


15

Specific actions that need to happen when a RPM package is installed or removed are included within the RPM package itself in pre-install, post-install, pre-uninstall and post-uninstall sections. For every installed RPM package you can query the RPM database for the exact scripts that are included with the rpm command: rpm -q --scripts <package-name>...


15

It sounds like you enabled the "fast boot" option in your BIOS setup which disables the F2 setup and F12 boot menu prompts. Power-off your laptop and hold down the F2 key, then power it on for the BIOS setup utility. Disable "fast boot", save and reboot.


14

When you run grub-install by default it assumes the EFI system is mounted as /boot/efi It depends on your distribution where EFI system is mounted and on some distributions it isn't mounted after boot. First check if /boot/efi is mounted with mount | grep /boot/efi If that doesn't work first try the following to see if it is mounted elsewhere. mount | ...


13

The splash (which eventually ends up in your /boot/grub/grub.cfg ) causes the splash screen to be shown. At the same time you want the boot process to be quiet, as otherwise all kinds of messages would disrupt that splash screen. Although specified in GRUB these are kernel parameters influencing the loading of the kernel or its modules, not something that ...


12

Grub uses Emacs-like key bindings: Ctrl+B = Left, Ctrl+F = Right (mnemonic: backward/forward) Ctrl+P = Up, Ctrl+N = Down (mnemonic: up/down) Ctrl+A = Home, Ctrl+E = End (mnemonic: A=beginning/end) See the manual for other key bindings. You can also define your own key layout and load it with the keymap command. This is not documented in the manual; the ...


12

On Fedora I use: grub2-mkconfig -o "$(readlink -e /etc/grub2.cfg)" because executing with no option to readlink returns a relative path, and grub2-mkconfig gives an error: $ ls -l /etc/grub2.cfg lrwxrwxrwx. 1 root root 22 Dec 10 2015 /etc/grub2.cfg -> ../boot/grub2/grub.cfg $ readlink /etc/grub2.cfg ../boot/grub2/grub.cfg $ sudo grub2-mkconfig -o "$(...


12

Simply doing grep 'menuentry' /boot/grub/grub.cfg lists additional entries that are not related to the actual kernel or OS versions. For instance, it lists if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" menuentry_id_option="" export menuentry_id_option I would like to propose a small improvement to the method of searching that ...


12

GRUB uses the contents of /boot/grub/ located on your Linux partition to boot your system normally. Because of this GRUB has very minimal functionality. If you are on a Legacy BIOS system you're out of luck and you'll need to Windows disk for boot repair. (this is because GRUB can't load its NTFS driver because you deleted it). If you have a UEFI system ...


11

Figured this out. You may need to add video=efifb to ensure that the framebuffer console is used: GRUB_CMDLINE_LINUX="video=efifb fbcon=rotate:1" EDIT: The efifb driver is designed for EFI firmware only, especially Intel-based Apple computers. However, as I've found out, it also works for non-Apple PCs. I am running the proprietary nVidia drivers on my ...


11

After using ghex to examine my "BOOTX64.EFI" file in the efi partition I found this line. search.fs_uuid a43d1f11-6ebe-477d-8be3-321a33bc37f9 root hd2,gpt4 set prefix=($root)'/boot/grub' This shows that the information for the location of grub (the boot partition) has been embedded by grub2-install into the BOOTX64.EFI file generated for the system. ...


10

For your information, I opened a bug report on the Fedora bugzilla. The solution is: boot with init=/bin/bash (editing the kernel line in grub) after booting: mount -o remount,rw / passwd root enter the new password twice touch /.autorelabel reboot with /sbin/reboot -f The last line (creating the .autorelabel file at the root) force a selinux relabelling ...


9

There is no way to edit a file from the Grub prompt. But you don't need to do that. As htor and Christopher already suggested, you should be able to switch to a text mode console by pressing Ctrl+Alt+F2 and log in there and edit the file. If for some reason you can't even get a text mode login prompt, boot in single-user mode. In Grub, edit the command ...


9

In Fedora, the /etc/grub2.cfg symlink points at the BIOS version. On a UEFI system, use: $ sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg In CentOS: $ sudo grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg Generally, you could use instead: $ sudo grub2-mkconfig -o $(readlink -f /etc/grub2-efi.cfg) See https://docs.fedoraproject.org/en-US/fedora/f27/...


Only top voted, non community-wiki answers of a minimum length are eligible