Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: jstar on July 17, 2013, 05:14:37 AM

Title: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: jstar on July 17, 2013, 05:14:37 AM
created a tutorial that shows how to install puppy linux on USB with electrum.

this is based off my trials and errors. i hope it gives something back to the community.

best lightweight OS i've used so far, boots off an image and runs entirely in memory. i use this OS for everything these days. At your friend's and they have 90 IE toolbars? reboot with this and you have your own private OS. comes built in with a lot of media stuff too.

note: i havent added the instructions yet but, this works for alt coins too (trick is to put the block chain in another partition and symlink the wallet from the encrypted space)

I'm going to try and paste the contents here (raw wp xmp)... the formatting is better than just C/P from output:

This tutorial will walk you through creating a portable encrypted bootable USB bitcoin wallet (among other things).


Boots off of secure OS every time, very low chance of infection
Your own mobile computer!
Easily backed up, just copy one file
Runs entirely in memory
You can use this bootable drive to do sensitive things on sketchy computers

You have to follow some moderately challenging instructions

To follow this tutorial, you will need the following:

USB Drive (16+GB Recommended)
Personally I've been through quite a few USB drives. Right now I'm using a Corsair Stealth. So far no issues
A working computer that you trust


We need a few things before we begin:

Download and Install a virtual machine. This tutorial will assume you will use Oracle's VirtualBox

Download the Puppy Linux bootable ISO (precise 5.6.1 is assumed)

Download YUMI
Be aware, the "download" button that you first see at the top is an advertisement thing and is not the right link, scroll down about half-way for the correct download YUMI button

The tutorial is organized in sections. Attempts were made so that each step was documented. Please read the entire thing before deciding to skip ahead.

The Steps:

  • Installing a Virtual Machine (VirtualBox) and Booting Puppy Linux for the First Time
  • Preparing the VM Harddrive for Use
  • Encrypting our Home Folder
  • Creating a Backup Copy of Puppy Linux
  • Updating The Repository
  • Installing Python-qt and Dependencies
  • Install Electrum
  • Copying Puppy Install to USB Drive
  • Booting into Puppy Linux from the USB Drive
  • Celebrate by Buying Us a Beer

Installing a Virtual Machine (VirtualBox) and Booting Puppy Linux for the First Time

We are going to create a virtual machine for our initial Puppy Linux install.

This allows us to create our initial install without having to re-boot our host system a bunch of times; this is helpful when you are trying to follow a tutorial
You can skip this section if you are installing directly onto a USB; however follow the instructions in the rest of the guide for installing QT, etc.

Open VirtualBox
Create a new VM (virtual machine) by clicking the "New" button in the toolbar at the top-left
Click create a new operating system
Give the machine a name. This tutorial will use "BTCPuppy"
Designate the type as Linux
Designate the version as Ubuntu
Click allocate the memory (you will want to allocate around 2 gig of memory)
Click create virtual hard drive -> Click next
Click VDI, and then next.
Click fixed sized (this part of the process will take about 20 minutes or longer to load so grab a beverage) -> then click next
Click on 16 gig -> then next
Click create
Click on the virtual machine you just created (BTCPuppy) to start the virtual machine
It will ask you to select a host virtual optical drive, choose the ISO file you downloaded in the prerequisites stage (Puppy Precise Linux) by clicking on the folder with the green arrow in the bottom right of the window
When you click on the folder icon find and select the Puppy Precise downloaded above -> then click start

Pro-Tip: You may receive a message in the puppy window that the current OS does not support mouse pointer integration, just click OK. When Puppy Precise OP system is open you may notice that the mouse starts to go a bit funky. You will see that once you try to control the mouse to the top of the window it will split and show two different cursors. To stop this from happening, press ctl+i. Make sure that you use the ctl button on the right side of the keyboard. The right ctrl button will also help you switch your cursor between the virtual puppy machine window and the host OS (Windows desktop for example). Also remember: If this is your first time using Linux, you will only need to click on something once, e.g. an icon. If you are a windows user you maybe used to double clicking, remember that in Linux you do not need to double click to get something running.

Preparing the VM Harddrive for Use

Since BTC is using the Electrum client you may follow just steps 1-10 and set the size in step 8 to the maximum
The extra space is for alt client, like PPC, LTC, the satoshi btc client, etc... so we can store the block chain separate from the wallet
The main reason is the encrypted home drive will only be about 1GB big, far too small to store a blockchain
The block chain is stored on an unencrypted second partition (ext3). This does not compromise your wallet in any way
With Puppy Precise open, right click the Puppy desktop screen -> then go down to "go to system,"  -> then go to G parted Partition Manager
Click on sda internal drive Desr: ATA harddisk  ->then  ok
Click and highlight unallocated drive
Click device -> then click create  partition table -> then apply
Right click on the unallocated drive -> and select "new"
How big do you want it? You will want to keep some room on the new drive so you will want to change the new size to 8,000 MiB
Set the file system type to fat32
Label the new partition if you want to (this is not necessary)
Click Add
Right click on the unallocated drive again (this is left over unallocated space) -> then click New
The new size will be default
Change the file system to ext3
Label this partition "Block Chain." The block chain is far too large for the encrypted space we allocate so we will use this partition later to store just the blockchain files
Click apply next to the undo button in the top tool bar of the GParted window. It will begin to apply the changes to the allocated drives. When you are prompted to, do not click save, but click cancel

Encrypting our Home Folder

We'll pause at this point and save our initial session. in addition it will allow us to keep things persistent between reboots.

Right click on Precise Puppy desktop screen
Select shutdown and then reboot computer
Click save to file
Then you want to select Administrator -> Press continue
Select sda1: vfat
Select ext4
Give it a name, this tutorial will use BTCPuppy
Select heavy encrypted
Put in a password and click OK. (Write this password down)
It will ask you to select the size of file that you want to save. Pick any size, but it is suggested to choose 1Gig -> then click OK
Click "Yes, Save" (when the next screen appears do not click OK)
Click copy
The computer will reboot (do not click OK)
When the machine reboots you will be prompted for your password. Enter the password you created in step I. Remember this password, it will be the password you will use when you boot into your Puppy Linux off of your USB drive

Creating a Backup Copy of Puppy Linux

This step is important. We will continue to work from the initial file but we'll create a backup. This way we have a fresh copy we can revert to if necessary.

In the bottom left hand corner of the desktop click on the sda1 icon
Right click on precisesave-crypta-clean4sf
Click copy
Rename copy, this tutorial we will use BTCPuppy_copy. Rename the copy to something that you will recognize, yet will distinguished it from the initial file you created.

To connect to the Internet in Puppy Linux:

Click on the console icon on the Puppy Linux desktop
Select the interface of your Internet and then click on the button that corresponds to that interface (either eth0, wlan1, wlan 2, ect.)
For Wireless:
Click on Wireless
In the top right of the window click on Scan -> then select your Internet network and click OK
Select what type of encryption you have
Enter your Shared Key (your Internet password)
For eth0, just click the eth0 button
regardless of device:
Click save -> then "Use this Profile"
Next Select Auto DHCP -> then OK
Click Done, and you should be connected to the internet

Updating the Repository

To begin to update the repository click install on the desktop
Run the puppy package manager by clicking on it in the window
Click on configure package manager in the bottom left hand corner of the window
Click update now. At this point it will go through several screens where all you need to do is press enter. The last window to pop up will take some time to finish doing its thing, so, be patient and grab a sandwich and another beverage
When the computer is done doing its thing, close all the windows on the desktop

Installing Python-qt and Dependencies

The next several steps include a series of downloading support packages so that Puppy Linux and Electrum run properly.

Using python-pip-1.0 as an example:
To begin, click on the install icon on the desk top
Click puppy package manager
In the bottom left hand of the puppy package manager window console search for python-pip-1.0. When prompted to, click on search all repositories. When you find it in the search window, click on the package to install the package
Click on examine dependencies (Note: throughout this process when it ask you to examine dependencies, make sure that you click the option to examine dependencies)
Click Download and install selected packages
Click Download packages
Click check for missing dependencies

From puppy package manager follow these steps to install the following packages and dependencies:

Install Electrum

Open your browser in puppy and go to and download Electrum
Down the page you will see it says Install Electrum
Highlight the address from pip to the right (do not highlight the phrase "sudo" on the line)
Right click and copy
On the desk top, click the console icon and open a new window shell
Either hit the middle mouse button or the left and right button on your mouse at the same time to paste the copied line into your console shell (If this doesn't work, you are going to have to type the entire highlighted address into your console window)
Hit enter. This will begin to install the Electrum client

To see if it runs, type in "electrum" into the command line of the the shell. If it was a successful install, you should have an Electrum window pop up
When wallet is not found, click on create. *Make sure to write down the twelve words (seed) that the Electrum client will give you. Keep these safe! It will also ask you to retype the 12 word seed in again
When prompted to, make a new password, the longer the better. Make sure to write down your password, you will need this to make bitcoin transactions
You Now have a bitcoin wallet. At this point you want to be able to verify that you have the same wallet that you just created, so, click receive in the wallet window and write down the first couple of characters
Right click your desktop background and select restart -> then reboot
When your computer has restarted, go into your console
Type "electrum" and hit enter
Click on receive, and take note of the top bitcoin address and verify that those characters match the characters written down in step K. With this address you can start to receive and send bitcoins

Copying Puppy Install to USB Drive

Plug in your USB to the computer
From the Windows desktop (not the Puppy Linux desktop)
Click Run -> then "I agree"
Select your USB drive
Under distribution select Precise Puppy Linux
Browse for presie-5-5.iso, which was downloaded earlier
Click create -> then yes -> then next -> then no (when you are prompted to create more ISO drives) -> finally click close
In Puppy Linux, you will see a USB icon in the bottom right corner of your screen, click on the USB icon and select your USB drive
You should see an sdb1 icon appear on the bottom left of your Puppy Linux desktop next to the sda1&2. Click on the sdb1 icon and open it up
Click on multiboot -> followed by precisepuppy. Move the window to the side
Go to sda1 on the desk top and click on it
Click and drag encrypted precisesave-crypta-clean.4fs (not the copy BTCPuppy_copy, which we created above) into the open USB window to the side
Click copy
Sit back and wait
You should be able to boot into Puppy Linux directly from the USB drive now.

Booting into Puppy Linux from the USB Drive

From this point, here are the steps that you will need to follow to boot into your Puppy Linux from the USB drive. Please note that your computer must be completely shutdown before you begin this process.

Insert your USB drive loaded with the encrypted Puppuy Linux into you computer's USB port
Start your computer
Every computer is different, there's no one correct startup option sequence. refer to your documentation if necessary but usually:
Once the computer begins to load press escape to exit the splash screen. Make sure that you press escape before your operating system (e.g. Windows) begins to boot, if this happens you will have to restart you computer and do it again.
Then you want to hit the button that allows you to select your boot sequence. it's usually DEL, F5, F6, F11, F12, ESC. Usually there's a quick notification to the extent of "F12 for boot options" or similar.
A blue boot window will appear. Press the down arrow and highlight your USB Drive and press enter
Select Linux Distribution
Select Precise PuppyView Item
Select "Run Precise Puppy from this USB" and press enter
When prompted to enter your password and press enter (you will not see any "*" or characters appear when you enter your password, so don't worry finish entering your password and press enter. You will know if you entered it correctly)
Welcome to your Encrypted Puppy Linux running off of your USB drive!
To run Electrum: Click on the console and type "electrum" into the command line and press enter. To make BTC transactions you will have to make sure you are connected to the Internet.

One final thing (*REMEMBER THIS AND DO NOT FORGET IT, IT IS IMPORTANT*): When shutting down Puppy Linux (right click desktop -> Shutdown -> Power-off Computer), DO NOT, and I repeat, DO NOT remove your USB stick from the USB port on your computer until the computer is completely shut down. If you remove your USB drive before your computer is completely shut down, you could corrupt the Puppy Linux file and lose everything.

Celebrate by Buying Us a Beer

When all is said and done, you can now take your encrypted USB drive that holds your encrypted BTC wallet, and boot into any computer that you want, just by plugging your USB drive into the computer.


Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: jstar on July 17, 2013, 05:30:25 AM
oh gawd, the formatting! ok well i'll format it properly for this forum once i get a min.

please, please, let me know if i missed any steps, or if you run into errors... i've overcome a lot of wacky scenarios that are hard to reproduce so i might have the answer to your question already.

working on creating a TLDR version that doesnt involve the VM... should be avail soon.

Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: Stephen Gornick on July 17, 2013, 07:12:16 AM
created a tutorial that shows how to install puppy linux on USB with electrum.

this is based off my trials and errors. i hope it gives something back to the community.

Very nice, thank you for sharing this.

If it is of any help, there is another similar project, BTC Vault (using SLAX), which puts together a distro then describes how to verify the source is authentic:


Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: bitcats on July 17, 2013, 07:48:02 AM
Why you use YUMI instead of UUI (Universal USB Installer)?

Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: on July 17, 2013, 08:02:46 AM
Nice tutorial dude, bookmarked :D

Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: jstar on July 18, 2013, 01:43:47 AM
edited for formatting and content.

If it is of any help, there is another similar project, BTC Vault (using SLAX), which puts together a distro then describes how to verify the source is authentic:


I've not tried SLAX yet. i'll give it a shot, thanks for the tip. OOC what is it about SLAX that you like in particular?

Why you use YUMI instead of UUI (Universal USB Installer)?

I used to use UUI and actually preferred the boot screen, but for some reason it would have issues booting on some laptops or older computers. I'm no master GRUBber and i've found YUMI seems to work on a wider variety of computers, YMMV.

Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: jprice on July 18, 2013, 04:00:36 AM
Nice. Gonna download and give it a try.

Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: cypherdoc on July 19, 2013, 02:32:21 PM
this is a great project.

let us know when you redo it w/o the need for a VM.

Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: NewLiberty on July 19, 2013, 02:55:48 PM
You might consider making and selling these for the lazy among us.

Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: flagel8 on July 30, 2013, 05:09:36 AM
I like to run Puppy Linux in RAM with my hard drives powered off. But any changes I make to my Electrum wallet dat on my USB stick should show up if I start Electrum  from the seeds on another computer, even if I shut down the computer with the USB removed, should it not? (Assuming I start the new Electrum WITHOuT the USB stick on the new computer.) Or is my understanding of how Electrum works flawed? Sorry for the rambling incoherence, and/or rude hijacking.

Title: Re: Portable Encrypted USB Bitcoin Wallet (Puppy Linux, Electrum)
Post by: brightday on October 25, 2017, 08:35:33 PM
To revive this 4 year old topic a little bit, there is a completely new video-recorded tutorial on how to install electrum in puppy linux and make it offline bitcoin wallet. Hopefully it will be helpful: