Skip to content

Instantly share code, notes, and snippets.

@Sarfarazsajjad
Last active September 8, 2019 09:51
Show Gist options
  • Save Sarfarazsajjad/c9d3393f24ec7ef7ca0f3049fda38127 to your computer and use it in GitHub Desktop.
Save Sarfarazsajjad/c9d3393f24ec7ef7ca0f3049fda38127 to your computer and use it in GitHub Desktop.
Thinkpad x230 Linux Boot issue fix for Ubuntu Bionic
# The problem can be solved as follows:
# Boot Ubuntu Live DVD/USB in testing mode and open terminal
# Run installation process without installing bootloader by:
# sudo ubiquity -b
# Press Continue testing after installation is over.
# Mount newly installed file system on /mnt:
sudo mount /dev/sda2 /mnt
sudo mkdir /mnt/boot/efi
sudo mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
# (where sda2 is the root partition and sda1 is the EFI system partition)
# Load efivars by:
sudo modprobe efivars
# Reinstall grub-install for a 64-bit version
sudo apt-get install --reinstall grub-efi-amd64
sudo grub-install --no-nvram --root-directory=/mnt
# Change root to /mnt and update grub
sudo chroot /mnt
sudo update-grub
# Move and rename the installed bootloader
cd /boot/efi/EFI
sudo cp -R ubuntu/* BOOT/
cd BOOT
sudo cp grubx64.efi bootx64.efi
# Reboot the system.
echo "now you can reboot to test if boot problem is fixed now"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment