Fix grub on ubuntu
# See disk info.
sudo fdisk -l
sudo mount /dev/sdX1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sdX
# Probe windows bootloader.
mkdir -p /boot/efi
mount -t vfat /dev/sdXY /boot/efi
# Where X is your boot hard disk and Y is the efi partition you created earlier.
# Install GRUB UEFI application to and its modules to /boot/grub/x86_64-efi using:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug
mkdir -p /boot/grub/locale
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
# Generate a configuration for GRUB
grub-mkconfig -o /boot/grub/grub.cfg
- 1|2|3|4|5, Specifies the run level, overriding the value set in /etc/inittab.
- rhgb: redhat graphical boot - This is a GUI mode booting screen with most of the information hidden while the user sees a rotating activity icon spining and brief information as to what the computer is doing.
- quiet: hides the majority of boot messages before rhgb starts.
- rdblacklist: blacklists a driver at boot time. To blacklist the driver when the root device is mounted, add a blacklist entry in a file under /etc/modprobe.d/.
- rd_NO_LUKS: Disables detection of an encrypted LUKS partition.
- rn_NO_DM: Disables Device-Mapper (DM) RAID detection.
- rn_NO_MD: Disables Multiple Device (MD) RAID detection.
- ro root=/dev/mapper/vg-lv_root: Specifies that the root file system is to be mounted read only, and specifies the root file system by the device path of its LVM volume (where vg is the name of the volume group).
- rw root=UUID=UUID: Specifies that the root (/) file system is to be mounted read-writable at boot time, and specifies the root partition by its UUID.
- selinux=0: Disables SELinux.
- single: Boots the computer in single-user mode, without prompting for the root password.
You may want to disable KMS for various reasons, such as getting a blank screen or a "no signal" error from the display, when using the Catalyst driver, etc. To disable KMS add nomodeset as a kernel parameter. See Kernel parameters for more info.
Along with nomodeset kernel parameter, for Intel graphics card you need to add i915.modeset=0 and for Nvidia graphics card you need to add nouveau.modeset=0. For Nvidia Optimus dual-graphics system, you need to add all the three kernel parameters (i.e. "nomodeset i915.modeset=0 nouveau.modeset=0").