Pages:
Author

Topic: LinuxCoin A lightweight Debian based OS with everything ready to go. - page 28. (Read 285137 times)

sr. member
Activity: 308
Merit: 251
Here's the revised bitcoin encrypter script. I havent tested it yet I'm just sat round a friends and decided to type it up quick while I wait for his computer to finish what it's doing Cheesy

Code:
#!/bin/bash
# Bitcoin wallet encrypter
# Zarren Spry
# v0.2

# Ask for loop
LOOPDEV=$(zenity --entry --text "Please enter a loop device" --entry-text "/dev/loop7");

# Check for existing wallet in the .bitcoin folder
if [ -f ~/.bitcoin/wallet.dat ]; then
  if zenity --question --text="An existing unencrypted wallet found ! Would you like me use this wallet ?."; then
    USE_OLD_WALLET="1"
  else
    if zenity --question --text="The current wallet located in ~/.bitcoin is about to be deleted ! Are you sure ?"; then
      rm ~/bitcoin/wallet.dat
    else
      zenity --info --text="Ok backing up existing wallet."
      USE_OLD_WALLET="0"
  fi
fi

# Start bitcoin
bitcoin -min&

# Check if a wallet already exists and if not create one
if [ -f /.wallet ]; then
sudo losetup $LOOPDEV /.wallet
RAW_PASSWORD=$(zenity --entry --text "Pleas enter your passphrase." --entry-text "Your passphrase here.");  
PASSWORD=$(echo -n $RAW_PASSWORD | sha1sum | cut -d "-" -f 1)
echo $PASSWORD | echo $PASSWORD | sudo cryptsetup luksOpen $LOOPDEV  wallet
sudo mount /dev/mapper/wallet ~/wallet
if [ $USE_OLD_WALLET == "1" ]; then
 sudo mv ~/.bitcoin/wallet.dat ~/wallet/wallet$(date "+%Y%m%d-%H:%M:%S").dat
 sudo ln -s ~/wallet/wallet$(date "+%Y%m%d-%H:%M:%S").dat ~/.bitcoin/wallet.dat
elif [ $USE_OLD_WALLET == "0" ]; then
 sudo mv ~/.bitcoin/wallet.dat ~/wallet/wallet$(date "+%Y%m%d-%H:%M:%S").dat
 WALLET_COUNT=0
 for numof in $(ls ~/wallet/wallet); do
   let WALLET_COUNT = WALLET_COUNT+1
 done
 if [ $WALLET_COUNT -gt 2 ]; then
   zenity --info --text "Multiple wallets detected ! Please select a wallet."
   WALLET_FILE=$(zenity --file-selection)
   sudo ln -s ~/wallet/$WALLET_FILE ~/.bitcoin/wallet.dat
else
 sudo rm ~/.bitcoin/wallet.dat
 sudo ln -s ~/wallet/wallet.dat ~/.bitcoin/wallet.dat
fi
        zenity --info --text "Your wallet has been mounted !"
else
# Create wallet
sudo dd if=/dev/urandom of=/.wallet bs=1024k count=50
mkdir ~/wallet
sudo losetup $LOOPDEV /.wallet
RAW_PASSWORD=$(zenity --entry --text "Pleas enter a passphrase." --entry-text "Your passphrase here.");  
PASSWORD=$(echo -n $RAW_PASSWORD | sha1sum | cut -d "-" -f 1)
echo "YES" | echo $PASSWORD | echo $PASSWORD | sudo cryptsetup luksFormat $LOOPDEV
echo $PASSWORD | echo $PASSWORD | sudo cryptsetup luksOpen $LOOPDEV  wallet
sudo mkfs.ext4 /dev/mapper/wallet
sudo mount /dev/mapper/wallet ~/wallet
if [ $USE_OLD_WALLET == "1" ]; then
 sudo mv ~/.bitcoin/wallet.dat ~/wallet/wallet$(date "+%Y%m%d-%H:%M:%S").dat
 sudo ln -s ~/wallet/wallet$(date "+%Y%m%d-%H:%M:%S").dat ~/.bitcoin/wallet.dat
else
 sudo mv ~/.bitcoin/wallet.dat ~/wallet
 sudo ln -s ~/wallet/wallet.dat ~/.bitcoin/wallet.dat
fi
        zenity --info --text "Wallet encryption complete ! Your encrypted password is ${PASSWORD}."
fi

# Infinate loop to check if bitcoin is running. If not running clean up files.
while true; do
  check_running=$(pidof bitcoin)
  if [ -z $check_running ]; then
    running="0"
  else
    running="1"
  fi
  if [ $running == "0" ]; then
    sudo umount ~/wallet
    sudo rm ~/./bitcoin/wallet.dat
    sudo cryptsetup luksClose $LOOPDEV  wallet
    losetup -d $LOOPDEV
    break
  else
    sleep 10
  fi
done


Open up a terminal and type.

Code:
lxrandr

And you will be met with a GUI that you can change the resolution.


We really need to get this info in the wiki, also how to change the clock to different time zones, so annoying to see the clock always showing the time 6 hours off for me.

Get signed up and add the info !! I agree more people should use the wiki Cheesy

http://www.linuxcoin.co.uk/wiki/index.php/Screen_resolution
newbie
Activity: 15
Merit: 0

Open up a terminal and type.

Code:
lxrandr

And you will be met with a GUI that you can change the resolution.


We really need to get this info in the wiki, also how to change the clock to different time zones, so annoying to see the clock always showing the time 6 hours off for me.
sr. member
Activity: 308
Merit: 251

I have been experimenting with simple ways to encrp the wallet file alone and then email it to oneself. It would need to be able to be decrpted easily in Windows. Truecrypt seems way too cumbersome and others are such a hassle to install.

Dumb Question:

Are the secure and unsecure bitcoin clients different wallets?

This does just encrypt your wallet.dat and you can acces your wallet in windows using FreeOTFE http://en.wikipedia.org/wiki/FreeOTFE Wink I suppose they are Cheesy the unsecured bitcoin client just opens the bitcoin software as normal the secure bitcoin client moves the wallet over to your encrypted space andsymlinks it back. Once finished it closes the encrypted space so there's no wallet.dat to steal Wink

If you started a secure bitcoin client then tried to access your secure wallet the file wouldn't exist and a new wallet would be created.

This sounds like it might cause a conceptual problem some of my friends have had while using cryptkeeper.

Have you dealt with the issue of: One had a secure wallet encrypted and forgot to open the encrypted file/folder at startup. Then they use bitcoin client that finds no wallet and creates another one. Then they remember to use the encryption and it does not work because the new wallet is in the way. Now it's file manager rename game and they really screw things up! 8^)

Another issue with cryptkeeper; once you make an encrypted folder I have not found a way to change the password. One has to make a new folder...


A valid point but if you open unsecured, then open secured after the new created wallet is discarded for the one located in the encrypted space. This is why bitcoin is opened before the script goes ahead and sets up the encryption. What I will do on that note is at something to detect if a wallet already exists and if it does copy it also across to the encrypted space under a new name in case someone has coins on the old wallet.

You can change your passwords using dm-crypt. You can also set more than one password to a file.

where do i change the screen resolution in linuxcoin 0.2b  ?


Jen

Open up a terminal and type.

Code:
lxrandr

And you will be met with a GUI that you can change the resolution.

 
full member
Activity: 167
Merit: 100
where do i change the screen resolution in linuxcoin 0.2b  ?


Jen
member
Activity: 84
Merit: 10
I yam what I yam. - Popeye

I have been experimenting with simple ways to encrp the wallet file alone and then email it to oneself. It would need to be able to be decrpted easily in Windows. Truecrypt seems way too cumbersome and others are such a hassle to install.

Dumb Question:

Are the secure and unsecure bitcoin clients different wallets?

This does just encrypt your wallet.dat and you can acces your wallet in windows using FreeOTFE http://en.wikipedia.org/wiki/FreeOTFE Wink I suppose they are Cheesy the unsecured bitcoin client just opens the bitcoin software as normal the secure bitcoin client moves the wallet over to your encrypted space andsymlinks it back. Once finished it closes the encrypted space so there's no wallet.dat to steal Wink

If you started a secure bitcoin client then tried to access your secure wallet the file wouldn't exist and a new wallet would be created.

This sounds like it might cause a conceptual problem some of my friends have had while using cryptkeeper.

Have you dealt with the issue of: One had a secure wallet encrypted and forgot to open the encrypted file/folder at startup. Then they use bitcoin client that finds no wallet and creates another one. Then they remember to use the encryption and it does not work because the new wallet is in the way. Now it's file manager rename game and they really screw things up! 8^)

