0.025
thk thk Κυρ. 12 Μαρ. 2017 0:56 65 views

windows shit machine

Got this laptop from a friend to install linux and windows.
Laptop is  new and has  a pentium quad core N4200, 4gb ram , 256 kingston ssd .
Came preinstalled with linpus linux lite that never booted , showing an error message about disks.
It took about 3-4 days and many hours ,  to finally install both OSes, make grub come first before windows boot manager, and finally solving the shutdown problem in linux .

To install Linux Kubuntu 16.10 and Windows 10 on Acer Aspire ES1-533-P9FW :

1. Bios


Press F2 to go into BIOS when the computer starts.
Set a supervisor password at security tab .You have to do this in order to disable secure boot.
After this at the Boot tab select Secure Boot and set to Disabled
At main tab enable F12 Boot Menu
Save And exit



2. OS INSTALL

The computer does not provide legacy bios and boot only in UEFI mode despite having linux preinstalled.

I have tried both ways ,  installing windows first and linux after ,  or as someone suggested Linux first and then windows 10.

I don't think that matters but on the latest successful install I installed Kubuntu 16.10 first.
When you install Windows 10 , a new option appears in the Boot Order in Bios called Windows Boot Manager.
Unfortunately when you install Linux the same does not happen.
Download Windows 10 and Kubuntu 16.10,  and burn the isos on usb , on windows,  with rufus   , choosing partition scheme GPT for UEFI.

Go into bios and in boot order bring up USB devices.
Reboot.

2.1 Linux install

If kubuntu 16.10 does not boot
reboot and press F12 to bring up boot menu,
, select  Linux (    ) from the menu and press enter.
Start Kubuntu in testing mode.
On the Kubuntu live session:

---Partitioning --
Run KDE partition manager from the live session and partition the drive ,
Recreate partition table , and
make an efi partition around 200 mb first,
then make ext4 partition for Linux ( I assigned 40 gb after the first Efi) ,
Swap partition (assigned 3gb) ,
data ntfs partition for windows and linux to share (assigned about 130gb),
and finally ntfs partition for windows 10 (assigned 60 gb) .
Press apply to wait partitioning to complete.
Close KDE partition manager.

Install Linux following this guide
Open a Konsole window and run

sudo ubiquity -b

so the setup does not install grub , and you will install grub later as described below.

1) Boot Ubuntu Live DVD/USB in testing mode and open terminal

2) Run installation process without installing bootloader by:

sudo ubiquity -b

3) Press Continue testing after installation is over.

4) Mount newly installed file system into /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 partition)

5) Load efivars by:

sudo modprobe efivars 

6) Reinstall grub-install for a 64bit version

sudo apt-get install --reinstall grub-efi-amd64
sudo grub-install --no-nvram --root-directory=/mnt

7) Change root to /mnt and update grub

sudo chroot /mnt sudo update-grub 

8) Move and rename the installed bootloader

cd /boot/efi/EFI 
sudo cp -R ubuntu BOOT
cd BOOT
sudo cp grubx64.efi bootx64.efi

9) Reboot the system.

At this point grub is alone and should boot only linux without problem.


2.2  Install windows

Insert windows 10 usb , reboot , and install Windows 10 , at the partition you created before.

This goes with no problem .

After that turn off fast startup in windows , or do it with regedit :

Change:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power

HiberbootEnabled DWORD

0 = Turn off fast startup
1 = Turn on fast startup

Now on win 10 login screen at the bottom right corner where you  can shutdown , you will have 3 options instead of only 2 shutdown, restart that were shown before   .  Shutdown, Restart and sleep (as you understand before this shutdown meant sleep (!)) . Windows 10 boots fast because it tries to never shut down, and hibernate when you  choose to  shutdown . Another nice innovation from our friends at Microsoft.

Also I have to inform you that Windows 10 now features more and more  explanatory messages like : "Windows is getting ready" when it performs the windows update we all love.

After win 10 installation,  windows boot manager takes over and you can boot linux only by pressing F12  during boot which brings up the laptop  boot menu. If you reinstall grub or reinstall linux , grub will not take over. After win 10 installation "Wndows Boot Manager" appears as an option in boot order in bios. If you set it second after the hard disk, it will not solve the problem. ES1-533 sees linux if you press F12 boot menu key during boot , but I could not see it inside bios boot order. In linux you normally change the efi boot order with the efibootmgr -o command, but this command totally crashes and freezes the pc. I am very sure that this command is responsible for freezing the laptop during ubuntu installation , so I reported a bug .

So the only way to bring grub first was to use bcdedit from Windows 10 . Let's fool Windows:

From powershell opened as admin ,  run :

bcdedit /set '{bootmgr}' path \EFI\BOOT\bootx64.efi .

You may can't change the order of boot managers with bcdedit but you can change the .efi file path of windows boot manager so that it will point to the one we created while setting up linux  in step 1.

Reboot .

After this grub should come first , but it will not have windows boot option.

Start linux and do a

sudo update-grub

and it should see it.

Ensure the Hard Disk is before Windows boot manager in boot order in Bios .

If you press F12 during boot you should see 2 windows boot manager entries and one  linux .



3. Linux is not shutting down

The newest fashion in linux is that pc's are not shutting down.

You press  shutdown button in your desktop , pc reaches a state where it prints "Reached target shutdown" or "Reboot: power down" and it stucks there without powering off.

Saw that bug on 16.04 installation on an old Dell laptop with core duo, and the problem  was resolved by...   installing the wireless drivers..

I also saw that this bug has been posted as systemd bug and I came to a point where I believed I could not find a solution , at least for the time being as this pc is very new.

I tried to update the bios from windows and i did updating it to 0.8 from 0.4.

Procedure is very easy and I suggest you do it.

You go into acer website put the snid of your laptop and you download the bios update and run it from windows 10.

Then read an archlinux forum where someone suggested to take a look at kernel messages with dmesg.

Run dmesg and if you see a message:

Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug

edit /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="pci=nocrs"

and

sudo update-grub

This solved the problem

Now the pc is expected to shut down from linux instead of stucking in Reboot: Power off.

Last one is a world first from kaotonik.net and linux master thk.



VIVA LINUX - resist to  microsoft and UEFI !!


p.s.  if windows overwrites the boot manager after the update 

boot a usb mount /dev/sda1 partition as shown above and simply do in the mounted EFI parttion 




sudo cp EFI/ubuntu/grubx64.efi EFI/boot/bootx64.efi

as stated here https://unix.stackexchange.com/questions/565615/efi-boot-bootx64-efi-vs-efi-ubuntu-grubx64-efi-vs-boot-grub-x86-64-efi-grub-efi

EFI\boot\bootx64.efi: Fallback bootloader path
This is the only bootloader pathname that the UEFI firmware on 64-bit X86 systems will look for without any pre-existing NVRAM boot settings, so this is what you want to use on removable media.