Bitcoin Forum

Bitcoin => Project Development => Topic started by: rb1205 on October 05, 2011, 02:47:25 PM



Title: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
Post by: rb1205 on October 05, 2011, 02:47:25 PM
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 (http://eu1.bitcoincharts.com/blockchain/), 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 (http://www.getlocalization.com/bitsafe/)
  • If GUI isn't your thing, you can disable x and go text mode with bitcoind. BitSafe scripts will work just fine

Screenshots
http://img803.imageshack.us/img803/8269/boot.th.png (http://imageshack.us/photo/my-images/803/boot.png/) http://img713.imageshack.us/img713/8529/desktopdy.th.png (http://imageshack.us/photo/my-images/713/desktopdy.png/) http://img52.imageshack.us/img52/7502/createparion.th.png (http://imageshack.us/photo/my-images/52/createparion.png/) http://img40.imageshack.us/img40/3471/inputpwd.th.png (http://imageshack.us/photo/my-images/40/inputpwd.png/) http://img823.imageshack.us/img823/2764/appsg.th.png (http://imageshack.us/photo/my-images/823/appsg.png/) http://img199.imageshack.us/img199/61/closingstorage.th.png (http://imageshack.us/photo/my-images/199/closingstorage.png/)

Downloads:

Binary Image V0.6.1B (for first time installations)  (http://goo.gl/iv0R0) digital signature (http://goo.gl/RkQrP), MD5: 5f2e67a2da443d697234ddaf7c5ae7f3
Live filesystem V0.6.1B (to upgrade from previous releases) (http://goo.gl/uH1GD) digital signature (http://goo.gl/GdMYa), 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 (https://raw.github.com/rb1205/BitSafe/master/RECOMMENDED_USB_DEVICES) 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 (https://www.google.it/search?q=boot+usb+linux+mac&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:it:official&client=firefox-a#hl=it&safe=off&client=firefox-a&hs=ek3&rls=org.mozilla:it%3Aofficial&sclient=psy-ab&q=boot+usb+live+linux+mac&oq=boot+usb+live+linux+mac&aq=f&aqi=&aql=&gs_l=serp.3...2309l2874l0l3109l5l5l0l0l0l2l390l1109l0j1j1j2l4l0.frgbld.&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.,cf.osb&fp=1411859566fc1426&biw=1036&bih=551).
On Windows: I recommend Image Writer (https://launchpad.net/win32-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 (http://eu1.bitcoincharts.com/blockchain/) 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.


Title: Re: [OpenSource] BitSafe, a live linux distribution for Bitcoin
Post by: rb1205 on October 05, 2011, 03:13:01 PM
If you find a bug, please post it here or in the project page on github (https://github.com/rb1205/BitSafe)

Translations are very welcome, if you wish to help there's a translation project on GetLocalization (http://www.getlocalization.com/bitsafe/)


Title: Re: [OpenSource] BitSafe, a secure live linux distribution to keep your coins.
Post by: d33tah on October 06, 2011, 03:40:24 AM
I like the visual keyboard thingy.


Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
Post by: btalk on October 30, 2011, 12:50:30 PM
Unable to download file from the Dropbox http://img841.imageshack.us/img841/9882/20111030161656.th.jpg (http://imageshack.us/photo/my-images/841/20111030161656.jpg/)

P.S. now all right, this is a temporary problems...


Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
Post by: rb1205 on October 31, 2011, 07:02:29 AM
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


Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
Post by: EhVedadoOAnonimato on October 31, 2011, 09:11:50 AM
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.


Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
Post by: rb1205 on October 31, 2011, 10:31:01 AM
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.


Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
Post by: EhVedadoOAnonimato on October 31, 2011, 01:22:57 PM
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... :)

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?


Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
Post by: rb1205 on November 01, 2011, 12:17:57 PM
Either case, Tor shouldn't have a much negative impact.
Nice to hear!  :)

Quote
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.
I don't like "prebuilt" block chains: i think the right (default) approach is letting the client download and verify the block chain via P2P. Besides, many people (including me) may want to use bitsafe as offline wallet generator. I think I'll add a script to download and install the block chain from some trusted source.

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


Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
Post by: EhVedadoOAnonimato on November 01, 2011, 01:49:47 PM
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 (http://wiki.debian.org/wl#Squeeze)
and everything worked fine... until I reboot. Since everything was done on non-persistent media, it doesn't survive a shutdown.  :( 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.


Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
Post by: EhVedadoOAnonimato on November 01, 2011, 01:56:04 PM
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.


Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
Post by: rb1205 on November 01, 2011, 10:16:45 PM
    [lAs I expected, my wireless card wasn't automatically detected. I used a wired connection and followed the instructions given by this tutorial (http://wiki.debian.org/wl#Squeeze)[/li][/list] and everything worked fine... until I reboot. Since everything was done on non-persistent media, it doesn't survive a shutdown.  :( 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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
    Post by: EhVedadoOAnonimato on November 03, 2011, 08:08:43 PM
    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?


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
    Post by: rb1205 on November 03, 2011, 11:39:44 PM
    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?


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
    Post by: Red Emerald on November 04, 2011, 12:04:32 AM
    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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
    Post by: EhVedadoOAnonimato on November 04, 2011, 08:08:32 AM
    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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
    Post by: Red Emerald on November 04, 2011, 07:19:06 PM
    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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
    Post by: EhVedadoOAnonimato on November 06, 2011, 08:21:14 PM
    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. ;)


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
    Post by: EhVedadoOAnonimato on November 06, 2011, 09:09:47 PM
    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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
    Post by: rb1205 on November 23, 2011, 10:31:28 PM
    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 (http://wiki.debian.org/wl#Squeeze) and everything worked fine... until I reboot. Since everything was done on non-persistent media, it doesn't survive a shutdown.  :( 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


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoin
    Post by: rb1205 on November 24, 2011, 10:14:24 PM
    Version 0.4 released. It's just to update bitcoin client to version 0.5


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on November 26, 2011, 05:05:44 AM
    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. :(


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on November 26, 2011, 04:46:27 PM
    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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on November 28, 2011, 07:15:23 PM
    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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on November 29, 2011, 01:45:02 AM
    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!



    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: simonk83 on November 29, 2011, 03:24:48 AM
    I'll be installing this tonight, good work :)   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 :(

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

    https://bitcointalk.org/index.php?topic=50936.0


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: simonk83 on November 29, 2011, 08:17:04 AM
    Is there any chance you can include Truecrypt as part of the default install?    That'd be awesome :)


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on November 29, 2011, 06:51:24 PM
    Is there any chance you can include Truecrypt as part of the default install?    That'd be awesome :)
    The persistent storage is already encrypted. How many times do you want to encrypt your wallet?


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: simonk83 on November 29, 2011, 08:05:31 PM
    Is there any chance you can include Truecrypt as part of the default install?    That'd be awesome :)
    The persistent storage is already encrypted. How many times do you want to encrypt your wallet?

    Fair enough :D  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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on November 29, 2011, 11:43:16 PM
    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.

    Quote
    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!
    Nice  :)

    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 (http://eu1.bitcoincharts.com/blockchain/).
    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 :)

    Well, Truecrypt could be useful for managing backups. For now, I added it on a side branch.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on November 30, 2011, 12:52:27 AM
    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


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: btc_artist on December 08, 2011, 01:57:09 PM
    Interesting project.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: fivemileshigh on December 11, 2011, 09:01:22 PM
    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 (https://launchpad.net/win32-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!




    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on December 11, 2011, 11:37:13 PM
    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 (https://launchpad.net/win32-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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on December 12, 2011, 09:44:29 AM

    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 (https://wiki.archlinux.org/index.php/USB_Installation_Media#On_Mac_OS_X), as said you should be able to use dd as on Linux, but you have to unmount the device first.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on December 12, 2011, 06:06:23 PM

    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 (https://wiki.archlinux.org/index.php/USB_Installation_Media#On_Mac_OS_X), 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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: simonk83 on December 28, 2011, 03:23:01 AM
    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 :D


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on December 28, 2011, 03:46:27 AM
    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 :D
    If you aren't good with linux.  Wait until rb1205 comes out with a new IMG for you to use. That, or start learning :)


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: simonk83 on December 28, 2011, 03:58:57 AM
    I'll wait, just wasn't sure if development had stopped...


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on December 28, 2011, 10:12:47 AM
    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  :)


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on January 03, 2012, 07:33:15 AM
    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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: simonk83 on January 22, 2012, 04:52:29 AM
    Bump...   Be nice to have a new version,  if only for the latest bitcoin client :)


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on January 24, 2012, 11:37:40 PM
    I'll release a version with the last official client within tomorrow.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on January 25, 2012, 10:59:16 PM
    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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: ovidiusoft on January 26, 2012, 12:35:43 PM
    I can send you a pull request to also include Electrum, would that be ok? (see more here: https://bitcointalk.org/index.php?topic=54376.0 )


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on January 26, 2012, 01:20:49 PM
    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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: RoloTonyBrownTown on February 07, 2012, 09:41:47 AM
    Is anyone able to suggest a fast USB drive suitable for this?   


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on February 07, 2012, 09:52:17 AM
    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/


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: RoloTonyBrownTown on February 07, 2012, 08:39:07 PM
    Great, thanks!


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on February 07, 2012, 09:25:54 PM
    I've started using a Tails Live CD (https://tails.boum.org/) 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.


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on February 08, 2012, 03:46:59 PM
    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  :)


    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: Red Emerald on February 08, 2012, 06:59:07 PM
    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  :)

    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.



    Title: Re: [OpenSource] BitSafe, a safety deposit box for your bitcoins
    Post by: rb1205 on April 09, 2012, 10:38:12 PM
    Version 0.6B released. Updated bitcoin client to 0.6, fixed some bugs and disabled random data filling for the storage partition on creation.


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: rb1205 on April 15, 2012, 10:28:02 PM
    Version 0.6.1B released.

    • Added a script to download and install the latest (daily) blockchain image from this (http://eu1.bitcoincharts.com/blockchain/) 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


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: chunglam on April 15, 2012, 11:27:03 PM
    Version 0.6.1B released.

    • Added a script to download and install the latest (daily) blockchain image from this (http://eu1.bitcoincharts.com/blockchain/) 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).


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: rb1205 on April 16, 2012, 07:43:24 AM
    Unable to download from Dropbox(error 404).

    Temporary problem, fixed now.


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: chunglam on April 18, 2012, 09:22:11 AM
    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).


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: rb1205 on April 18, 2012, 12:17:21 PM
    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?


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: chunglam on April 18, 2012, 12:57:13 PM
    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?


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: rb1205 on April 18, 2012, 02:07:33 PM
    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  :)

    Which localization are you choosing at boot?


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: chunglam on April 18, 2012, 02:50:21 PM
    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  :)

    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).


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: rb1205 on April 18, 2012, 02:54:41 PM
    Can you tell me the timezone reported by date?


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: chunglam on April 18, 2012, 03:00:59 PM
    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.


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: rb1205 on April 18, 2012, 03:34:43 PM
    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  :D

    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/<filename> before launching bitcoin. Let me know if it works!


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: EhVedadoOAnonimato on July 22, 2012, 06:38:50 PM
    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? :D


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: rb1205 on July 26, 2012, 09:29:37 AM
    Try to run just bitcoin-qt without the prefix


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: EhVedadoOAnonimato on July 26, 2012, 12:16:17 PM
    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)


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: EhVedadoOAnonimato on July 29, 2012, 09:14:20 PM
    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?


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: notme on July 30, 2012, 06:50:10 AM
    Does this include armory?  I'm really only interested to simplify my air-gapped wallet setup.


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: ricklandman on September 03, 2012, 09:07:57 PM
    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 ?


    Title: Re: [OpenSource live USB OS] BitSafe, a safety deposit box for your bitcoins.
    Post by: ricklandman on October 09, 2012, 09:27:36 PM
    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 ?