Sunday, June 30, 2013

Backing up Win 7 Home Premium via iSCSI + Synology NAS

This post describes how to use iSCSI on Win 7 Home Premium to work around the restriction of backing up to a networked device.

Like many of you, I didn't fork out for Win 7 Enterprise for my home set-up. One thing the Enterprise edition allows which the Home Premium edition does not is backing up to a network drive. Kind of irritating, when you consider that a lot of folks will have networked storage either in a NAS or USB attached storage to consumer networking devices like wireless routers and cable modems.

Until recently, I'd been backing up my Win 7 Home edition to a USB drive, then using the Synology Data Replicator 3 tool to shunt the backup data from the USB drive to the NAS. This is an irritating multi-step process and takes longer than it should.

To work around it (sorry, not going to go through the specifics but they can easily be searched for):
  • set up an iSCSI target on your NAS
  • use Windows 'iSCSI Initiator' tool to connect to the target
  • use Windows Computer Management->Disk Management console to locate the new storage, format it and present it on your Win 7 machine wherever you'd like it (note that Windows backup will only let you back up to what it considers an external drive, so you may need to mount as a drive letter or folder other than on C:\). Despite the drive existing on the network, Windows sees it as a local hard disk.
  • reconfigure your backup to point to the new backup location created in the above steps
  • run your backup.
Now the external drive I was previously using for backups can go on to other duties.

Saturday, June 29, 2013

Installing Oracle VM Server 3.2.2 (AMD x64)

I thought it was time to take a look at Oracle Linux to get a bit more hands-on before launching into some work based on this platform. I signed up for an Oracle id to access the software delivery cloud and started downloading ISOs. After some background reading I discovered that I wanted (for x86, 64bit):
  • Oracle VM Server: the hypervisor (based on Xen)
  • Oracle Linux: the OS (essentially Red Hat)
  • Oracle VM Manager: something to let you start and manage VMs on your hypervisor
  • Oracle VM Templates: various. Oracle VMs pre-built with Oracle products such as their database and middleware apps.
For the installation, I chose to boot off a USB pen drive (the VM Server boot image is only about 256MB), which I created whilst booted into Win7 using Rufus (see comment below about getting 'Boot error' below using Universal USB Installer to create bootable USB sticks).

In my Awared BIOS, F12 brings up the boot options menu during start-up/POST and you can select USB-HDD to boot into the OVM Server installer. Up came the Oracle VM Server splash screen and I hit enter to install at the boot prompt.

boot:
mboot.c32: not a COM32R image

Searching around on the 'net there are various remedies for this, including updating the /isolinux/isolinux.cfg file. I found this to not be helpful. Instead, download the syslinux distribution (I used 4.04) and copy /pathtosyslinux/com32/mboot/mboot.c32 to /oraclevmserverpath/isolinux/mboot.c32. Reboot and you should be able to start up the installer.

I won't drain the installer steps as they are pretty self explanatory but a few quick notes:

  • on a basic PC setup, just create a 1GB logical partition to install Oracle VM Server under a single root file system using gparted or similar user friendly tool in a distro of your choice before you get started as the installer's text-based partitioning tool is clunky.
  • the installer asks for an iso file to retrieve packages. This didn't make a lot of sense to me since the packages appear to be available in the USB Oracle VM Server storage created from Oracle's ISO image. I just copied the ISO file onto the USB stick under /images specified the device (eg /dev/sdc5) and directory (ie /images) and the installer was able to locate the required files to complete the installation.
  • if using manually allocated IPs (not DHCP), think about setting up the IP and DNS entries ahead of time.
  • if you have a multi-boot system, don't install boot loader in MBR, just the partition in which you install the OS. Run update-grub as appropriate once the installation is complete to add the installation to your grub boot menu.
  • It's worth noting that I also tried to create various USB boot drives from a number of linux distros which would all generate get the message 'Boot error' when attempting to boot off a USB-HDD option via the BIOS. After wasting a lot of time investigating whether something was wrong with my BIOS firmware or settings, I discovered that using Universal USB Installer was the cause. I was made more nervous as there are a lot of reports of the GA-890FXA-UD5 F6 motherboard installed in my PC having USB-HDD boot issues however there seems to be some relationship to how the USB stick is prepared.

Monday, January 28, 2013

Enhancing gnome-system-monitor (3.7.4): setting up dev environment

During late 2012 I had some additional time to look at coding and chose gnome-system-monitor to have a play with and possibly extend as I (and apparently many others) found it lacking. I made some progress learning GTK and extending some of the functionality I wanted but it never really got cleaned up and folded back into the main code line before I got busy being busy again.

After blatting my linux install during an Ubuntu upgrade I needed to put a few things in place on my vanilla Ubuntu 12.10 installation before I could start:

