Difference between revisions of "Reset Asus ZenBook laptop"

 
(11 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
[[Category:Asus]]
 
[[Category:Asus]]
 
This page describes how to reset the Asus ZenBook to a clean state.  
 
This page describes how to reset the Asus ZenBook to a clean state.  
 +
(i) The default configuration provided by Asus is full of non-useful software, trials and non-required stuff.
  
The default configuration provided by Asus is full of non-useful software, trials and non-required stuff. I advised you to clean your laptop by re-installing a proper windows from scratch. 
+
By following this guide '''all the default programs and data will be wiped out'''!
 +
You'll end up with a clean Windows using the official ISO image + dual boot (optional)
  
  
(i) Everything below has been tested on an Asus ZenBook UX510U
+
 
 +
Everything below has been tested on an Asus ZenBook UX510U
  
  
Line 12: Line 15:
 
=Requirements=
 
=Requirements=
  
Before reseting the PC you must first power it on and use it to:
+
Before starting the clean-up you must:
# register hardware and software
+
# Start the new laptop with its default configuration.
# download ISOs and tools
+
# Connect your PC to Internet
 +
# Register hardware and software (see next chapters)
 +
# Download ISOs and tools  
  
As you result '''you must connect your PC to Internet first''' before being able to reset it.
 
  
  
Line 68: Line 72:
  
  
=Prepare for dual boot with Linux=
+
=BIOS configuration for USB drive boot=
 +
 
 +
By default you're not allowed to boot on USB drive. To overcome that problem you must adjust some settings in you BIOS.
 +
 
 +
==BIOS access==
 +
 
 +
To access BIOS: ''' press F2''' and keep it press '''on boot''' until you see the BIOS.
 +
 
  
 
==BIOS configuration==
 
==BIOS configuration==
  
To access BIOS: ''' press F2''' and keep it press '''on boot''' until you see the BIOS.
+
1. Set administrator password
 +
* You must '''set an administrator password''' (mandatory)
 +
* You have to '''save & exit''' then come again to the BIOS later...
 +
 
 +
2. Disable security
 +
* Go the '''Advanced mode (F7)'''
 +
* '''Security''' Settings
 +
** Set '''Secure boot control''' to ''Disabled''
 +
* '''Boot''' Settings
 +
** Set '''Fast boot''' to ''Disabled''
 +
** Set '''CSM support''' to ''Enabled'' ==> the screen should change upon activation
 +
* You have to '''save & exit''' then come again to the BIOS later...
 +
 
 +
3. Choose boot device
 +
* At last you can select a boot device from the BIOS. The USB drive should appear.
 +
 
 +
 
 +
 
 +
=Windows re-installation=
 +
 
 +
==Partition setup==
 +
 
 +
Re-install windows on the SSD partition.
 +
 
 +
!! In case of issues please read the next chapter !!
 +
 
 +
 
 +
'''Dual-boot'''
 +
 
 +
(i) For dual-boot you can create partitions for Linux during the installation.
 +
* Windows partition = 70Gb (Primary) [76 022 Mb]
 +
* Linux partition = 37 Gb (Primary) [37 888 Mb]
 +
* Swap linux = 8192 Mb (Primay)
 +
Windows will create the boot loader partition, say ''yes'' to authorize windows to create additional partitions.
 +
 
 +
 
 +
==Fixing GPT issue==
 +
 
 +
If you have the following error: <code>windows cannot be installed to this disk. the selected disk is of the gpt partition style</code>
 +
 
 +
* You need to '''open a terminal''' during installation: '''Shift + F10'''
 +
* Launch <code>diskpart</code>
 +
* Type <code>list disk</code>
 +
* Select the SSD disk number <code>select disk 1</code> 
 +
* Type <code>clean</code>
 +
* Type <code>convert gpt</code>
 +
* Type <code>exit</code>
 +
 
 +
 
 +
Source: https://msdn.microsoft.com/en-us/windows/hardware/commercialize/manufacture/desktop/windows-setup-installing-using-the-mbr-or-gpt-partition-style
 +
 
 +
 
 +
==Disable fast startup==
  
 +
Source: https://www.tenforums.com/tutorials/4189-fast-startup-turn-off-windows-10-a.html
  
To use the dual-boot you must disable some options in your BIOS:
+
* Go to '''Control Panel''' > '''Hardware and sound''' > '''Power options''' > On the left, click on '''Choose what the power button do'''
* '''Disable fast boot'''
+
* Click on the shield to enable administrator settings '''Change settings that are currently unavailable'''
 +
* Under '''Shutdown settings''' > '''uncheck''' ''Turn on fast startup box''  
  
  
==Shrink windows partition==
 
  
How to split the drive?
 
* If you can it is best to split '''50% windows / 50% linux'''
 
* However... on '''128 Gb SSD = max 45 to 50 Gb for Linux'''
 
  
Source: http://www.everydaylinuxuser.com/2015/11/how-to-shrink-windows-10-to-make-space.html
+
==Useful programs==
  
* Run '''Control Panel''' > '''System & security''' > '''Administrative tools''' > ''Computer management''
+
Install windows normally with your favorites programs.
* On the left, go to '''Storage''' > '''Disk management'''
 
* Select the SSD drive
 
* Select your windows partition > Right click > '''Shrink Volume'''
 
* You need to remove 45Gb to 50 Gb [Linux + 8Gb Swap]
 
** 45 Gb = 45 * 1024 = 46080 Mb
 
** 50 Gb = 50 * 1024 = 51200 Mb
 
  
  
 +
==Configuration tricks==
  
 +
Don't forget to set your TEMP directories to the DATA HDD. This is one of the key point to use a small partition for windows.
  
TO BE DONE
 
  
 +
=Linux setup=
  
 
==Download *Ubuntu ISO==
 
==Download *Ubuntu ISO==
Line 108: Line 165:
  
  
=Windows re-installation=
+
==Create bootable USB key==
 +
 
 +
Use [https://unetbootin.github.io/ UNetBootIn] to put the ISO image to create a bootable USB key.
 +
 
 +
 
 +
==Mount Windows and Data partitions==
 +
 
 +
To mount the NTFS partitions you have to:
 +
# Create the target mount points
 +
<syntaxhighlight lang="bash">
 +
mkdir -p /mnt/windows
 +
mkdir -p /mnt/data
 +
chown -R guillaume:users /mnt/*
 +
chmod -R 777 /mnt/*
 +
</syntaxhighlight>
 +
 
 +
# Get the UUID of each partition using <code>ls -ld /dev/disk/by-uuid/*</code>
 +
# Edit the boot file <code>/etc/fstab</code>
 +
 
 +
!! Adjust the UUID to your own values + adapt the partitions disk and number to your actual configuration !!
 +
 
 +
<syntaxhighlight lang="bash">
 +
# / was on /dev/sdb2 during installation
 +
UUID=e2504785-deae-4d12-ac63-de84dda3c980 /              ext4    errors=remount-ro                                    0      1
 +
# swap was on /dev/sdb3 during installation
 +
UUID=774c5306-a718-4cb7-a874-cec444b78a75 none            swap    sw                                                  0      0
 +
# Data drive (/sda2)
 +
UUID=405A07D75A07C89C                    /mnt/data      ntfs    defaults,windows_names,umask=007,uid=1000,gid=1000  0      0
 +
# Partition windows (/sdb1)
 +
UUID=DAF00EACF00E8EC7                    /mnt/windows    ntfs    defaults,windows_names,umask=007,uid=1000,gid=1000  0      0
 +
</syntaxhighlight>
 +
 
 +
You must reboot for the partitions to appear in /mnt/...
 +
 
 +
 
 +
==Fix READ-ONLY issue==
 +
 
 +
After the reboot the partition might be in a read-only mode - probably because windows uses "fast reboot" option.
 +
To fix that:
 +
* Unmount the target disk:
 +
 
 +
<code>umount /mnt/data</code>
 +
 
 +
* Run NTFSFIX
 +
 
 +
<code>sudo ntfsfix /dev/sda2</code>
 +
 
 +
* Mount the partition again:
 +
 
 +
<code>sudo mount -t ntfs-3g -o rw /dev/sda2 /mnt/data/</code>
 +
 
 +
 
 +
==Configure GRUB menu==
 +
 
 +
<syntaxhighlight lang="bash">
 +
apt-get install grub-Customizer
 +
</syntaxhighlight>
 +
 
 +
 
 +
<syntaxhighlight lang="bash">
 +
# Backup GRUB data
 +
sudo cp -Rp /etc/grub.d /etc/grub.d.ori
 +
 
 +
# Install application
 +
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
 +
sudo apt-get update
 +
sudo apt-get install grub-customizer
 +
 
 +
# Lancer l'application
 +
gksudo grub-customizer
 +
</syntaxhighlight>
 +
 
 +
 
 +
Source: https://doc.ubuntu-fr.org/grub-customizer  (in French)
 +
 
 +
 
 +
==Particular points==
 +
 
 +
Everything works fine after reboot under Xubunt 16.10. Wifi, bluetooth, graphics, sound, keyboard shortcuts and light, etc. All is good ! :)
 +
 
 +
 
 +
==Windows configuration changes==
 +
 
 +
At last, you can set the Windows TEMP to the correct drive letter.
 +
 
  
(i) In case of dual-boot: re-install windows on big SSD partition (min 70 Gb)
+
Happy coding to all of you ! ;)
  
  
  
Format other drive in NTFS (should be the default)
+
=Contact=
  
Install Linux on other SSD partition
+
If you have questions or issues with the guide above feel free to contact me to:  guillaume [@]  qin-diaz.com

Latest revision as of 20:12, 10 December 2016

This page describes how to reset the Asus ZenBook to a clean state. (i) The default configuration provided by Asus is full of non-useful software, trials and non-required stuff.

By following this guide all the default programs and data will be wiped out! You'll end up with a clean Windows using the official ISO image + dual boot (optional)


Everything below has been tested on an Asus ZenBook UX510U


Requirements

Before starting the clean-up you must:

  1. Start the new laptop with its default configuration.
  2. Connect your PC to Internet
  3. Register hardware and software (see next chapters)
  4. Download ISOs and tools


Registration

Hardware registration

Register laptop for warranty

Software registration

Source: https://support.microsoft.com/en-us/help/12440/windows-10-activation

To check activation status in Windows 10

  • select the Start button
  • select Settings > Update & security > Activation

If Windows 10 isn’t activated on your device, see Get help with Windows 10 activation errors for more info.


Get Windows 10 installation USB drive

Download Windows 10 ISO

Get your windows version and key

The key is not displayed in Windows. You must use a 3rd party tool to retrieve it. I recommend ShowKeyPlus


Download Windows ISO

  • Download the [1] Microsoft Windows 10 download tool]
  • Select create installation media for another PC
  • Download the ISO file

Setup bootable key

Prepare bootable key

  • Download the utility to create a USB bootable key RUFUS
  • Launch RUFUS
  • Create a new bootable disk using the following parameters
  • Partition scheme: GTP partition scheme for UEFI
    • File system: FAT32
    • Select the ISO file
    • Click start ... and wait


BIOS configuration for USB drive boot

By default you're not allowed to boot on USB drive. To overcome that problem you must adjust some settings in you BIOS.

BIOS access

To access BIOS: press F2 and keep it press on boot until you see the BIOS.


BIOS configuration

1. Set administrator password

  • You must set an administrator password (mandatory)
  • You have to save & exit then come again to the BIOS later...

2. Disable security

  • Go the Advanced mode (F7)
  • Security Settings
    • Set Secure boot control to Disabled
  • Boot Settings
    • Set Fast boot to Disabled
    • Set CSM support to Enabled ==> the screen should change upon activation
  • You have to save & exit then come again to the BIOS later...

3. Choose boot device

  • At last you can select a boot device from the BIOS. The USB drive should appear.


Windows re-installation

Partition setup

Re-install windows on the SSD partition.

!! In case of issues please read the next chapter !!


Dual-boot

(i) For dual-boot you can create partitions for Linux during the installation.

  • Windows partition = 70Gb (Primary) [76 022 Mb]
  • Linux partition = 37 Gb (Primary) [37 888 Mb]
  • Swap linux = 8192 Mb (Primay)

Windows will create the boot loader partition, say yes to authorize windows to create additional partitions.


Fixing GPT issue

If you have the following error: windows cannot be installed to this disk. the selected disk is of the gpt partition style

  • You need to open a terminal during installation: Shift + F10
  • Launch diskpart
  • Type list disk
  • Select the SSD disk number select disk 1
  • Type clean
  • Type convert gpt
  • Type exit


Source: https://msdn.microsoft.com/en-us/windows/hardware/commercialize/manufacture/desktop/windows-setup-installing-using-the-mbr-or-gpt-partition-style


Disable fast startup

Source: https://www.tenforums.com/tutorials/4189-fast-startup-turn-off-windows-10-a.html

  • Go to Control Panel > Hardware and sound > Power options > On the left, click on Choose what the power button do
  • Click on the shield to enable administrator settings Change settings that are currently unavailable
  • Under Shutdown settings > uncheck Turn on fast startup box



Useful programs

Install windows normally with your favorites programs.


Configuration tricks

Don't forget to set your TEMP directories to the DATA HDD. This is one of the key point to use a small partition for windows.


Linux setup

Download *Ubuntu ISO

Go to Ubuntu website and download the ISO you'd like to use.

I'm using Xubuntu


Create bootable USB key

Use UNetBootIn to put the ISO image to create a bootable USB key.


Mount Windows and Data partitions

To mount the NTFS partitions you have to:

  1. Create the target mount points
mkdir -p /mnt/windows
mkdir -p /mnt/data
chown -R guillaume:users /mnt/*
chmod -R 777 /mnt/*
  1. Get the UUID of each partition using ls -ld /dev/disk/by-uuid/*
  2. Edit the boot file /etc/fstab

!! Adjust the UUID to your own values + adapt the partitions disk and number to your actual configuration !!

# / was on /dev/sdb2 during installation
UUID=e2504785-deae-4d12-ac63-de84dda3c980 /               ext4    errors=remount-ro                                    0       1
# swap was on /dev/sdb3 during installation
UUID=774c5306-a718-4cb7-a874-cec444b78a75 none            swap    sw                                                   0       0
# Data drive (/sda2)
UUID=405A07D75A07C89C                     /mnt/data       ntfs    defaults,windows_names,umask=007,uid=1000,gid=1000   0       0
# Partition windows (/sdb1)
UUID=DAF00EACF00E8EC7                     /mnt/windows    ntfs    defaults,windows_names,umask=007,uid=1000,gid=1000   0       0

You must reboot for the partitions to appear in /mnt/...


Fix READ-ONLY issue

After the reboot the partition might be in a read-only mode - probably because windows uses "fast reboot" option. To fix that:

  • Unmount the target disk:

umount /mnt/data

  • Run NTFSFIX

sudo ntfsfix /dev/sda2

  • Mount the partition again:

sudo mount -t ntfs-3g -o rw /dev/sda2 /mnt/data/


Configure GRUB menu

apt-get install grub-Customizer


# Backup GRUB data
sudo cp -Rp /etc/grub.d /etc/grub.d.ori

# Install application
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

# Lancer l'application
gksudo grub-customizer


Source: https://doc.ubuntu-fr.org/grub-customizer (in French)


Particular points

Everything works fine after reboot under Xubunt 16.10. Wifi, bluetooth, graphics, sound, keyboard shortcuts and light, etc. All is good ! :)


Windows configuration changes

At last, you can set the Windows TEMP to the correct drive letter.


Happy coding to all of you ! ;)


Contact

If you have questions or issues with the guide above feel free to contact me to: guillaume [@] qin-diaz.com