It's fairly straightforward to make this happen. Do a basic config of the system and then:
$ sudo vi /etc/initramfs-tools/modules
& add below lines
hv_vmbus
hv_storvsc
hv_blkvsc
hv_netvsc
Save the file, then:
$ sudo update-initramfs –u
$ sudo reboot
$ sudo ifconfig -a
$sudo vi /etc/network/interfaces
Add below lines for dhcp:
Auto eth0
iface eth0 inet dhcp
Add below lines for static IP:
auto eth0
iface eth0 inet static
address 10.0.0.100 [IP address]
netmask 255.255.255.0 [Subnet]
gateway 10.0.0.1 [Default Gateway]
Now restart networking service & reboot:
$ sudo /etc/init.d/networking restart
$ sudo reboot
And you will be good to go!
Angus Beath's Blog - a jotting down of thoughts, handy to remember things and general BS about the world.
Tuesday, 3 January 2012
Further adventures with OpenBSD - Encrypting Files systems
So I decided to create an encrypted folder on my workstation to use as a storage device for work related files (which typically have passwords etc located in them). After some trial and error I found the way to do it. Blog entries and the like that reference this material mention using the svnd0 vnode device for the encryption but it doesn't work. I'm not sure if this is an OpenBSD 5 peculiarity or something to do with my Sparc install but I eventually sorted it out.
Note: do all commands as the root user - it's a lot easier.
I created the sparse file to be encrypted:
# dd if=/dev/zero of=/location/of/secret/file/.cryptfile bs=1024 count=1024000
Note that it's 1GB in size and has a preceeding "." so it's at least a little bit hidden from a casual ls search.
I have to mount .cryptfile somewhere so I created a folder for that too:
# mkdir /media/crypt (or wherever you'd like to put it)
I have to check what vnodes are available:
# vnconfig -l
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use
I can choose any of these to associate with my virtual encrypted device. I will use vnd0. Using vnconfig again:
# sudo vnconfig -ck -v vnd0 .cryptfile
Encryption key: (use something good)
vnd0: 1048576000 bytes on .cryptfile
OK so now we need to create a file system on our device (which is only a single partition) so we need to newfs the "c" slice as this is the whole disk:
# sudo newfs /dev/vnd0c
/dev/rvnd0c: 1000.0MB in 2048000 sectors of 512 bytes
5 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
32, 414688, 829344, 1244000, 1658656,
So now to mount our encrypted filesystem to store our secret files!
# mount /dev/vnd0c /media/crypt
Probably a good idea to make it usable for me:
# chown -R angus:wheel /media/crypt
And we're off and racing:
# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/wd0a 1005M 42.2M 913M 4% /
/dev/wd0k 42.8G 1.0G 39.7G 2% /home
/dev/wd0d 3.9G 224K 3.7G 0% /tmp
/dev/wd0f 2.0G 450M 1.4G 24% /usr
/dev/wd0g 1005M 135M 820M 14% /usr/X11R6
/dev/wd0h 8.6G 1.9G 6.3G 23% /usr/local
/dev/wd0j 2.0G 2.0K 1.9G 0% /usr/obj
/dev/wd0i 2.0G 2.0K 1.9G 0% /usr/src
/dev/wd0e 7.9G 42.7M 7.4G 1% /var
/dev/vnd0c 984M 2.0K 935M 0% /media/crypt
I'll be re-creating this whole thing again soon so watch out for any updates or errata.
Check out: http://www.backwatcher.org/writing/howtos/obsd-encrypted-filesystem.html for some handy mounting/unmounting scripts.
Note: do all commands as the root user - it's a lot easier.
I created the sparse file to be encrypted:
# dd if=/dev/zero of=/location/of/secret/file/.cryptfile bs=1024 count=1024000
Note that it's 1GB in size and has a preceeding "." so it's at least a little bit hidden from a casual ls search.
I have to mount .cryptfile somewhere so I created a folder for that too:
# mkdir /media/crypt (or wherever you'd like to put it)
I have to check what vnodes are available:
# vnconfig -l
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use
I can choose any of these to associate with my virtual encrypted device. I will use vnd0. Using vnconfig again:
# sudo vnconfig -ck -v vnd0 .cryptfile
Encryption key: (use something good)
vnd0: 1048576000 bytes on .cryptfile
OK so now we need to create a file system on our device (which is only a single partition) so we need to newfs the "c" slice as this is the whole disk:
# sudo newfs /dev/vnd0c
/dev/rvnd0c: 1000.0MB in 2048000 sectors of 512 bytes
5 cylinder groups of 202.47MB, 12958 blocks, 25984 inodes each
super-block backups (for fsck -b #) at:
32, 414688, 829344, 1244000, 1658656,
So now to mount our encrypted filesystem to store our secret files!
# mount /dev/vnd0c /media/crypt
Probably a good idea to make it usable for me:
# chown -R angus:wheel /media/crypt
And we're off and racing:
# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/wd0a 1005M 42.2M 913M 4% /
/dev/wd0k 42.8G 1.0G 39.7G 2% /home
/dev/wd0d 3.9G 224K 3.7G 0% /tmp
/dev/wd0f 2.0G 450M 1.4G 24% /usr
/dev/wd0g 1005M 135M 820M 14% /usr/X11R6
/dev/wd0h 8.6G 1.9G 6.3G 23% /usr/local
/dev/wd0j 2.0G 2.0K 1.9G 0% /usr/obj
/dev/wd0i 2.0G 2.0K 1.9G 0% /usr/src
/dev/wd0e 7.9G 42.7M 7.4G 1% /var
/dev/vnd0c 984M 2.0K 935M 0% /media/crypt
I'll be re-creating this whole thing again soon so watch out for any updates or errata.
Check out: http://www.backwatcher.org/writing/howtos/obsd-encrypted-filesystem.html for some handy mounting/unmounting scripts.
FreeNAS Upgrade from i386 to x64
To get reporting working properly do the following:
SSH to the box (or use the console)
[root@freenas] ~# service collectd stop
Stopping collectd.
Waiting for PIDS: 4002.
[root@freenas] ~# find /data -name "*.rrd" -exec rm -rf {} \;
[root@freenas] ~# find /var/db/collectd -name "*.rrd" -exec rm -rf {} \;
[root@freenas] ~# service collectd start
Starting collectd.
... and reporting will be fixed.
FreeNAS version is FreeNAS-8.0.2-RELEASE-amd64 (8288)
SSH to the box (or use the console)
[root@freenas] ~# service collectd stop
Stopping collectd.
Waiting for PIDS: 4002.
[root@freenas] ~# find /data -name "*.rrd" -exec rm -rf {} \;
[root@freenas] ~# find /var/db/collectd -name "*.rrd" -exec rm -rf {} \;
[root@freenas] ~# service collectd start
Starting collectd.
... and reporting will be fixed.
FreeNAS version is FreeNAS-8.0.2-RELEASE-amd64 (8288)
*BSD vs Linux for Home Server
I have a few simple needs for my home server - it needs to be stable, functional on older hardware (P4 2GHz with 1 or 2 GB of RAM) and run a few simple applications:
- rtorrent (for... ahem... legitimate torrent requirements)
- irssi - the bestest IRC client (and the one I've spent ages getting a nice config file for)
- screen (for teh awesomeness!)
- SSH - for remote work, and for sshfs so I can rsync and backup data remotely
- and a bit of storage space - 100GB is nice
- nagios - monitoring work sites as required
- DHCP
- DNS
Currently I'm running Ubuntu 10.04.3 LTS on a P4 3GHz USDT HP that has a noisy fan in it and I'm going to migrate back to my Dell P4 2GHz box that I was running before. It has a slower processor, is quiet and reliable. It's also more power efficient than the current one. I've been considering getting my hands on an Atom powered box or the like with very low power requirements for home. After all this server really doesn't have to do a lot or work - it just needs to chug quietly away and provide the basic services I need. So why change?
Well several reasons I guess. Security is the big one. Reliability is the next one. A rolling distribution would be handy too - one with easy, in place, headless upgrades.
Most Linux variants will support the apps I listed, as will FreeBSD and DragonFly BSD, my two preferred BSD variants (even though I've had great success with OpenBSD on my Sun Blade - see earlier posts). I'm thinking FreeBSD may be the option to go with, so I'm playing with it under VMware Player at the moment. DragonFly's HAMMER files system is mighty attractive though, so I'm thinking very carefully about this choice. I'll keep notes on my adventure as it goes forward.
Monday, 23 May 2011
HTC Aria Review
After the unmitigated disaster that is the Motorola Backflip I have very fortunately managed to get my hands on the HTC Aria. Although this device is aimed at a mid market it's a wonderful little bit of kit. OK so first up the hardware.
The device itself is quite compact and fits in the palm with ease. I find that I can put it in the same case I had my e66 in without worry and it fits easily. The screen takes up the majority of the Aria with 4 capacitive buttons and a swipe mouse thing as well. Only a few external buttons - volume up/down and the lock/on/off switch. Under the black casing is a brightly coloured interior which is quite striking. The screen itself, which I read elsewhere as being not as bright as the OLED type screens is nonetheless bright and readable. I find it better than my iPhone 3GS to read. The keyboard works relatively well and the device is easy to use.
The built in HTC themes and widgets are superb and I've found that I don't need to add any extra widgets for a lot of the stuff I used on the Motorola.
The device itself is quite compact and fits in the palm with ease. I find that I can put it in the same case I had my e66 in without worry and it fits easily. The screen takes up the majority of the Aria with 4 capacitive buttons and a swipe mouse thing as well. Only a few external buttons - volume up/down and the lock/on/off switch. Under the black casing is a brightly coloured interior which is quite striking. The screen itself, which I read elsewhere as being not as bright as the OLED type screens is nonetheless bright and readable. I find it better than my iPhone 3GS to read. The keyboard works relatively well and the device is easy to use.
The built in HTC themes and widgets are superb and I've found that I don't need to add any extra widgets for a lot of the stuff I used on the Motorola.
Friday, 3 December 2010
DG834 resolved - v5 is where it's at
After much wrangling, I didn't get the Netcomm to work properly, the VPN was still no good and I was unable to get VOIP running across it. Fortunately I ran into an old buddy and he suggested using the v5 of the Netgear router. Lo and behold, it uses a Conexant chipset, not Broadcomm and I put two in, one at either end. Both have been very stable, no dropouts and the VPN works perfectly.
Following this small victory I then deployed one at home and it's working fantastically well. I've been hammering it too so it's all going along nicely and my VPN is working properly too.
While the Netcomm is undoubtedly a powerful device, the lack of configuration in the VPN side of things and the fact it won't send VOIP data properly are big strikes against it. I've redeployed one of these routers elsewhere and the user loves it so that's a win and no financial loss on my part.
The love affair with Netgear is renewed!
Following this small victory I then deployed one at home and it's working fantastically well. I've been hammering it too so it's all going along nicely and my VPN is working properly too.
While the Netcomm is undoubtedly a powerful device, the lack of configuration in the VPN side of things and the fact it won't send VOIP data properly are big strikes against it. I've redeployed one of these routers elsewhere and the user loves it so that's a win and no financial loss on my part.
The love affair with Netgear is renewed!
Things I'd like to see on the iPhone
The number one thing I'd like to see on the iPhone is to be able to turn push mail on and off according to time automatically. My venerable e66 had this - it would check my mail faithfully throughout the day between 8am and 6pm and then stop. It did wonders for the battery life and for my sleep patterns. If I inadvertantly forget to disable this when I go to bed, nagios wakes me up as it's monitoring failing servers or systems.
In fact, the ability to have auto on/off dependent on time is something that the iPhone could apply to a bunch more things too - like changes of ringtones etc. It's probably too hard to do for Apple so as my old dad says - wish in one hand and pee in the other and see which hand fills up the quickest!
The other thing I'd like is for a slightly more robust design, but hey - you can't have everything. My Motorola Backflip (MB300) is more rugged and seems to go pretty well.
In fact, the ability to have auto on/off dependent on time is something that the iPhone could apply to a bunch more things too - like changes of ringtones etc. It's probably too hard to do for Apple so as my old dad says - wish in one hand and pee in the other and see which hand fills up the quickest!
The other thing I'd like is for a slightly more robust design, but hey - you can't have everything. My Motorola Backflip (MB300) is more rugged and seems to go pretty well.
Subscribe to:
Posts (Atom)
Further adventures with Immich - external access
Astute readers and users of this software will note that when self-hosting access is naturally limited to whatever you've got on your p...
-
With the implementation of my Proxmox server it's now time to play with some new applications - and we'll start with Immich, a repla...
-
This is an update of an older post, as the utilities change, so has this concept of a cheap network spike - I use it to troubleshoot network...
-
One of my clients, a non-profit, has a lot of files on it's clients. They need a way to digitally store these files, securely and with a...