Another issue with cryptkeeper; once you make an encrypted folder I have not found a way to change the password. One has to make a new folder...

sr. member
Activity: 308
Merit: 251
Sorry about the bump guys but I'm getting very close to a finished product here and wanted to know if you guys want anything else added to linuxcoin ? Alls left to do is the graphical stuff and a plymouth theme Cheesy So get your requests in now !!!! lol

heres a screenshot of the new version running a secure bitcoin wallet and guiminer rocking phoenix Cheesy This version rules lol



Excellent!

I have been experimenting with simple ways to encrp the wallet file alone and then email it to oneself. It would need to be able to be decrpted easily in Windows. Truecrypt seems way too cumbersome and others are such a hassle to install.


Dumb Question:

Are the secure and unsecure bitcoin clients different wallets?

This does just encrypt your wallet.dat and you can acces your wallet in windows using FreeOTFE http://en.wikipedia.org/wiki/FreeOTFE Wink I suppose they are Cheesy the unsecured bitcoin client just opens the bitcoin software as normal the secure bitcoin client moves the wallet over to your encrypted space andsymlinks it back. Once finished it closes the encrypted space so there's no wallet.dat to steal Wink

If you started a secure bitcoin client then tried to access your secure wallet the file wouldn't exist and a new wallet would be created.

member
Activity: 84
Merit: 10
I yam what I yam. - Popeye
You rock sir!

Not sure I can remember you saying it was added, but the option to reboot into persistence automatically so that when I'm away I can remote reboot and have the system come up automatically.

Thanks again

Trip

You can do it with similar:

Pick RootTerminal

sudo leafpad /live/image/syslinux.cfg

-------------change all to:

default menu.c32
prompt 0
menu title Welcome to LinuxCoin
timeout 100

label linuxcoin
menu label LinuxCoin Persistent (Changes are Saved)
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live config quiet splash persistent rw vga=791

label ubnentry0
menu label LinuxCoin Transient (Private Browsing, Nothing is Saved)
kernel /live/vmlinuz
append initrd=/live/initrd.img boot=live config quiet splash rw vga=791

----------------end of file

I could not either figure out what the other options did, or make them work.
member
Activity: 84
Merit: 10
I yam what I yam. - Popeye
Sorry about the bump guys but I'm getting very close to a finished product here and wanted to know if you guys want anything else added to linuxcoin ? Alls left to do is the graphical stuff and a plymouth theme Cheesy So get your requests in now !!!! lol

heres a screenshot of the new version running a secure bitcoin wallet and guiminer rocking phoenix Cheesy This version rules lol



Excellent!

I have been experimenting with simple ways to encrp the wallet file alone and then email it to oneself. It would need to be able to be decrpted easily in Windows. Truecrypt seems way too cumbersome and others are such a hassle to install.


Dumb Question:

Are the secure and unsecure bitcoin clients different wallets?
newbie
Activity: 42
Merit: 0
You rock sir!

Not sure I can remember you saying it was added, but the option to reboot into persistence automatically so that when I'm away I can remote reboot and have the system come up automatically.

Thanks again

Trip
sr. member
Activity: 308
Merit: 251
Sorry about the bump guys but I'm getting very close to a finished product here and wanted to know if you guys want anything else added to linuxcoin ? Alls left to do is the graphical stuff and a plymouth theme Cheesy So get your requests in now !!!! lol

heres a screenshot of the new version running a secure bitcoin wallet and guiminer rocking phoenix Cheesy This version rules lol

sr. member
Activity: 308
Merit: 251

LOL sorry bud I know that i keep pushing the release date forward but it's hard not to because everytime the ISO is built something else hits my radar Cheesy. Plus it looks like I've got competition cough cough bamt hehehe Cheesy Only kidding  Wink

No competition at all man, I've probably recommended LinuxCoin to more people who've asked me about bamt than I have bamt itself Smiley  


LOL I was only kidding !! BAMT rules too ! Love the web interface and how simple it is to get mining Wink Thanks for the recommendations bud !!

PS: I was going to ask you about maybe *borrowing* some of your work to implement into the PXE side of linuxcoin ? Would make a nice collaboration and I'm willing to give you a percentage of donations ? I'll PM you Wink
hero member
Activity: 616
Merit: 506

LOL sorry bud I know that i keep pushing the release date forward but it's hard not to because everytime the ISO is built something else hits my radar Cheesy. Plus it looks like I've got competition cough cough bamt hehehe Cheesy Only kidding  Wink

No competition at all man, I've probably recommended LinuxCoin to more people who've asked me about bamt than I have bamt itself Smiley 
sr. member
Activity: 308
Merit: 251
So you fancy yourself to be a uber bad ass hax0r ninja ?

Here we have a standard LinuxCoin encrypted wallet. The password is as simple as they come. Inside is some coinage for a reward !! If you can get in you get the coins simplez Wink

http://www.mediafire.com/?35mrd9zft8cknkx
hero member
Activity: 590
Merit: 500
I have linuxcoin 02a installed to a usb stick. It worked on every motherboard i tried untill i got my new msi 890fxa-gd65.  it loads till it is suppose to show the gui, but it just stays blank. Any ideas? Using 4x5830 top two pcie slots vacant, using hdmi. Thanks

When you get to the black screen, enter a terminal by pressing Ctrl+Alt+F1 and delete xorg.conf located at /etc/X11/xorg.conf.  Reboot.
Thanksdude. I never thougt of that. Now i gotte reinstall linuxcoin, thanks again
full member
Activity: 150
Merit: 100
I have linuxcoin 02a installed to a usb stick. It worked on every motherboard i tried untill i got my new msi 890fxa-gd65.  it loads till it is suppose to show the gui, but it just stays blank. Any ideas? Using 4x5830 top two pcie slots vacant, using hdmi. Thanks

When you get to the black screen, enter a terminal by pressing Ctrl+Alt+F1 and delete xorg.conf located at /etc/X11/xorg.conf.  Reboot.
sr. member
Activity: 308
Merit: 251
Thanks for the interest guys !! Just a quick note on how your wallet is encrypted.

EDIT:

Added loop to test if bitcoin is running. As soon as you close the software linuxcoin cleans up so your wallet is no longer accessible until you open the secure bitcoin client again.
1) LinuxCoin asks for a password and encrypts the password sha1. This should protect against weak passwords Wink
2) LinuxCoin checks if an encrypteed wallet already exits. If so mounts the space, if not creates a encrypted filesystem using dm-crypt and luks and mounts your encrypted space in your home directory.
3) LinuxCoin copies the wallet.dat over to the encrypted space and symlinks it back to your bitcoin folder.
4) Linuxcoin detects when you close the bitcoin software (recommended if you want to be very secure !!) and cleans up after itself.
  
I think that's enough to keep most hackers at bay until you realize your wallet is missing and transfer your coins to a new wallet Cheesy

Here's the script if anyone wants to add it to previous versions.

Code:
#!/bin/bash
# Bitcoin wallet encrypter
# Zarren Spry

#GLOBALS

LOOPDEV=$(zenity --entry --text "Please enter a loop device" --entry-text "/dev/loop8");

# Start bitcoin
bitcoin -min&

# create a loop dev for the filesystem
if [ -e "$LOOPDEV" ]; then
  zenity --info --text "$LOOPDEV already exists ! Moving on .."
else
  sudo mknod -m660 $LOOPDEV b 7 8
  sudo chown root.disk $LOOPDEV
  sudo chmod 666 $LOOPDEV
fi

# Check if a wallet already exists and if not create one
if [ -f /.wallet ]; then
sudo losetup $LOOPDEV /.wallet
RAW_PASSWORD=$(zenity --entry --text "Pleas enter your passphrase." --entry-text "Your passphrase here.");  
PASSWORD=$(echo -n $RAW_PASSWORD | sha1sum | cut -d "-" -f 1)
echo $PASSWORD | echo $PASSWORD | sudo cryptsetup luksOpen $LOOPDEV  wallet
sudo mount /dev/mapper/wallet ~/wallet
sudo rm ~/.bitcoin/wallet.dat
sudo ln -s ~/wallet/wallet.dat ~/.bitcoin/wallet.dat
        zenity --info --text "Your wallet has been mounted !"
