Skip to content

Instantly share code, notes, and snippets.

@AndreaGhizzoni
Last active November 13, 2017 19:03
Show Gist options
  • Save AndreaGhizzoni/d6f91c1831bdf9d06a7aa4452789fee5 to your computer and use it in GitHub Desktop.
Save AndreaGhizzoni/d6f91c1831bdf9d06a7aa4452789fee5 to your computer and use it in GitHub Desktop.
kali-on-laptop.md

Kali live USB with persistence storage

Download a desktop version of kali, write it on usb memory and make a persistence storage on in: guide here and here

installing bumblebee

The following steps worked only in kali-linux with lxde

$ apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
$ apt-get install linux-headers-$(uname -r)
$ apt-get install bumblebee-nvidia primus

edit /etc/bumblebee/bumblebee.conf with

[...]
Driver=nvidia (<-)

[...]
KernelDriver=nvidia-current (<-)

check bus pci id

$ lspci | egrep 'VGA|3D'

and edit /etc/bumblebee/xorg.conf.nvidia with that id

Section "Device"
Identifier "DiscreteNvidia"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:03:00:0" (<- id might change)

then

$ shutdown -r now

start bumblebeed because is not enable by default:

$ service bumblebeed start

and test it with glxgears:

$ optirun glxgears -info

if all goes right enable bumblebeed

$ systemctl enable bumblebeed

check if nvidia card is not running without using optirun

$ cat /proc/acpi/bbswitch
[..] OFF

if you have already an home directory somewhere, for example /home/andrea use

$ useradd --home /home/andrea andrea
$ chown -R andrea:andrea /home/andrea

otherwise simply type:

$ useradd -m andrea
$ mkhomedir_helper andrea

then change password:

$ passwd andrea

add to sudo group:

$ usermod -a -G sudo andrea

and change shell:

$ chsh -s /bin/bash andrea

then:

$ shutdown -r now

and you should login with andrea user.

Run the following as NOT root

$ systemctl --user enable pulseaudio && systemctl --user start pulseaudio
$ shutdown -r now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment