Jump to content

[Tutorial] Partitioning a USB stick for regular use whilst having a hidden installer

dfsdfgfkjsefoiqzemnd

Here's a handy guide for partitioning USB sticks.  I took it down a while ago because of changes, but here's the new version from september 2017

 

Windows only shows 1 partition on USB drives, so you kinda need to trick it into showing the one you want. 

It's doable, but it'll involve some work.  Just follow this guide.  Don't let the length of it bother you, it's that long because I thoroughly explain every step. 

 

Part 1 :

 

1) First, download your tools.  You'll be needing 2 things :

- EaseUS Partition Master (link).  The free download does the trick, no need to buy the pro or server version.

During installation it'll suggest buying the pro version.  Also "Join the Customer Experience Improvement Program" is selected by default and it'll prompt you to install more of their tools and join their newsletter.  Do with that as you please, I tend to turn that stuff off.

- Universal USB Installer (link).  Rufus etc MAY work, but I'm not sure how they handle partitioned sticks.  I know that UUI does it just fine, so I'm sticking with that.

- oh, and you'll be needing a Linux .iso too, of course. 

 

2 ) Insert your USB stick and open Partition Master.  For this guide I'll be using a 32GB Verbatim drive

 

USB_partition_guide_step_02.jpg.cc0b795af5ba1aefa521669089f5ffe0.jpg

 

3 ) Right-click the drive, select "delete partition", in the pop-up window press "OK" to confirm. 

At this point you haven't actually deleted it yet.  The change will only happen if you click the "Apply" icon near the top left of the Partition Master window.  But we're not doing that just yet.

 

4 ) create a new logical partition for Windows.  I'll be giving mine everything but the last 5GB of the stick.  (EDIT : this turned out a bit much, 3GB would have been sufficient)

You can reduce the partition size either by using the down arrow next to "partition size" window, or by dragging the right-hand edge of the yellow square in the picture below.

Don't worry about the unallocated space before the partition, we'll get rid of that later.

 

USB_partition_guide_step_04.jpg.7740dd64a4dae1c0851bff23194f5201.jpg

 

5 ) in the top left corner of the Partition Master window, click "Apply".  Confirm in the pop-up menu that you want to do the pending operations.

At this point all partition changes will be written to the USB drive.  This could take a while, just wait for the program to indicate that it's done. 

 

6 ) right-click the unallocated space and create a new primary partition. 

You'll get a prompt that Windows will only recognize the first primary partition etc.  Just click "Yes" to confirm.

You'll want to give this partition all the size you have left, as this is what we'll turn into our Linux live stick. 

Format-wise, I prefer FAT32 for this one.  NTFS may or may not work, in the past these live sticks were always FAT32 so I'm sticking with that.  It's not like you'll be putting 4GB+ files on this partition.

You won't be able to assign a drive letter at this point.  Don't worry about that.  It'll automatically get one after step 7.

 

USB_partition_guide_step_06.jpg.3bab7b819c02efabc8af1d691f4377ca.jpg

 

7 ) once again, click "Apply" to actually create the partition.  Once it's all done applying the changes, you'll end up with your stick looking something like this :

 

USB_partition_guide_step_07.jpg.91b15dc9950e1b3ea5a249aa35e2c6d0.jpg

 

 

In the past I used to do all partition changes in one go, but while re-writing this guide I came across some errors if I tried it that way.  So I now do the changes one partition at a time. 

 

 

 

Part 2 :

 

Now we're switching to Universal USB Installer. 

 

8) Open the program (it's a standalone application, so no install needed). 

- Step 1 : select your Linux flavor.  I'll be installing Mint 18.1 32bit on mine (I prefer 32bit live sticks, a 64bit stick is useless to me if I encounter an old 32bit machine)

- Step 2 : browse to the location of your .iso file

- Step 3 : point to the USB drive you'll be installing onto.  It'll only show the partition you've set up for Linux.

 

USB_partition_guide_step_08.jpg.81fcf633270246a3e3d597511c04fe72.jpg

 

 

I gave my Linux a 1GB persistent file.  The persistent file will allow you to write changes to the drive, for example wallpaper changes or tools you want to install on your Linux live stick.  1GB should be plenty for most people, certainly is for me.  If you made the partition big enough, you can give it more.  Just know that larger persistent files will mean that it may take longer to boot or shut down (changes made during the session are stored in RAM and only written to stick on shutdown).

 

Little tip : if you drag the persistent file size slider all the way to the right (4096MB), select "format as FAT32" or "Format as NTFS" and then de-select it again, the value will change to whatever the maximum actual size for the persistent file is.  If you have more than 4096MB after the install, it'll stay at 4096.  However if you have less, it'll show less.  In my case I had 3500-ish MB, indicating that I could have made my persistent file up to 3.5GB ... or could have given the Windows partition 2GB more and made the Linux one 2GB smaller.  Oh well, I'm not going to re-do everything to optimize the disk usage and take new screenshots.

 

IMPORTANT : DO NOT let UUI  actually format the drive, it will use diskpart to wipe all partitions and create one big one that spans the entire stick, thereby undoing everything you did in steps 2-7.

 

9 ) click the "create" button and confirm the pop-up window.  Then wait until UUI confirms that it's done.  This could take a while, it needs to extract gigs of data from the .iso file and write that to the stick.

 

At this point you'll have a Linux live stick with a huge hidden partition in front of it.  Now let's head back to Partition Master.

 

 

 

Part 3 :

 

10 ) near the top left corner, hit the "Refresh" icon and wait for Partition Master to update. 

 

11 ) right-click the Windows partition, click "Convert to primary"

 

12 ) right-click it again, click "Resize/Move partition".  In the pop-up menu, push the up arrow next to the "partition size".  This will reclaim that unallocated space I mentioned in step 4.

 

13 ) near the top-left corner, click "Apply".  Confirm and let the program do the necessary changes.

 

 

You're all done now.

Congratulations, you now have a slightly smaller empty stick for use in Windows, with a hidden active partition that allows you to boot into Linux.

USB_partition_guide_step_13.jpg.f50b3c20f5e964a3c37d4dcfee56ba9f.jpg

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

it's also a way to stick a nasty little autorun that bypasses a lot of windows security, and downloads....lets call them targeted files onto your hidden partition.

 

It's a very old hacker trick that found a socially acceptable use in the mainstream.

 

Actually a very good guide. thank you.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×