# various build tools
sudo apt-get install gnome-common
sudo apt-get install yelp-tools

# various gnome-system-monitor dependencies
sudo apt-get install glib-2.0
sudo apt-get install gtk+-3.0
sudo apt-get install gtkmm-3.0

# to fetch source code
sudo apt-get install git

gsw@goat-lin:~/src/gsm$ git clone git://git.gnome.org/gnome-system-monitor
Cloning into 'gnome-system-monitor'...
remote: Counting objects: 18018, done.
remote: Compressing objects: 100% (6513/6513), done.
remote: Total 18018 (delta 14018), reused 14329 (delta 11454)
Receiving objects: 100% (18018/18018), 7.96 MiB | 385 KiB/s, done.
Resolving deltas: 100% (14018/14018), done.

Then I attempted to run autoconf.sh (note use of --prefix=/tmp to avoid installing broken development code and related artefacts over your working gnome-system-monitor):
gsw@goat-lin:~$ ./autogen.sh --prefix=/tmp CFLAGS=-g

...

configure: error: Package requirements (glib-2.0 >= 2.28.0 libgtop-2.0 >= 2.28.2 libwnck-3.0 >= 2.91.0 gtk+-3.0 >= 3.5.12 gnome-icon-theme >= 2.31 gtkmm-3.0 >= 3.3.18 libxml-2.0 >= 2.0 librsvg-2.0 >= 2.35 glibmm-2.4 >= 2.27 giomm-2.4 >= 2.27 gmodule-2.0) were not met:

No package 'libgtop-2.0' found
No package 'libwnck-3.0' found
No package 'librsvg-2.0' found


Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables PROCMAN_CFLAGS
and PROCMAN_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.


As far as I could tell these libraries were installed under /usr/lib on my system but the pkg-config utility was having issues figuring this out.

sudo apt-get install 'libwnck-dev'
sudo apt-get install 'libgtop2-dev'
sudo apt-get install 'libgconf2-dev'

When you run pkg-config with any of the libraries above, all these errors should go away.

pkg-config --print-errors libgtop-2.0



Now run autogen.sh again to get a clean configuration built:

gsw@goat-lin:~/src/gsm/gnome-system-monitor$ ./autogen.sh --prefix=/tmp CFLAGS=-g

OK, that went through cleanly. As do 'make' and 'make install'.

Let's try to run the app.

gsw@goat-lin:~$ /tmp/bin/gnome-system-monitor

** (gnome-system-monitor:31525): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-c8S3ACfDCn: Connection refused

(gnome-system-monitor:31525): GLib-GIO-ERROR **: Settings schema 'org.gnome.gnome-system-monitor' does not contain a key named 'maximized'
[2]+  Done                    /tmp/bin/gnome-system-monitor
Trace/breakpoint trap (core dumped)


Looking around the system you find /usr/share/glib-2.0/schemas/, and the equivalent directory I just created via 'make install' under /tmp/share/glib-2.0. The trouble is, it doesn't look like the /tmp/bin/gnome-system-monitor is pulling in the right config. For development purposes, the shell(s) under which I'm working with gnome-system-monitor will need an update to the environment to include the new system monitor schema files ahead of the system schema files.:

gsw@goat-lin:~/src/gsm/gnome-system-monitor$ export XDG_DATA_DIRS=/tmp/share:/usr/share

Attempt to start the app again and the GUI starts up as you'd expect and shows the expected version (3.7.4) from git - although still with some warnings that can be worried about later:

gsw@goat-lin:~$ /tmp/bin/gnome-system-monitor
** (gnome-system-monitor:31587): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-c8S3ACfDCn: Connection refused

** (gnome-system-monitor:31587): WARNING **: SELinux was found but is not enabled.



If there's something I've missed in the above to make it harder for myself than it otherwise ought to be, it would be great if you could drop me a comment. Thanks!

Upgrading Synology NAS DHCP server package (dnsmasq) 1.0-2256 to 1.0-2267

The DHCP server has probably caused me the most grief (through high levels of ignorance) on my NAS. Again, I thought I'd document the process should anything go wrong. I'm going from 1.0-2256 to 1.0-2267, which adds PXE support which comes in DSM 4.2.

Post upgrade report shows no issues so far.


Upgrading Synology DSM 4.1-2661 to 4.1-2668

Last time I upgraded the DSM version on the NAS a few things seemed to break so I thought I'd document what I found. The upgrade I'm attempting is DSM 4.1-2661 to 4.1-2668. It also looks like DSM 4.2 is just around the corner. Needless to say, I have everything on my NAS backed up.

Post upgrade I can happily report no immediate issues found.