Kali linux and ssd

Samiux’s Blog

Open Source is a great idea and it has changed the world! Open Source forever .

While you do not know attack, how can you know about defense? (未知攻,焉知防?)

Do BAD things . for the RIGHT reasons — OWASP ZAP

It is easier to port a shell than a shell script. — Larry Wall

Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris. — Larry Wall

为天地立心, 为生民立命, 为往圣继绝学, 为万世开太平。 — 王炜

Monday, February 15, 2016

HOWTO : Kali Linux 2016.1 Live USB Persistence Encryption on M.2 SSD

I (Samiux) recommend to install Kali Linux 2016.1. Live USB Persistence on M.2 SSD 128GB or higher. The M.2 SSD will be installed to an enclosure with USB 3.0 interface. I will install Kali Linux 2016.1 Live USB Persistence for Encryption only.

I (Samiux) have tried to install Kali Linux 2016.1 Live USB Persistence Encryption on 32GB USB 3.0 Pendrive. It is very very slow and insufficent space for the first update. It takes over 12 hours to update Kali Linux 2016.1 and the reboot failed. May be you can use a larger size and faster USB pendrive or an external portable SSD drive for the purpose. I find Live USB Persistence on fast device is better than dual boot on Windows, Mac or Linux computers.

This guide covers how to install Kali Linux 2016.1 Live USB Persistence Encryption for Apple Macbook (Air/Pro/Pro Retina) and Lenovo ThinkPad (X201s or newer). However, this guide does not suitable for The New Macbook as it does not display «Windows» when pressing «Option» during boot up. Therefore, this guide may not work for all models of Mac machine.

You need a Linux computer (such as Ubuntu) to do the following steps. If you do not have gparted install, you can install it.

If you are using Ubuntu, you can :

sudo apt-get update
sudo apt-get -y install gparted

Download Kali Linux 2016.1 from official site. I download amd64 version. Install it to M.2 SSD 128GB.

Usually, M.2 SSD will be mounted at «/dev/sdb». You can confirm it when running «fdisk -l».

Читайте также:  Evolution data server linux

If you are using Ubuntu, you can :

sudo dd if=kali-linu-2016.1-amd64.iso of=/dev/sdb bs=1024k

Do not unplug the M.2 SSD. Run gparted and format the remained space to ext3 (ext4 should work but not yet tested).

The M.2 SSD is still inserted to USB port. Run the following commands :

If you are using Ubuntu, you can :

cryptsetup —verbose —verify-passphrase luksFormat /dev/sdb3
cryptsetup luksOpen /dev/sdb3 my_usb

mkfs.ext3 -L persistence /dev/mapper/my_usb
e2label /dev/mapper/my_usb persistence

mkdir -p /mnt/my_usb
mount /dev/mapper/my_usb /mnt/my_usb
echo «/ union» > /mnt/my_usb/persistence.conf
umount /dev/mapper/my_usb

cryptsetup luksClose /dev/mapper/my_usb

* Make sure you enter a very strong passphrase for the encryption

If you are using Macbook, you should long press «Option» key when boot up. Once the boot menu is displayed, select «Windows» icon to boot.

If you are using ThinkPad, you should press «F12» to launch the boot menu when boot up. Once the boot menu is displayed, select the M.2 SSD to boot.

Once Kali Linux boot menu is displayed, select «Live USB Encrypted Persistence». You will be asked for Passphrase when boot to unlock /dev/sdb3.

On Kali Linux 2016.1 Live USB Persistence, you run the following commands :

apt-get update
apt-get -y install dkms linux-headers-amd64 tlp tlp-rdw

wget http://ftp.wa.co.za/pub/ubuntu/ubuntu/pool/restricted/b/bcmwl/bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu2.1_amd64.deb
dpkg -i bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu2.1_amd64.deb

If you are using ThinkPad, you need this command. However, it is no harm to install it when you are using Macbook :

apt-get -y install tp-smapi-dkms acpi-call-dkms

If you are using Macbook, you need this step. However, it is no harm to set it up when you are using ThinkPad.

# Author : Samiux (http://samiux.blogspot.com)
# Date : Feb 15, 2016

if [ -f /sys/module/hid_apple/parameters/iso_layout ]
then
echo 0 > /sys/module/hid_apple/parameters/iso_layout
echo 1 > /sys/module/hid_apple/parameters/fnmode
fi

Save it with «Ctrl o» and «Ctrl x».

chmod +x /usr/local/bin/mac_keyboard