else
# Create wallet
sudo dd if=/dev/urandom of=/.wallet bs=1024k count=50
mkdir ~/wallet
sudo losetup $LOOPDEV /.wallet
RAW_PASSWORD=$(zenity --entry --text "Pleas enter a passphrase." --entry-text "Your passphrase here.");  
PASSWORD=$(echo -n $RAW_PASSWORD | sha1sum | cut -d "-" -f 1)
echo "YES" | echo $PASSWORD | echo $PASSWORD | sudo cryptsetup luksFormat $LOOPDEV
echo $PASSWORD | echo $PASSWORD | sudo cryptsetup luksOpen $LOOPDEV  wallet
sudo mkfs.ext4 /dev/mapper/wallet
sudo mount /dev/mapper/wallet ~/wallet
sudo mv ~/.bitcoin/wallet.dat ~/wallet
sudo ln -s ~/wallet/wallet.dat ~/.bitcoin/wallet.dat
        zenity --info --text "Wallet encryption complete ! Your encrypted password is ${PASSWORD}."
fi

# Infinate loop to check if bitcoin is running. If not running clean up files.
while true; do
  check_running=$(pidof bitcoin)
  if [ -z $check_running ]; then
    running="0"
  else
    running="1"
  fi
  if [ $running == "0" ]; then
    sudo umount ~/wallet
    sudo rm ~/./bitcoin/wallet.dat
    sudo cryptsetup luksClose $LOOPDEV  wallet
    losetup -d $LOOPDEV
    break
  else
    sleep 8
  fi
done

could do with some error checking but pushed for time. If I have a spare hour I'll come back to this Wink
member
Activity: 84
Merit: 10
I yam what I yam. - Popeye
If you want to test send me a PM with your mining setup and I'll send you a copy.

Sent, even tho the miner is still only a test. I know a few other with similar setups who would like to test also, before major comitments.
hero member
Activity: 590
Merit: 500
I have linuxcoin 02a installed to a usb stick. It worked on every motherboard i tried untill i got my new msi 890fxa-gd65.  it loads till it is suppose to show the gui, but it just stays blank. Any ideas? Using 4x5830 top two pcie slots vacant, using hdmi. Thanks
sr. member
Activity: 383
Merit: 250
Ug, I keep waiting on making the jump to Linux for the release version. Maybe I should just go for the beta and say F--- it.

I appreciate all the hard work you are doing.

Linuxcoin will be even nicer when you switch it over to Slackware.

Will we be able to use the same persistence files in the release version, or will we have to download a new one?



LOL sorry bud I know that i keep pushing the release date forward but it's hard not to because everytime the ISO is built something else hits my radar Cheesy. Plus it looks like I've got competition cough cough bamt hehehe Cheesy Only kidding  Wink

I promise I'll make a big push tonight to finish the installer and get this ISO out the only thing I don't want to is release with bugs again. I might ask a few to test 0.2-final before I release to the public. If you want to test send me a PM with your mining setup and I'll send you a copy.

I have 3 computers running 3 x 6970's at 950/300 for 408 Mhash/s and 2 5870's in my main PC along side a GTX 470 (for gaming only) at 960/300 doing 406-408 Mhash/s (will go higher but the power supply in my main PC is only a 1000 watt, and locks up if I do anything that pulls more power on the GTX 470 [1090t black edition, SSD, 2 HD... etc... gobbles power]).

I have new cases coming tomorrow. I will put 4 x 6970 in 2 of my computers, and 4 x 5870's in the third. Then I will put the remaining 6970 along side my GTX 470 (this has run fine before hashing away and playing games -  this PC will remain windows unless I can figure out if VMware will work for mining? then I could use Linuxcoin on that as well).

Anyway, I probably would not be a good candidate until like Friday to do any testing as I will be in hardware hell for a couple days. Had it been available to test a couple days ago, I would have been a good candidate.

If it is still not released by the time I get done with the hardware I will PM you and try to get some testing done for you.


sr. member
Activity: 308
Merit: 251
Ug, I keep waiting on making the jump to Linux for the release version. Maybe I should just go for the beta and say F--- it.

I appreciate all the hard work you are doing.

Linuxcoin will be even nicer when you switch it over to Slackware.

Will we be able to use the same persistence files in the release version, or will we have to download a new one?



LOL sorry bud I know that i keep pushing the release date forward but it's hard not to because everytime the ISO is built something else hits my radar Cheesy. Plus it looks like I've got competition cough cough bamt hehehe Cheesy Only kidding  Wink

I promise I'll make a big push tonight to finish the installer and get this ISO out the only thing I don't want to is release with bugs again. I might ask a few to test 0.2-final before I release to the public. If you want to test send me a PM with your mining setup and I'll send you a copy.
Pages:
Jump to: