PDA

View Full Version : Is it possible...



Prince_of_Light
2016-08-31, 14:10
To do this (http://askubuntu.com/questions/423300/live-usb-on-a-2-partition-usb-drive) with Kali?

My ultimate goal here is to get Kali to boot from the second partition so that I can have a storage partition in the first position (for windows) in exFAT on a flash drive. My ideal setup would be a bit different than the one mentioned in the link though, I want it to look like this:

partition 1 - ~100GB: fat32, to be changed to exFAT in windows for storage
partition 2 - boot flag, 4GB: fat32, to hold kali
partition 3 - 10GB: ext4, persistence for kali

If any of you can get this to work, please let me know how you did it. The partitioning should work in theory if I check the boot flag for partition 2 but I'm unsure of how to get a working copy of kali onto the second partition to begin with. I'm also wondering if the hidden flag will make it so windows will only detect later partitions. This whole thing would be so much more simple if exFAT was a bootable filesystem...

Prince_of_Light
2016-08-31, 17:08
Update. I've tried everything I can think of, and I'm sticking with my usual setup of using Universal USB Installer on a fat32 filesystem with a bit of ext4 persistence on the end unless I can come up with something else.

1. I tried flagging the second fat32 partition with the boot flag. This doesn't work, but it may be due to the fact that I can't get a bootable install of kali on the second partition. I have yet to try installing kali on the first partition and then shrinking it, but I have a feeling that won't work because windows' recognition process seems to depend more on which partition is first in terms of order (/dev/sdb1, sdb2 etc), and also because shrinking a partition with data on it is known to corrupt the data in my experience.

2. The other option was to set the kali partition first and flag it as hidden to make windows default over to the now second fat32 partition, to be reformatted as exFAT. For whatever stupid reason, changing these flags doesn't seem to affect how windows recognizes the partitions. At first I thought it was because I read somewhere that gparted doesn't correctly handle the flag-changing operation, so I tried it with some other utilities. Moving on to part 3...

3. I tried changing the hidden flag with diskpart.exe, it doesn't let you do it because the device is considered removable. >_>'

4. I tried changing the hidden flag in BOOTICE. It seemed to work, as it looked to be hidden from BOOTICE, but windows was still recognizing it as the partition to load.

5. As a result of the fact that I can't change flags on removable media using diskpart.exe, I made failed attempts at flipping the removable bit with a couple of tools. I haven't tried manually changing any hexes as I don't understand any of that nonsense, though that could potentially solve the issue.

At this point I'm starting to look beyond chasing this problem down and instead at the pros and cons of my other options, which are as follows:

1. If the plan I'm attempting does work, I can use exFAT to store things while still booting from Kali. This is great because I can move large files (> 4GB) on Windows and Mac, and it would effectively be impossible to accidentally destroy Kali in Windows since it would be on a different partition. The only issue there is that linux doesn't seem to recognize exFAT as a valid file system without installing some utilities beforehand. This can be an issue with Kali if I want to just run it live to be able to move files to and from the storage part.

2. I could format my current setup (FAT32 storage with EXT4 persistence) to use NTFS instead of FAT32, which would allow me to copy large files. The issue here is that NTFS doesn't work on Macs, and I've read conflicting reports about how much it reduces your USB's life cycle. Some more information on how much this actually affects the life cycle would be appreciated.

3. I could stick with what I've got (FAT32 storage with EXT4 persistence), but that means I'm stuck only moving files that are less than 4 GB in size, though this problem isn't a huge deal since you can apparently use file compressors to split larger files.

So it looks like for the time being I can't have everything I want unless exFAT miraculously becomes UEFI compatible while also natively usable in Linux without having to install more things. I haven't yet needed to move gigantic files but it would be nice to only have to sneakernet it rather than running it through some kind of complicated compression process which is necessary on FAT32.

Prince_of_Light
2016-08-31, 19:06
Update. Tried the solution listed in post 3 of this thread (https://forums.kali.org/showthread.php?18514-kali-live-boot-usb-%28persistence%29-fat-32-partition-windows-7), it didn't work for me. I got an error while installing grub which said: "error: will not proceed with blocklists". Help?