If you are using Macbook, you need this step. However, it is no harm to set it up when you are using ThinkPad.

[Desktop Entry]
Type=Application
Exec=/usr/local/bin/mac_keyboard
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Mac Keyboard Layout
Name=Mac Keyboard Layout
Comment[en_US]=Start Mac Keyboard Layout when GNOME starts
Comment=Start Mac Keyboad Layout when GNOME starts

apt-get update
apt-get -y dist-upgrade
apt-get autoclean
apt-get -y —purge autoremove

Save it with «Ctrl o» and «Ctrl x».

Читайте также:  Виртуальный диск linux ubuntu

Then update Kali to the latest status. It takes time to update. However, when the kernel is updated, the update process will be failed as it cannot update the kernel and its related packages.

Change your time zone when necessary.

Make sure you change the root password on every boot up.

* Make sure you entered a strong password and it should be difference to the encryption passpharse

The New Macbook is not supported. It may not working on all models of Mac machine.

«maltego» on Kali Linux 2016.1 refuses to launch on my Macbook Air (Mid 2013), Macbook Pro Retina (Mid 2012) and ThindPad X201s even it is not in Live USB Persistence mode, maybe it is a bug for older CPU.

Источник

Thread: Installing kali linux on a SSD

akash614 is offlineJunior Member

QuestionInstalling kali linux on a SSD

Hi guy i am having a 120 gb SSD and want to install kali linux on for learning i have a computer and if i install kali linux onto my ssd of a usb on my computer and later if i plug the ssd in another computer can i use like normal or will i have problems

_defalt is offlineSenior Member

Yes you can use it normally but you also have to manually install grub on your SSD. By default, installer will install grub on the EFI partition of your hard disk. Once you boot kali, you have to create a small 500MB partition in your SSD with FAT 32 filesystem.

Then run a command sudo grub-install /dev/name of your SSD && sudo update-grub. Use fdisk -l to see the name of your SSD.

akash614 is offlineJunior Member

QuoteOriginally Posted by _defalt View Post

Yes you can use it normally but you also have to manually install grub on your SSD. By default, installer will install grub on the EFI partition of your hard disk. Once you boot kali, you have to create a small 500MB partition in your SSD with FAT 32 filesystem.

Then run a command sudo grub-install /dev/name of your SSD. Use fdisk -l to see the name of your SSD.

so i have installed kali linux on a ssd but after complete install and then run command can i use the ssd on different computers with different architectures and different configuration as i have not still ordered a ssd hope it comes to a use after buying

Читайте также:  Linux on intel atom n450

mstrmnn is offlineMember

QuoteOriginally Posted by akash614 View Post

I don’t think so. But you can try a persistent live installation for that.

akash614 is offlineJunior Member

QuoteOriginally Posted by mstrmnn View Post

I don’t think so. But you can try a persistent live installation for that.

as i am already running kali linux live usb persistence on a usb drive of 16gb then i think the ssd installnation wont work

bigbiz is offlineSenior Member

QuoteOriginally Posted by akash614 View Post

as i am already running kali linux live usb persistence on a usb drive of 16gb then i think the ssd installnation wont work

Thanx _default i was trying this to no eval. On a 1tb hdd in an external hard drive enclosure do you recommend same?i used windisc32 to install kali 2018.1 tried to boot into it nothing. Gparted reads the image got burned proper. Will give this a go.

_defalt is offlineSenior Member

QuoteOriginally Posted by akash614 View Post

so i have installed kali linux on a ssd but after complete install and then run command can i use the ssd on different computers with different architectures and different configuration as i have not still ordered a ssd hope it comes to a use after buying

Different architecture?
No. The kali image you have installed supports x86 architecture. For ARM it is different.

I asked you to install grub in your SSD. Have you done that? You can’t boot kali from your SSD unless you install grub in your SSD.

See, the step where people get it wrong. When you install kali in USB device, the installer does not install grub on USB. It installs grub on your EFI partition of your system hard drive. So you can boot kali from SSD only on that PC but when you plug it on another PC you can’t boot it because there is no grub.

For that manully install grub in your SSD to make it portable. See below:

QuoteOriginally Posted by _defalt View Post

Once you boot kali, you have to create a small 500MB partition in your SSD with FAT 32 filesystem.

Then run a command sudo grub-install /dev/name of your SSD && sudo update-grub. Use fdisk -l to see the name of your SSD.

Источник

Оцените статью
Adblock
detector