Kali 2015-06-16
From charlesreid1
Initial setup of mars
Working on newton via PXE
Then cronus via USB
Mars
This was really straightforward, nothing fancy.
Newton
Installing Kali Linux on Newton because the optical drive is having a problem. Using the Kali install media (same one that worked on mars) results in a "non-bootable media" error.
F10 allows us to boot from the network, so we're going to set up mars as a PXE server, serve up a fresh Kali .iso image to Newton, and bing.
Setting Up PXE Server
Following these instructions.
Install dnsmasq
root@mars:~# apt-get install dnsmasq Get:1 http://security.kali.org/ kali/updates/main dnsmasq-base i386 2.62-3+deb7u3 [364 kB] Get:2 http://security.kali.org/ kali/updates/main dnsmasq all 2.62-3+deb7u3 [16.3 kB] Fetched 381 kB in 1s (278 kB/s) Reading changelogs... Done (Reading database ... 322018 files and directories currently installed.) Preparing to replace dnsmasq-base 2.62-3+deb7u1 (using .../dnsmasq-base_2.62-3+deb7u3_i386.deb) ... Unpacking replacement dnsmasq-base ... Selecting previously unselected package dnsmasq. Unpacking dnsmasq (from .../dnsmasq_2.62-3+deb7u3_all.deb) ... Processing triggers for man-db ... Setting up dnsmasq-base (2.62-3+deb7u3) ... Setting up dnsmasq (2.62-3+deb7u3) ... update-rc.d: We have no instructions for the dnsmasq init script. update-rc.d: It looks like a network service, we disable it. insserv: warning: current start runlevel(s) (empty) of script `dnsmasq' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dnsmasq' overrides LSB defaults (0 1 6).
Change dnsmasq configuration
$ vim /etc/dnsmasq.conf
set the options:
interface=eth0 dhcp-range=192.168.101.100,192.168.101.200,12h dhcp-boot=pxelinux.0 enable-tftp tftp-root=/tftpboot/ dhcp-option=3,192.168.101.1 dhcp-option=6,8.8.8.8,8.8.4.4
Restart dnsmasq
service dnsmasq restart
Make PXE Netboot Images
Make the images available via the PXE server with the following commands:
mkdir -p /tftpboot cd /tftpboot # for 32 bit systems: wget http://repo.kali.org/kali/dists/kali/main/installer-i386/current/images/netboot/netboot.tar.gz tar zxpf netboot.tar.gz rm netboot.tar.gz
Errors
Doing a basic install, the installer would download files from the Debian release repository. But after it got to 100%, it would give me a red screen and an error about a bad archive mirror.
This was really, really frustrating, not least because everyone who asked this question online got the same, unhelpful, irrelevant answers.
- http://serverfault.com/questions/240942/bad-archive-mirror-using-pxe-boot-method
- https://forums.kali.org/showthread.php?3313-Bad-archive-mirror-How-to-solve-this-one
- https://community.rackspace.com/products/f/45/t/1147
- http://ubuntuforums.org/showthread.php?t=1748181
- http://www.linuxquestions.org/questions/linux-newbie-8/bad-archive-mirror-on-debian-wheezy-install-4175510400/
- http://askubuntu.com/questions/392874/ubuntu-server-12-04-bad-archive-mirror
- http://askubuntu.com/questions/385627/why-did-i-a-get-a-bad-archive-mirror
- https://www.storagecraft.com/support/forum/install-error-bad-archive-mirror
- https://forums.kali.org/archive/index.php/t-118.html
And not a single answer that worked. All the threads are dead, or ended mid-conversation. The last one looked halfway promising, but nope.
My Solution
I gave up on a network install and put a Kali Linux iso onto a jump drive. Instructions here.
Bootable Kali USB jump drive
To put a Kali Linux iso onto a USB drive...
First, download the iso file for the right distribution. Put the iso on a computer with Linux. Plug the jump drive into the Linux computer with the iso file.
From the Linux computer, run the following command:
dd if=kali-linux-1.0.9a-amd64.iso of=/dev/sdb bs=512k
Make sure you know which /dev/sdX is your jump drive, and which is your hard drive! You can list your disk partitions with the command:
fdisk -l
The dd command will put the iso onto the jump drive:
root@mars:/iso/kali-linux-1.1.0a-i386# dd if=kali-linux-1.1.0a-i386.iso of=/dev/sdb bs=512k 6058+1 records in 6058+1 records out 3176333312 bytes (3.2 GB) copied, 542.667 s, 5.9 MB/s
took about 15 minutes.
Installing on Jupiter
SImple, easy, just had to hit F10 when booting to get into the bios and change the boot order to boot from USB first.
After that, I booted into the installer and was on my way in no time, without any of the problems I was seeing about bad repository mirrors when I used the PXE network boot method.