2

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)

  • When I follow the dd instructions above from Kali.org, the result is one 4GB partition, loading as sdb1. This won't work, since then Windows will see only the first partition, asking me if I want to format the drive, and not letting me access any other [larger] partitions for USB storage. I have tried dd-ing the kali.iso to sdb3, but I get an error: isolinux.bin missing or corrupt. – user3.1415927 Apr 7 '14 at 21:00
  • Downvoter (of a five year old question(!)), care to leave a comment or constructive criticism? – user3.1415927 Jun 8 at 12:52
0

Also, if you want windows to be able to see more than just the first unhidden windows-compatible volume on a "removable" USB, then install the "Hitachi Microdrive Filter" driver using windows Device Manager for that specific USB after it has been plugged in & enumerated with the windows default driver.

That PC will then see all the windows-compatible volumes on that USB, until significant changes are made to the USB, in which case "reinstall" the Hitachi driver for that USB on that PC again.

read up on it & experiment, you will like it, any questions, reply

bootbaby.wordpress.com

  • It seems like that will only work on a single windows installation, and likely requires admin privileges ... and therefore isn't a very robust solution. Plus it doesn't answer my question at all. – user3.1415927 Mar 31 '14 at 16:31
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.

  • 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... – user3.1415927 Mar 31 '14 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. – user3.1415927 Apr 7 '14 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.