Skip to content

Instantly share code, notes, and snippets.

@franga2000
Last active April 6, 2023 01:28
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save franga2000/a09bd6e8d56407248964 to your computer and use it in GitHub Desktop.
Save franga2000/a09bd6e8d56407248964 to your computer and use it in GitHub Desktop.
Kali Linux on Acer Aspire Switch 10

#Kali Linux on Acer Aspire Switch ##The problem What's the problem with this tablet? Why can't I just insert the USB and mash F12 until it boots? The tablet is made to run Windows 8.1 and Windows 8.1 only. Because of the stupidity that is UEFI (specifically it's "Safe boot" feature) we can't just boot from any USB stick we want. Also, because someone thought putting a 32-bit UEFI on a 64-bit system was a good idea.

NOTE: This guide focuses on installing Kali alongside Windows. If you're trying to replace Windows, then I assume you know enough about Linux to know which parts to change.

##Requirements Before you start, there's a few things you need:

  • USB flash drive (at least 4GB)
  • USB OTG adapter
  • USB Keyboard
  • USB Hub
  • A lot of coffe, because it's gonna be a long night
  • USB WiFi or Ethernet card (that supports Linux)
  • Rufus
  • Kali Live ISO 64-bit

##Preparing the USB stick ###Installing the ISO

  1. Open Rufus
  2. Select the correct USB Stick
  3. Select "GTP for UEFI computers" as the partition table (if available)
  4. "Select the Kali 64-bit iso
  5. Click "Create"

###Building the 32-bit UEFI GRUB bootloader Run the following command in a Linux shell (VirtualBox?):

#Install build dependencies and tools
sudo apt-get install git bison libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev flex libfont-freetype-perl automake autotools-dev libfreetype6-dev texinfo
#Clone the GRUB repo
git clone git://git.savannah.gnu.org/grub.git
cd grub
#Configure GRUB
./autogen.sh
export EFI_ARCH=i386
./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix=""
make
cd grub-core
#Build the GRUB image
../grub-mkimage -d . -o bootia32.efi -O i386-efi -p /boot/grub ntfs hfs appleldr boot cat efi_gop efi_uga elf fat hfsplus iso9660 linux keylayouts memdisk minicmd part_apple ext2 extcmd xfs xnu part_bsd part_gpt search search_fs_file chain btrfs loadbios loadenv lvm minix minix2 reiserfs memrw mmap msdospart scsi loopback normal configfile gzio all_video efi_gop efi_uga gfxterm gettext echo boot chain eval

This will create a file called "bootia32.efi". Copy that file to "/EFI/Boot/" on your flash drive.

##Booting from the USB

  1. Open the "BIOS" (F2 when the laptop POSTs)
  2. Under "Security" set a supervisor password
  3. Under "Boot" set "Secure boot" to disabled
  4. Set the USB stick to boot first
  5. Press F10 to save changes and reboot

##Installing Kali

  1. The laptop should automatically boot into a GRUB command prompt
  2. Enter the following commands to open the installer:
set root=(hd0,1)
linux /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788
initrd /install/gtk/initrd.gz
boot
  1. Continue the installation normally
  2. When configuring driver, select "Manual"
  3. DO NOT CONFIGURE AN EFI BOOT PARTITION!
  4. Add a root (ext4, "/") and swap (swap, "swap") partition
  5. Finish the installation and hope for the best

##Booting Kali In order to boot the Ubuntu we just installed, we need to use the USB GRUB again. Just let the laptop automatically boot from the USB. When in GRUB, press C to open a command line. Run the following commands:

set root=(hd1,gpt5)
linux /vmlinux root=/dev/mmcblk0p5 video=VGA-1:1366x768e
initrd /initrd.img
boot

##Permanantely installing GRUB Obviously we can't use the USB GRUB to boot forever. Let's install GRUB: Open the terminal and run the following commands:

#Remove old GRUB packages
apt-get remove grub*

On some systems, you can use apt-get install grub-ia32 instead of compiling GRUB yourself

#Get build dependencies
apt-get install autoconf
#Get the GRUB source
git clone git://git.savannah.gnu.org/grub.git
#Compile 32-bit UEFI GRUB
cd grub/
./autogen.sh
./configure --with-platform=efi --target=i386
#Install GRUB
grub-install --target=i386-efi --efi-directory=/boot/efi/

##Making things actually work ###Keyboard To make the keyboard work you need to modify the kernel source and recompile it. Before compiling the kernel, open the file include/linux/hid.h and change the value of MAX_HID_USAGES (default is 12288) to 65536 (On aproximately line 368). Then compile and install the kernel.

To see how to do this, read my other guide. ###Trackpad Edit the file /usr/share/X11/xorg.conf.d/50-synaptics.conf and locate the following:

# This option enables the bottom right corner to be a right button on clickpads
# and the right and middle top areas to be right / middle buttons on clickpads
# with a top button area.
# This option is only interpreted by clickpads.
Section "InputClass"
	Identifier "Default clickpad buttons"
	MatchDriver "synaptics"
		###### INSERT HERE ######   (not actually in the file)
	Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
	Option "SecondarySoftButtonAreas" "58% 0 0 15% 42% 58% 0 15%"
EndSection

Insert the following before Option "SoftButtonAreas"... :

Option "ClickPad" "true"
Option "EmulateMidButtonTime" "0"

###Wireless As far as I've seen, there are two possible wifi cards you might have: BRCM80211 or RTL8723BS. ####BRCM80211

####RTL8723BS

#Install headers (I you haven't already)
apt-get install linux-headers
#Clone the driver repo
git clone https://github.com/hadess/rtl8723bs
#Build and install the driver
cd rtl8723bs
make
make install

After a reboot your wifi should be working

##Sources

@ivanyeoh88
Copy link

hi, when i reach the kali linux installation part, after issuing the command " linux /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788 "

it returns an error: file '/install/gtk/vmlinuz' not found.
i have check the file is in the drive and correct folder.

please help~ thanks

@bazzo90
Copy link

bazzo90 commented May 28, 2016

command " linux /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788 " <

the error appears because you wrote "vmlinuz" instead of "vmlinux".

@h0t5tuff
Copy link

h0t5tuff commented Aug 1, 2016

I can't configure sound or bluetooth. ? Can you help?

@AndyLavr
Copy link

AndyLavr commented Sep 22, 2017

Hi All!

New kernel:

http://acerium.ru/english/

Recommended:

Kernel 4.13.3-acerium1
In this kernel, BFQ (Budget Fair Queueing I/O Scheduler) is enabled by default.

Ubuntu packages

Download packages

Source

GitHub Repo

@abaza666
Copy link

Hi. I am pleas help me. I am not booting drin live USB kali Linux on acer aspire 3
https://wampi.ru/image/6lseyxI

@abaza666
Copy link

https://wampi.ru/image/6lseyxI
Not booting from USB kali linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment