Author

Topic: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins. (Read 19600 times)

newbie
Activity: 25
Merit: 0
It is a pity that the maintainer of bitsafe is not monitoring it's own product anymore. My former posting is still relevant. Meanwhile I tried running bitcoin-qt without using the quick download method. After two days of downloading the blockchain the program crashed and I cannot restart bitcoin-qt. Dmesg barks
Quote
terminate called after throwing an instance of 'DbRunRecoveryException'
  what():  DbEnv::txn_checkpoint: DB_RUNRECOVERY: Fatal error, run database recovery
/usr/bin/wrapped_bin/bitcoin-qt.wrp: line 44: 28866 Aborted                 $WRAPPER_ORIGINALBIN -datadir=$BITCOIN_HOME -nolisten $*
At the moment of the crash db was 842MB.

I also don't know how to upgrade bitcoin-qt in bitsafe. There is no repository available in /etc/apt/sources.list. Anybody knows what repository I need for bitsafe ?
newbie
Activity: 25
Merit: 0
I donwloaded bitsafe, and ran it from a usb stick and connected it via ethernet. First thing bitsafe is asking after startup is if I want to download the blockchain, which I accept. I did this a few times, but after the download is completely finished (I see huge dat-files in /storage/bitcoins) I get consistently the same message
Code:
signature verification failed! This means that your downloaded file is invalid:
the signing key changed or your internet connection is being filtered or altered by
someone or something. Please try again in a couple of minutes


I tried it many times in a period of two weeks with the same result. Any ideas ?
legendary
Activity: 1904
Merit: 1002
Does this include armory?  I'm really only interested to simplify my air-gapped wallet setup.
hero member
Activity: 630
Merit: 500
I've noticed that the behavior is different if I run bitcoin-qt as root. It starts normally, the splash screen shows up and stays there for a while (in contrast with the immediate crash as when I run with the normal user). While the splash screen is saying "Rescanning...", it crashes with the following error message:

Code:
root@bitsafe:/home/user# bitcoin-qt


************************
EXCEPTION: NSt8ios_base7failureE       
CAutoFile::read : end of file       
bitcoin in Runaway exception       

terminate called after throwing an instance of 'std::ios_base::failure'
  what():  CAutoFile::read : end of file
/usr/bin/wrapped_bin/bitcoin-qt.wrp: line 44:  3436 Aborted                 $WRAPPER_ORIGINALBIN -datadir=$BITCOIN_HOME -nolisten $*

Does this give you any clue?
hero member
Activity: 630
Merit: 500
What do you mean by prefix? The directory? I've tried. Also, when I use the icon shortcuts, it doesn't work either (the splash screen shows up and closes almost instantly)
hero member
Activity: 797
Merit: 1017
Try to run just bitcoin-qt without the prefix
hero member
Activity: 630
Merit: 500
I'm having the following error when trying to launch bitcoin-qt in BitSafe:

Code:
user@bitsafe:/mnt/disk$ /usr/bin/bitcoin-qt 
tar: ssh: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
/usr/bin/wrapped_bin/bitcoin-qt.wrp: line 44:  3907 Bus error               $WRAPPER_ORIGINALBIN -datadir=$BITCOIN_HOME -nolisten $*

Does anyone have any idea of what this means? And, even better, does anyone have a workaround? Cheesy
hero member
Activity: 797
Merit: 1017
Now I see your point. The problem isn't on the reported local time, but on the UTC time used by the Bitcoin client. Sorry for taking so long to get it  Cheesy

I'll see how to fix this. In the meanwhile, here's a workaround to the issue tailored for your needs. Just copypaste it in a text file and save it in the same USB drive you installed BitSafe on.

Code:
#!/bin/sh

#Fix how debian reads/writes hwclock
sudo sed -i 's/UTC=yes/UTC=no/' /etc/default/rcS

#Set the timezone
sudo ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime

#Set UTC time as current(hwtime) - 8 hours.
sudo date -s @$(expr $(date +%s) - 28800)

Once done, you'll have to launch it from /live/squashfs/ before launching bitcoin. Let me know if it works!
donator
Activity: 229
Merit: 106
Can you tell me the timezone reported by date?

UTC, that's why I thought it is wrong. If bitcoin client expect UTC time from OS, it should be my local time minus 8 hours in my time zone.
hero member
Activity: 797
Merit: 1017
Can you tell me the timezone reported by date?
donator
Activity: 229
Merit: 106
The point is that BitSafe doesn't know which timezone you're on, so it (shoulds) default to UTC and not UTC+8. As you stated correctly, linux expects the hwclock to be in UTC, so UTC=UTC-> it just takes its time as it is, hence giving the correct local time (if the main OS is Windows). In fact, my Windows PC shows the correct time when runs bitsafe even if i'm on CET/CEST.
Maybe your hardware clock is able to tell the OS on which timezone it's set, or maybe Windows is doing some weirdness. We'll know better with the output from date  Smiley

Which localization are you choosing at boot?

I choose English. The output from "date" command is exactly same as my local time, but it is wrong because it should be local time-8 in my case. Besides, the bitcoin client always complaint the incorrect time and keep saying the block chain data is behind 8 hours even it already downloaded latest block(I compared the block number with bitcoinwatch.com).
hero member
Activity: 797
Merit: 1017
The point is that BitSafe doesn't know which timezone you're on, so it (shoulds) default to UTC and not UTC+8. As you stated correctly, linux expects the hwclock to be in UTC, so UTC=UTC-> it just takes its time as it is, hence giving the correct local time (if the main OS is Windows). In fact, my Windows PC shows the correct time when runs bitsafe even if i'm on CET/CEST.
Maybe your hardware clock is able to tell the OS on which timezone it's set, or maybe Windows is doing some weirdness. We'll know better with the output from date  Smiley

Which localization are you choosing at boot?
donator
Activity: 229
Merit: 106
That's odd: BitSafe's default tz should be UTC, and that shouldn't introduce any offset to the time reported by your hardware clock, which should be set to local time already by Windows.
Can you please launch the terminal and paste here the output of the "date" command, timezone included, along with the correct local time?
My understanding is a bit different: Windows sets the hardware clock to local time(in my case, UTC+8) and BitSafe expects UTC time, so the time is offset +8 hours.
After a little bit google, I need to edit /etc/default/rcS and change the UTC=yes to UTC=no and add TZ='Asia/Hong Kong' to ~/.profile. But I don't know how to make these changes persistent, do I have to edit filesystem.squashfs to make it persistent?
hero member
Activity: 797
Merit: 1017
That's odd: BitSafe's default tz should be UTC, and that shouldn't introduce any offset to the time reported by your hardware clock, which should be set to local time already by Windows.
Can you please launch the terminal and paste here the output of the "date" command, timezone included, along with the correct local time?
donator
Activity: 229
Merit: 106
Unable to download from Dropbox(error 404).

Temporary problem, fixed now.
Thanks, downloaded and tried it on my laptop. Since my laptop main OS is Windows, the clock is local time. How to config this system to aware my clock is not UTC? And persistently? Because the Bitcoin client will constantly try to download block chain even after last block has been downloaded(my time zone is UTC+8).
hero member
Activity: 797
Merit: 1017
Unable to download from Dropbox(error 404).

Temporary problem, fixed now.
donator
Activity: 229
Merit: 106
Version 0.6.1B released.

  • Added a script to download and install the latest (daily) blockchain image from this archive
  • Storage partition size increased to about 3.5 GB.
  • Random data filling of the storage partition has been disabled by default.
  • Changed bootloader splash image

Unable to download from Dropbox(error 404).
hero member
Activity: 797
Merit: 1017
Version 0.6.1B released.

  • Added a script to download and install the latest (daily) blockchain image from this archive
  • Storage partition size increased to about 3.5 GB.
  • Random data filling of the storage partition has been disabled by default.
  • Changed bootloader splash image
hero member
Activity: 797
Merit: 1017
Version 0.6B released. Updated bitcoin client to 0.6, fixed some bugs and disabled random data filling for the storage partition on creation.
hero member
Activity: 742
Merit: 500
I like the idea of BitSafe, but theres security vulnerabilities being patched all the time.  I feel more comfortable using a live cd built specifically for security and anonymity.

Being for 99.9% a Debain stable distribution, I have very little to say about security updates and patches. I deliberately choose stable over testing for that specific reason.
That said, the main purpose of this software is to give the most secure environment to keep your bitcoin, anonymity is more about using them in a safe way, so I think it will always be secondary. If your priorities are different than you probably need something else  Smiley

I'm talking about these: http://www.debian.org/security/2012/

They usually have patches for both oldstable, stable, and unstable.  The vulnerability in ffmpeg are probably less of a worry than the oones in openssl, iceweasel, and ecryptfs-utils.

hero member
Activity: 797
Merit: 1017
I like the idea of BitSafe, but theres security vulnerabilities being patched all the time.  I feel more comfortable using a live cd built specifically for security and anonymity.

Being for 99.9% a Debain stable distribution, I have very little to say about security updates and patches. I deliberately choose stable over testing for that specific reason.
That said, the main purpose of this software is to give the most secure environment to keep your bitcoin, anonymity is more about using them in a safe way, so I think it will always be secondary. If your priorities are different than you probably need something else  Smiley
hero member
Activity: 742
Merit: 500
I've started using a Tails Live CD and an encrypted flash drive with scripts similar to what you wrote for BitSafe.  I like the idea of BitSafe, but theres security vulnerabilities being patched all the time.  I feel more comfortable using a live cd built specifically for security and anonymity.
sr. member
Activity: 350
Merit: 250
hero member
Activity: 797
Merit: 1017
Is anyone able to suggest a fast USB drive suitable for this?   

Here's a brief list:

Lexar JumpDrive Lightning II
Transcend JetFlash
OCZ Rally2 Turbo
Corsair Voyager GT (rugged!)
Silicon Power LuxMini 920
Sandisk Cruzer Contour

You can check the speeds for almost any usb drive at http://usbflashspeed.com/
sr. member
Activity: 350
Merit: 250
Is anyone able to suggest a fast USB drive suitable for this?   
hero member
Activity: 797
Merit: 1017
I noticed your pull request on GitHub. I think that, given the different requirements, electrum needs a different tailored build.
On top of that, there's no point IMHO to have both electrum and the bitcoin client on the same image.
sr. member
Activity: 252
Merit: 250
I can send you a pull request to also include Electrum, would that be ok? (see more here: https://bitcointalksearch.org/topic/bitsafe-fork-with-electrum-included-54376 )
hero member
Activity: 797
Merit: 1017
New beta version released. The only real change is the updated cliento to V0.5.2. More feature will come as soon as I figure out how to fix this damned transparent TOR routing.
hero member
Activity: 797
Merit: 1017
I'll release a version with the last official client within tomorrow.
hero member
Activity: 798
Merit: 1000
Bump...   Be nice to have a new version,  if only for the latest bitcoin client Smiley
hero member
Activity: 742
Merit: 500
Any interest in this with Armory installed?  Armory is heavier weight right now than I think BitSafe was originally designed, but it looks like an awesome client.
hero member
Activity: 797
Merit: 1017
Hi! No, development hasn't stopped. To upgrade the bitcoin client to 5.1 you have to rebuild the image, it's an easy task but you need a functional debian system to do that, which doesn't seem to be your case. Just wait my next release  Smiley
hero member
Activity: 798
Merit: 1000
I'll wait, just wasn't sure if development had stopped...
hero member
Activity: 742
Merit: 500
Stupid question alert!

I'm not good with Linux.  At all.   How do I go about updating bitcoin to 0.5.1 in this installation?

Thanks Cheesy
If you aren't good with linux.  Wait until rb1205 comes out with a new IMG for you to use. That, or start learning Smiley
hero member
Activity: 798
Merit: 1000
Stupid question alert!

I'm not good with Linux.  At all.   How do I go about updating bitcoin to 0.5.1 in this installation?

Thanks Cheesy
hero member
Activity: 742
Merit: 500

What would you suggest to use on a Mac? I tried Disk Utility and I got: "Restore Failure - Could not validate source - Invalid argument"


I found this miniguide, as said you should be able to use dd as on Linux, but you have to unmount the device first.
Oh yeah. I forgot about that step.  Un-mounting the flash drive should let dd work.  Don't eject it though.
hero member
Activity: 797
Merit: 1017

What would you suggest to use on a Mac? I tried Disk Utility and I got: "Restore Failure - Could not validate source - Invalid argument"


I found this miniguide, as said you should be able to use dd as on Linux, but you have to unmount the device first.
hero member
Activity: 742
Merit: 500
Download the Binary Image file and flash it on your drive.

On Linux: sudo dd if=/path/to/binary.img of=/dev/sdX (where sdX is the name of your device)
On Windows: I recommend Image Writer. You'll need to launch it as administrator. Go pick the downloaded binary.img file, choose the letter of the drive you wish to install bitsafe on and press "Write".


What would you suggest to use on a Mac? I tried Disk Utility and I got: "Restore Failure - Could not validate source - Invalid argument"

Thanks!



Use dd.  Mac's have it and it should work exactly the same as on linux.
full member
Activity: 136
Merit: 100
Download the Binary Image file and flash it on your drive.

On Linux: sudo dd if=/path/to/binary.img of=/dev/sdX (where sdX is the name of your device)
On Windows: I recommend Image Writer. You'll need to launch it as administrator. Go pick the downloaded binary.img file, choose the letter of the drive you wish to install bitsafe on and press "Write".


What would you suggest to use on a Mac? I tried Disk Utility and I got: "Restore Failure - Could not validate source - Invalid argument"

Thanks!


full member
Activity: 154
Merit: 102
Bitcoin!
Interesting project.
hero member
Activity: 742
Merit: 500
Have you seen rsnapshot?  It is a super simple way to do backups.  The only problem is that it doesn't have any sort of encryption.  maybe if you connected it with truecrypt, that could work.

In my searches, I also came across http://duplicity.nongnu.org/. I haven't used it yet, but it sounds like it would be easy to do encrypted and compressed backups.


EDIT: You really do have strict firewall rules!  I added some code to "tor-route-disable" to get bitcoind and namecoind to accept rpc commands.

Code:
#Allow loopback connections to bitcoind and namecoind
iptables -A INPUT -i lo -p tcp --dport 8332 -j ACCEPT
iptables -A INPUT -i lo -p tcp --dport 9332 -j ACCEPT
hero member
Activity: 797
Merit: 1017
Is there anyway to make this encrypted storage larger? I am running both bitcoin and namecoin and need the storage to be larger.
Sure, just edit the BITSAFE_MIN_FREE variable in the bitsafe.live.conf. Now that I look at it, it's really a bad name.... I'll change it to something more intuitive.

I'll be installing this tonight, good work Smiley   I agree though that I'd much prefer the current blockchain (or most of it, obviously) to be included by default.    It's such a painful task downloading that thing, I hate doing it Sad

On that note, I'd love to see Electrum included with this in the future.  Would make a good match I think.
I'm working on a script that downloads, checks and installs a copy of the chain from a trusted source.
Regarding alternative/thin client, for now i'll stick with the official client only.

Quote
Is there any chance you can include Truecrypt as part of the default install?    That'd be awesome Smiley

Well, Truecrypt could be useful for managing backups. For now, I added it on a side branch.
hero member
Activity: 798
Merit: 1000
Is there any chance you can include Truecrypt as part of the default install?    That'd be awesome Smiley
The persistent storage is already encrypted. How many times do you want to encrypt your wallet?

Fair enough Cheesy  To be fair, when I wrote that, I'd just installed BitSafe and needed a way to decrypt my already encrypted wallet.  Didn't really cross my mind that the storage partition would end up encrypted anyway, but now that I've managed to install Truecrypt once and decrypt my wallet, I won't need to worry about it again.
hero member
Activity: 742
Merit: 500
Is there any chance you can include Truecrypt as part of the default install?    That'd be awesome Smiley
The persistent storage is already encrypted. How many times do you want to encrypt your wallet?
hero member
Activity: 798
Merit: 1000
Is there any chance you can include Truecrypt as part of the default install?    That'd be awesome Smiley
hero member
Activity: 798
Merit: 1000
I'll be installing this tonight, good work Smiley   I agree though that I'd much prefer the current blockchain (or most of it, obviously) to be included by default.    It's such a painful task downloading that thing, I hate doing it Sad

On that note, I'd love to see Electrum included with this in the future.  Would make a good match I think.

https://bitcointalksearch.org/topic/announce-electrum-lightweight-bitcoin-client-50936
hero member
Activity: 742
Merit: 500
I ended up using the IMG instead of an ISO.

It took me a few steps to get it working on Mac with VirtualBox like I want it to.  (I don't have a machine that I want to boot from USB)

1. Convert the IMG to a VDI: VBoxManage convertfromraw -format VDI binary.img binary.vdi
2. Go into VirtualBox and create a VM with a harddrive w/e size you want (I chose 20GB, although it doesn't seem to be using all of it)
3. Clone the data on your new hd using:
VBoxManage clonehd –existing binary.vdi newhd.vdi
4. Launch VirtualBox and boot into the VM
5. sudo apt-get install gparted (not sure if this part matters)
6. make an EXT2 partition with label "live-rw" that fills the rest of the HD (not sure if this part matters)
7. Run the "Format Storage" tool.  This overrote my large image with a 1.86GB crypt-luks.

Is there anyway to make this encrypted storage larger? I am running both bitcoin and namecoin and need the storage to be larger.

How did you get bitcoin to use /storage/bitcoin instead of $HOME/.bitcoin?  I can't seem to find anything that sets that path, but I want to do the same for my namecoind. EDIT: aha! I found the wrapper scripts in src/chroot_local-includes/usr/bin/storage_wrappers/

I'll have some more pull requests up soon (mostly just fixing typos in docs and comments). I really like the notification scripts when anything happens.  Great work so far!

hero member
Activity: 742
Merit: 500
I'm building an IMG now.  Wish me luck.

I noticed that tor was installing from the debian repos.  The Tor Project recommends that you use their repos to be sure you get updates ASAP.

https://www.torproject.org/docs/debian

I changed my build system's sources.list, but I've never worked with live-build before, so I'm not quite sure if I need to make a sources.list for live-build.
hero member
Activity: 797
Merit: 1017
Quote
Did you build the UPNP support?

You mean bitcoin or the OS? The bitcoin I use is the binary release from the homepage and no, i did not incude any library or binary for upnp in the image. Please note that I set up iptables to drop all incoming traffic, so you may want to soften it a bit.

Quote
How do I build an ISO instead of an IMG? I thought "lb config -b iso" would do it, but that doesn't seem to work.

That's because of the auto/config script: every time you use lb config you launch the standard configuration (note the " Executing auto/config script." debug output).
To avoid this, either use the noauto mode ("lb config noauto -b iso", or iso-hybrid) after a normal "lb config" or edit the auto/config script setting --binary-images to iso.
hero member
Activity: 742
Merit: 500
Did you build the UPNP support?  I'm adding namecoin to my fork and want to keep it consistent.

How do I build an ISO instead of an IMG? I thought "lb config -b iso" would do it, but that doesn't seem to work. Sad
hero member
Activity: 797
Merit: 1017
Version 0.4 released. It's just to update bitcoin client to version 0.5
hero member
Activity: 797
Merit: 1017
Version 0.3B released. here are the main changes:

  • Fixed tor configuration and added polipo and vidalia.
  • Added a custom bitcoin launcher to start it with TOR networking
  • Removed iceweasel from build, added a script to download and run it from RAM. Runs on a different user and with TORbutton and noscript exensions
  • Added keyboard layout switcher, with "us" and "es" as optional layouts on top of the default layout for the chosen language
  • Increased storage partition to 3GB and binary image size to about 270MB. We're still in the 4GB flash drive range.

As I expected, my wireless card wasn't automatically detected. I used a wired connection and followed the instructions given by this tutorial and everything worked fine... until I reboot. Since everything was done on non-persistent media, it doesn't survive a shutdown.  Sad Is there a way to make such configuration persistent?

I manually compiled and added the wl.ko module, and blacklisted the brcm80211 module. I can't blacklist the b44, b43, b43legacy and ssb modules as that would stop many wifi and ethernet interfaces from working. Can you please check if this is working or not? If it isn't, you should be able to make it work just by typing
Code:
sudo modprobe -r b44 b43 b43legacy ssb brcm80211 wl
sudo modprobe wl
hero member
Activity: 630
Merit: 500
If you have torbutton, do you need NoScript?  I think it handles all of that for you.

I don't think TorButton blocks scripts. At least it doesn't conveniently allow you to manage a whilelist, as does NoScript.
hero member
Activity: 630
Merit: 500
So, I downloaded the block chain with BitSafe. Here go my comments:

  • Persistence for Bitcoin client and backup applications is provided by a 2GB secondary partition
2GB were not enough for my initial block download, mainly due to debug.log. It grew so much that there was no space left on the 2GB partition. Manually deleting debug.log took care of the problem.

  • TOR installed by default

I'm having some problems using the available Tor proxy... Iceweaseal doesn't connect to it after manual configuration, and when I configure bitcoin to use Tor it does not find any peer. I haven't investigated much yet to figure out what could be the reason, I might just be making something wrong.

You'll need a fast USB drive or SD card. I say fast for a reason: bitcoin goes heavy on disks, and slow devices will greatly slow it down.

And he means it!
My initial download, on a Kingston memory stick, took more than 2 full days.

I don't know how bitcoin does the block chain indexation, but I suspect the index is not kept on RAM during block download, and that every new address it finds it just inserts it in the middle of the index, directly on the "disk". That would require moving, in average, half the current size of the index every time it finds a new address. Currently that's ~150Mb. In a USB stick that's very slow.
I suspect it works like that because block download got slower the bigger the downloaded chain was.


To summarize, rb1205, if you want a few more suggestions, here are them:

  • A lightweight client like MultiBit could be useful.
  • Consider distributing the chain files already indexed with BitSafe. There's really no trust issue in that, as you cannot lie about the largest chain. That won't make bitcoin any less P2P and will speed things up for those which prefer the original client.
  • Make the storage partition larger than 2GB if possible.


Thank you a lot for this great work of yours. I plan to keep using it, and annoying you with these suggestions. Wink
hero member
Activity: 742
Merit: 500
Instead, what you think about starting a portable version of firefox in a chroot environment with a dedicated user? That should be safe enough IMHO

Yes, it should. Even more if you add NoScript to that firefox.

If you have torbutton, do you need NoScript?  I think it handles all of that for you.
hero member
Activity: 630
Merit: 500
It looks like you have a corrupt blockchain. It happened once for me when i disconnected the USB drive while bitcoin was running. Can you check that the issue (and the blockchain) disappears when you delete everyting in the /storage/bitcoin folder except for the wallet.dat file?

Yes, I already did it, and it works after deleting the blockchain files.

This is probably a problem with bitcoin, then, right? I'll search if there is a bug for this already.
hero member
Activity: 742
Merit: 500
Very cool.  I'd been playing around with building my own live CD, but you beat me to it.

What version of the bitcoin client do you have installed (and what version of libdb++ did you use)?  If I wanted to use my own branch (like one of sipa's with the private key import), what would be the easiest way to do that?  What would be the easiest way to get namecoin installed?  I haven't done much with debian before, but I do know my way around linux/freeBSD.
hero member
Activity: 797
Merit: 1017
It looks like you have a corrupt blockchain. It happened once for me when i disconnected the USB drive while bitcoin was running. Can you check that the issue (and the blockchain) disappears when you delete everyting in the /storage/bitcoin folder except for the wallet.dat file?
hero member
Activity: 630
Merit: 500
I'll check if that fix doesn't block any working configuration, mostly the blacklisting part. If it doesn't, I'll add it to the build.

Thank you!


By the way, today I had a weird error, which I'm not sure if it's related to BitSafe somehow, or bitcoin itself.

I've left my laptop downloading the block chain, not connected to the power supply, until the battery was over. So, there was this sudden shutdown during block download. After I restart and tried to load the bitcoin client again, I got two error popups, with the following messages:

First popup:

EXCEPTION: NSt8ios_base7failureE       
CAutoFile::read : end of file       
bitcoin in AppInit() 


Second popup:

EXCEPTION: NSt8ios_base7failureE       
CAutoFile::read : end of file       
bitcoin in CMyApp::OnUnhandledException()


And after clicking OK to the second popup, nothing happens, bitcoin does not start.

Does this make any sense to you?
hero member
Activity: 797
Merit: 1017
    [lAs I expected, my wireless card wasn't automatically detected. I used a wired connection and followed the instructions given by this tutorial[/li][/list] and everything worked fine... until I reboot. Since everything was done on non-persistent media, it doesn't survive a shutdown.  Sad Is there a way to make such configuration persistent?
    I'll check if that fix doesn't block any working configuration, mostly the blacklisting part. If it doesn't, I'll add it to the build.

    Quote
    After I had wifi, I loaded Bitcoin to download the blockchain. I made a mistake with the virtual keyboard and the verification of my password didn't match the first input. The script went a bit crazy after that and created a persistent partition that I cannot access. It claims it's corrupted but doesn't offer to overwrite it (normal, since it doesn't know if there are coins there). I'll probably just format everything since I don't have anything to lose.
    It's intended: bitsafe will automatically start the persistent partition format utility only if no secondary partitions are found on the current drive. If any is present but it can't be properly mounted, which is your case, you will need to manually start the format script in the system menu as stated in the error message.

    Quote
    Not a big issue, but it seems the keyboard layout is chosen based on the language you select on startup. Not sure if it's the best choice... when I chose Portuguese, I couldn't find the symbols I wanted anymore.
    That's a problem i'm trying to fix. There's a keyboard layout switcher applet, but it shows the current layout as the only possible choice. I'll look into it.
    hero member
    Activity: 630
    Merit: 500
    Instead, what you think about starting a portable version of firefox in a chroot environment with a dedicated user? That should be safe enough IMHO

    Yes, it should. Even more if you add NoScript to that firefox.
    hero member
    Activity: 630
    Merit: 500
    I've just tested the system. I've found some issues:

    • As I expected, my wireless card wasn't automatically detected. I used a wired connection and followed the instructions given by this tutorial
    and everything worked fine... until I reboot. Since everything was done on non-persistent media, it doesn't survive a shutdown.  Sad Is there a way to make such configuration persistent?
    • After I had wifi, I loaded Bitcoin to download the blockchain. I made a mistake with the virtual keyboard and the verification of my password didn't match the first input. The script went a bit crazy after that and created a persistent partition that I cannot access. It claims it's corrupted but doesn't offer to overwrite it (normal, since it doesn't know if there are coins there). I'll probably just format everything since I don't have anything to lose.
    • Not a big issue, but it seems the keyboard layout is chosen based on the language you select on startup. Not sure if it's the best choice... when I chose Portuguese, I couldn't find the symbols I wanted anymore.
    hero member
    Activity: 797
    Merit: 1017
    Either case, Tor shouldn't have a much negative impact.
    Nice to hear!  Smiley

    I didn't quite understand what you meant there... there are PCs incapable of running a virtual machine?
    Yes, every CPU is capable of running a virtual machine but only those with hardware virtualization can do it efficently. As this build is likely to be used on old laptops with outdated hardware, I feel that running a modern browser via software virtualization on those slow CPUs isn't viable.
    Instead, what you think about starting a portable version of firefox in a chroot environment with a dedicated user? That should be safe enough IMHO
    hero member
    Activity: 630
    Merit: 500
    No, TOR is installed but not configuerd to route all connections yet: I still have to figure out how much the routing thru onion increases the time to download the block chain: if the increase is reasonable i'll switch it, at least for the bitcoin client if not for all the connections as you said.

    If I'm not mistaken the client does not download the blockchain at "full speed". I don't remember if the reason for this is that the verification process normally takes longer than the download, or that everything is downloaded from one unique connection, not benefiting from the P2P nature of the network like a torrent with so many seeds would. Either case, Tor shouldn't have a much negative impact.
    Also, you may deliver your system with the block chain files already downloaded and indexed, up to the point when the release was built. That would be very useful and poses no trust issue.

    Anyway, some early user complained about finding impratical to get the addresses to perform payments, so I had to include it.

    You could argue that your system is meant to be a "safe banking system", not the browsing system the user will use daily. So, people could leave their larger wallets on your system, and in the browsing system have another wallet credited with an amount they could eventually afford to lose.
    Plus, sending addresses to the "banking system" could be done by writing them on a file on the disk, and once in BitSafe, mounting the disk and reading this file. Eventually this could even be automated with a browser plugin on the browsing system side, and an utility app on BitSafe side that would know where to search for addresses during boot time, and then ask the user if he wants to confirm those payments (amount and description info could be included, like those bitcoin URLs. Just giving some ideas... Smiley

    I don't like the idea of using a virtual machine, as that would basically cut off all the PCs mounting a CPU without virtualization feature.

    I didn't quite understand what you meant there... there are PCs incapable of running a virtual machine?
    hero member
    Activity: 797
    Merit: 1017
    Question: is all traffic forced to pass through Tor by default?
    No, TOR is installed but not configuerd to route all connections yet: I still have to figure out how much the routing thru onion increases the time to download the block chain: if the increase is reasonable i'll switch it, at least for the bitcoin client if not for all the connections as you said.

    Quote
    Another question: do you manage wifi the same way Ubuntu does? My laptop wifi wasn't automatically detected by LinuxCoin. It's a Broadcom card, I usually have issues with it, but Ubuntu manages it fairly well.
    I use the "new" connection manager in Debian Squeeze which is AFAIK the same one in Ubuntu. I included all the optional wifi drivers and firmware packets i could find in the debian archives, intel-notfree included. If your card doesn't work, please let me know the model so I can look into it.

    Quote
    Finally, about web browsing: I don't intend to use it, but wouldn't it be better not even to have the possibility? Most people are not aware that browsing can be dangerous. Or, at most, only have the browser encapsulated in a virtual machine... No browsing on the host system which stores the wallet. That would probably be more secure, don't you think?
    You're right, that's why in my first builds there was no browser at all. Anyway, some early user complained about finding impratical to get the addresses to perform payments, so I had to include it.
    Probably, i'll end up giving two different builds, one with the browser and the other one without. I don't like the idea of using a virtual machine, as that would basically cut off all the PCs mounting a CPU without virtualization feature.
    hero member
    Activity: 630
    Merit: 500
    This is great, and only now I saw your thread!

    Question: is all traffic forced to pass through Tor by default?

    Another question: do you manage wifi the same way Ubuntu does? My laptop wifi wasn't automatically detected by LinuxCoin. It's a Broadcom card, I usually have issues with it, but Ubuntu manages it fairly well.

    Finally, about web browsing: I don't intend to use it, but wouldn't it be better not even to have the possibility? Most people are not aware that browsing can be dangerous. Or, at most, only have the browser encapsulated in a virtual machine... No browsing on the host system which stores the wallet. That would probably be more secure, don't you think?

    Thank you for this work. I'll try it out as soon as I can.
    hero member
    Activity: 797
    Merit: 1017
    Version 0.2B released

    To upgrade from previous installations, do NOT flash your drive with the binary.img file! Just delete the "padder" file and replace the filesystem.squashfs file in the live directory with the one in the download section.

    Change list:

    • Added an internal backup feature, which will be used by the backup frontend i'm working on. Your sensible data is put in a tar.bz2 archieve and backed up every time you mount the persistent storage partition. This includes the wallet.dat file and the gpg and ssh datadirs.
    • Added GPA, a graphical frontend for GPG
    • Fixed some bugs
    member
    Activity: 82
    Merit: 10
    Unable to download file from the Dropbox

    P.S. now all right, this is a temporary problems...
    newbie
    Activity: 47
    Merit: 0
    I like the visual keyboard thingy.
    hero member
    Activity: 797
    Merit: 1017
    If you find a bug, please post it here or in the project page on github

    Translations are very welcome, if you wish to help there's a translation project on GetLocalization
    hero member
    Activity: 797
    Merit: 1017
    BitSafe is an opensource Debian-based live linux distribution designed to provide an essential and secure environment to store and use your bitcoins from a USB drive, SD card or hard disk.

    Unlike other live distros, BitSafe is thought to do nothing else other than to keep your bitcoins really safe. The crypted persistence partition used to store the wallet and the block chain is not mounted as home directory: it's only used by the Bitcoin client and other few applications related to backup and security (gpg and ssh). BitSafe takes care to dynamically mount and unmount said persistence as needed, making everything else volatile: home, cache, temporary files, settings, browser... everything vanishes as soon as it's shut down.
    BitSafe comes with full networking support, TOR included, but you can also use it offline for even greater security. When you'll need your bitcoins, you just have to connect it to the net and let it download the block chain.
       
    Features:
    • Very light, it can be run on about any PC. If it has 64 MB of ram or more it can run BitSafe
    • Immunity to most malware around, including keyloggers. If you use the built-in soft keyboard to enter passwords, you are immune to hardware keyloggers, too
    • Comes with the latest official Bitcoin client (bitcoin-qt V0.6.0)
    • Volatile, non-persistent home directory. Persistence (for the bitcoin client and backup applications only) is provided by a secondary partition that is automatically created and mounted on-demand (asking for password) whenever you open bitcoin or any program that needs it, and then it's unmounted when it isn't needed anymore
    • Can download the blockchain from a trusted source, to cut down the time needed for the first sync to less than an hour, down from several days.
    • TOR and Vidalia installed by default. You can start bitcoin with TOR networking just by clicking on a icon.
    • Minimal number of applications and installed packages to reduce attack surface. If you need a browser, there's a script to download and run Firefox from RAM with TORbutton and noscript already installed.
    • Persistent screen locking password to protect the client while you're not at the PC.
    • Multilanguage. The default build supports English, German, Italian, Spanish, French, Portoguese and Russian, but you can download the source and build your own localized version choosing any language supported by Debian Squeeze. ATM BitSafe scripts are localized in english and italian only, feel free to contribute
    • If GUI isn't your thing, you can disable x and go text mode with bitcoind. BitSafe scripts will work just fine

    Screenshots


    Downloads:

    Binary Image V0.6.1B (for first time installations) digital signature, MD5: 5f2e67a2da443d697234ddaf7c5ae7f3
    Live filesystem V0.6.1B (to upgrade from previous releases) digital signature, MD5: 8a940da24ac18214f9d98cf37a249ad3
    You can check the digital signature with the gpg/pgp public key linked in my forum sign.

    Source Code
    Github repository: https://github.com/rb1205/BitSafe
    git clone git://github.com/rb1205/BitSafe.git

    Flashing
    THIS WILL FORMAT YOUR FLASH DRIVE AND YOU'LL LOSE ANYTHING YOU HAVE ON IT, INCLUDING THE STORAGE PARTITION AND ANY BITCOIN STORED THERE.
    IF YOU HAVE ALREADY INSTALLED A PREVIOUS VERSION OF BITSAFE ON THE SAME DRIVE AND YOU ONLY WANT TO UPGRADE, PLEASE FOLLOW THE INSTRUCTIONS IN THE NEXT SECTION.

    You'll need a fast USB drive or SD card of 4gb or more. I say fast for a reason: bitcoin goes heavy on disks, and slow devices will greatly slow it down. You want a drive that can at least put down 10 MB/s of write bandwidth. Here's a brief list of some suitable USB sticks. For SD cards, aim for a class 10 device.
    Download the Binary Image file and flash it on your drive.

    On Linux: sudo dd if=/path/to/binary.img of=/dev/sdX where sdX is the name of the device (not partition) you want to flash BitSafe on
    On Mac: Same as for Linux. Remember to unmount (not eject) the device you want to install BitSafe on before using dd or it'll give an error. NOTE: You'll need some extra steps to let bitcoin boot on a Mac, just as any other USB live linux distribution. Read more about this here.
    On Windows: I recommend Image Writer. You'll need to launch it as administrator. Go pick the downloaded binary.img file, choose the letter of the drive you want to install BitSafe on and press "Write".

    Upgrading
    If you have already installed a previous version of BitSafe on a device and you want to upgrade it without losing your storage partition, just download the Live filesystem from the download section, insert the drive with BitSafe in the computer and overwrite the directory "live" with the one in the file you downloaded.

    Usage
    • Insert the device you flashed BitSafe on in the PC you wish to use it and start (or reboot) it.
    • As soon as the PC displays the first screen press repeatly the boot list menu button (usually "F12" or "ESC") and choose the BitSafe device from the list you'll get. If your PC doesn't have a boot list menu you'll have to launch the BIOS setup, navigate into the boot options and set your PC to boot from the device with BitSafe first.
    • Choose your preferred language, hit Enter and wait a minute for BitSafe to start
    • Double click on the Bitcoin icon to launch the first time wizard utility
    • BitSafe will ask if you want to create the storage partition. Press yes and enter your choosen password when requested, you'll have to enter it a total of 3 times. Please keep in mind that there's no way to recover the password, should you forget it.
    • BitSafe will ask if you want to download the block chain from the web. Press yes if you are connected to the internet and you're not paranoid, otherwise press no. Keep in mind that the former option takes about 1 hour to reach the sync state from scratch, while the latter takes about 2-3 days.
    • Finally, the Bitcoin client is launched. You can use it as you usually do.
    • Remember to shut down the PC using the shutdown button in the lower right corner of the screen. Cutting down the power while the client is running may
      lead to blockchain or even wallet corruption.

    To Do:
    • Backup manager with multiple encryption and output choices.
    • Script to download the blockchain from here and put in the bitcoin data folder done!
    • Trasparent TOR for every ongoing connection (when enabled)
    • GUI for format script
    • Restore the storage partition after flashing the image, to unify first time installations and upgrading.
    • Tool to export all bitcoin addresses in the wallet.dat file

    DISCLAMER:
    BitSafe is a beta software. I cannot guarantee you will not have problems.
    Under no circumstances I will take any responsibility for any damage done to your hardware, your software and/or your finances directly or indirecly caused by my software.
    Jump to: