3

I'm endeavoring to put Kali linux onto a USB stick - I know it's already written up, but I'd like to use only a portion of the total space (the aforementioned link will use the entire drive space).

Let's have my 16GB usb stick mounted as sdb ... the goal is:

16 GB total, split like this...
----------------------------
|     11     |  01  |  04  |   (GB)
----------------------------
     sdb1      sdb2   sdb3     (partition ID)
     FAT32     FAT32  FAT32    (format)
    storage   fatdog  kalipart (label)
  • sdb1 is FAT32 and the main storage area (so that [windows can see it][2] along with any other OSes)
  • sdb2 is bootable and has Fatdog64 (6.3.0) and Precise Puppy (5.7.1) installed (multi-booting from one syslinux menu)
  • sdb3 is the target partition for Kali to use

The objective is to multi-boot Fatdog64, Puppy, and Kali linux. Currently, sdb2 is bootable (syslinux) and successfully passes to Fatdog and Puppy, both on sdb2. Next I'd like to add chainloading to Kali on sdb3. It seems to me that the best way to do that is to load GRUB4DOS from syslinux (both on sdb2), map sdb3 and chainload to sdb3 from GRUB4DOS.

So I ask: How do I install Kali onto an existing partition on this USB stick?

Other options:

  • Install live Kali onto the USB stick/partition from the Kali distro itself - but this doesn't seem to be an option the same way it is with Fatdog/Puppy/Ubuntu
  • Boot direclty to sdb3, chainloading to sdb2 if necessary (not preferred, but an option)

Update:

  1. I have tried copying the files from a mounted iso to sdb3 using Fatdog64 and noticed several errors, mostly in copying the firmware files. Here's two examples:

    Copying /mnt/+mnt+sda1+isos+kali-linux-1+0+6-i286+kali-linux-1+0+6-i286+iso/firmware/amd64/microcode_1.20120910-2_i386.deb as /mnt/sda3/firmware/amd64-microcode_1.20120910-2_i286.deb
    ERROR: Operation not permitted
    Copying /mnt/+mnt+sda1+isos+kali-linux-1+0+6-i286+kali-linux-1+0+6-i286+iso/debian as /mnt/sda3/debian
    ERROR: Operation not permitted
    

    These errors look like permissions errors, but I can't tell if they affect booting or not (I can troubleshoot other errors later, I'd prefer to keep this question to just multi-boot).

  2. I'm chainloading GRUB4DOS from the SYSLINUX installed by default via Fatdog64 ...

    label grub4dos
    menu label grub4dos
    boot /boot/grub/grldr
    text help
    Load grub4dos via grldr (in /boot/grub)
    endtext
    

    ... and then once in GRUB4DOS, I have successfully chainloaded GRUB2 (on the kali partition) ...

    title Load GRUB2 inside of kali
    find --set-root /g2ldr.mbr
    chainloader /g2ldr.mbr
    

    ... but all this gives me is a grub> prompt, and I haven't figured out any proper combinations of GRUB4DOS commands to load GRUB2 with a GRUB2 config file - and to add to the confusion, I thought the live CD iso of Kali ran on syslinux. (@jasonwryan @user63921)

1

3 Answers 3

0

I would write zeroes to sdb3 in linux:

dd if=/dev/zero of=/dev/sdb3 bs=32k 

Then format it as FAT32. Make sure to LABEL the volume whenever you format or reformat it. You should really label all your volumes whenever multibooting or anything else!

Then mount the full-size Kali ISO (not the mini-ISO) (or put the disk in the CDROM drive if already burned to CD)

Copy the live CD files & folders from the Kali CD or mounted ISO to the fresh FAT32 volume

I would then rename autorun.inf to autorun.NOT on the USB, then you should be able to boot to the Kali live fileset from Grub.

Syslinux will not boot from one partition to another, you are not supposed to be able to reach other partitions besides the one having the target ldlinux.sys file until future revisions of Syslinux.

Kali 1.0.6 uses isolinux 4.05 so if you were to migrate to Syslinux it would have to be version 4.05 as well.

2
  • Thanks; I tried this in the first go-round, except for the /dev/zero copy portion. The result was operating system not found, IIRC. I'll try it again though, as I think I may have been using ext2 instead of FAT32 for the formatting. I'll give it a go and report back - and thanks for the note about GRUB v. Syslinux, I thought there was something inhibiting cross-partition loading... Mar 31, 2014 at 16:34
  • I was using ext3 as the format; I reformatted that partition to FAT32 and added booting details (and partition labels) to the original post. Apr 7, 2014 at 20:09
0

Since it sounds like you are using Live ISO's rather than installing to the flash drive: The folks at Pendrive Linux created Your Universal Multiboot Installer (YUMI). They support all the popular Live ISO's and many that are new to me. Kali is there too. I've long since stopped doing this manually. You can fit as many Live ISO's as will fit on the flash drive. If the distro supports persistence you are offered the option to create a persistent squash file. Note: Runs under Windows, cant' find drives under Wine. A Linux version is in early beta.

http://www.pendrivelinux.com/yumi-multiboot-usb-creator/

Enjoy!

(not associated with the website, I just really like their FREE product)

0

Simply install into another pen-drive and copy files to specific partition where you need to be installed. Change the partion flag to bootable (Enable boot flag) in partition manager i.e diskpart, windows disk manager, Gparted... etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .