Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2977  / 3 Years ago, sun, august 8, 2021, 2:54:39

I'm trying to install Ubuntu overwriting Windows on a Lenovo ideapad 320 (151IAP). I'm booting off a usb stick created using startup disk creator and an 18.04 image.



This will be a long post, because I've tried quite a few different things, but my hypothesis was that I have a working install of ubuntu and I just need to get it to boot properly; I'm not so sure that's the case anymore. Here is my latest boot-repair output.



Update: I tried booting from grub using these instructions and got errors "can't find /root in /etc/fstab" and "mounting /dev on /root/dev failed: No such file or directory" and same with run. Also, I saw that the /home/dustan/ directory is empty. I'm not really sure how the directory system is supposed to look after a proper install, so correct me if I'm wrong: this seems to me to be evidence against my hypothesis that I only need to repair grub. I tried making the usb stick using mkusb instead of the default startup disk creator; it still hangs on installing grub.



Here's the full story:



The first problem I ran into was the installer hanging on "configuring hardware". I eventually figured out how to disable secure boot and fast boot, per the advice given here, and the installer no longer hangs there.



Instead it hangs at Grub2, so I followed the advice given here (after several failed attempts) to specify the Ubuntu partition (sda2) separate from the boot partition (sda1). It still hung on Grub2 (didn't bypass it, so I'm not really sure what that answer was actually getting at).



In both the configuring hardware and the Grub2 hang cases, I have given the computer literally hours to install properly.



When I look at the log in the installer, it shows repeated instances of "invalid report id data", associated to using the touchpad. There is indeed a known problem with this touchpad and Ubuntu's drivers, but the touchpad has been working in spite of these errors, and I figure if I can ever actually get Ubuntu working I can likely deal with the driver problem later. And unfortunately these errors are probably obscuring any actual crippling errors.



So after many attempts to get that to work properly, I finally decided to attempt to repair Grub.



Before I list boot-repair errors, I forgot to mention another thing that I tried while installing in the midst of the above; once I figured out how to modify the boot line, I tried noacpi, nolapic, irqpoll, and noapic (I was somewhat using this as a reference, but I still had no idea what I was actually doing).



If I follow the recommended repair in boot-repair, it hangs without giving any feedback.



If I disable SecureBoot under advanced options in boot-repair and then run the recommended repair, it will set itself to purge grub, and then it says "Please open a terminal and type the following commands:"



sudo chroot "/mnt/boot-sav/sda2" dpkg --configure -a
sudo chroot "/mnt/boot-sav/sda2" apt-get install -fy
sudo chroot "/mnt/boot-sav/sda2" apt-get purge -y grub*-common grub-common:i386 shim-signed


Running the first command gives:



ubuntu@ubuntu:~$ sudo chroot "/mnt/boot-sav/sda2" dpkg --configure -a
Setting up grub-efi-amd64-signed (1.93+2.02-2ubuntu8) ...
Installing for x86_64-efi platform.
grub-install: error: efibootmgr failed to register the boot entry: Unknown error -1.
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
grub-efi-amd64-signed
ubuntu@ubuntu:~$


I didn't expect the second command to work, but I tried it anyway, and it hung after this:



ubuntu@ubuntu:~$ sudo chroot "/mnt/boot-sav/sda2" apt-get install -fy
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up grub-efi-amd64-signed (1.93+2.02-2ubuntu8) ...
Installing for x86_64-efi platform.


Trying the terminal method here,
the instructions for a separate boot partition are kind of vague, but here was my interpretation:



ubuntu@ubuntu:~$ sudo mkdir /mnt/ubuntu
ubuntu@ubuntu:~$ sudo mkdir /mnt/ubuntu/boot
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/ubuntu/boot
ubuntu@ubuntu:~$ sudo grub-install --boot-directory=/mnt/ubuntu/boot /dev/sda
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
ubuntu@ubuntu:~$ sudo umount /mnt/ubuntu/boot


Another terminal method.



ubuntu@ubuntu:~$ sudo mount /dev/sda2 /mnt
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# grub-install /dev/sda
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
root@ubuntu:/# exit
exit
ubuntu@ubuntu:~$ sudo umount /mnt/sys && sudo umount /mnt/proc && sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt


Trying again with sda1.



ubuntu@ubuntu:~$ sudo mount /dev/sda2 /mnt
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/boot
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev && sudo mount --bind /dev/pts /mnt/dev/pts && sudo mount --bind /proc /mnt/proc && sudo mount --bind /sys /mnt/sys
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# grub-install /dev/sda
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
root@ubuntu:/# exit
exit
ubuntu@ubuntu:~$ sudo umount /mnt/sys && sudo umount /mnt/proc && sudo umount /mnt/dev/pts && sudo umount /mnt/dev && sudo umount /mnt/boot && sudo umount /mnt


One more.



ubuntu@ubuntu:~$ sudo mount /dev/sda2 /mnt
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/boot
ubuntu@ubuntu:~$ sudo mkdir -p /mnt/boot/efi
ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt/boot/efi
ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev
ubuntu@ubuntu:~$ sudo mount --bind /proc /mnt/proc
ubuntu@ubuntu:~$ sudo mount --bind /sys /mnt/sys
ubuntu@ubuntu:~$ sudo chroot /mnt
root@ubuntu:/# apt-get install grub-efi-amd64
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
root@ubuntu:/# sudo dpkg --configure -a
Setting up grub-efi-amd64-signed (1.93+2.02-2ubuntu8) ...
Installing for x86_64-efi platform.
grub-install: error: efibootmgr failed to register the boot entry: Unknown error -1.
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
grub-efi-amd64-signed
root@ubuntu:/# exit
exit
ubuntu@ubuntu:~$ sudo umount /mnt/dev
ubuntu@ubuntu:~$ sudo umount /mnt/proc
ubuntu@ubuntu:~$ sudo umount /mnt/sys
ubuntu@ubuntu:~$ sudo umount /mnt/boot/efi
ubuntu@ubuntu:~$ sudo umount /mnt/boot
ubuntu@ubuntu:~$ sudo umount /mnt

More From » boot

 Answers
6

The solution was simple: change the bios settings: boot mode to legacy support, boot priority to legacy first. Then reinstall Ubuntu and it worked.


[#8158] Monday, August 9, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ligdesig

Total Points: 164
Total Questions: 106
Total Answers: 114

Location: Japan
Member since Sat, Jun 6, 2020
4 Years ago
;