Search This Blog

Thursday, 27 December 2012

Raspberry Pi & Samba 4

An early Christmas present to myself in the form of a Raspberry PI, no specific plans for it but just wanted one.

I forgot to order a SD card with the OS installed but the wiki instructions and a 16GB card I used in my DSLR worked fine, up and running in less time than it took to download the .img file.

OS is Debian based and the repository is pretty up to date.  I'd recently read that Samba4 was now a full MS AD viable replacement and I fancied a crack at replacing the core services on my home network, currently fulfilled by my NAS.  Rumblings of a web authentication project at work which MS AD is being touted as the directory of choice (yes really) also gave me a good reason.

Install went fine, the rest not so.  Samba 4 requires DNS & Kerberos as partners in crime.  The Wiki was source code centric and alluded to an internal DNS service.  The repo build included BIND 9, which it took me ages to work out, but not Kerberos, which required an separate install.  Needless to say they didn't want to play nicely.

All in all after a few days playing I threw in the towel.  I've no doubt with some perseverance and cursing I could have got it working but figured that I don't really want something that complex running my house core.  One upgrade and pop, back to square one.

But I do like the PI

Monday, 10 December 2012

Cleaning up BackTrack/Ubuntu NIC's

Copying BackTrack virtual box images around and the network wouldn't start.  I'm Recording the commands here as its not something I do everyday and I will have the same issue again .. Same process would work for Ubuntu.

[email protected]:~# ifconfig eth0 up
eth0: ERROR while getting interface flags: No such device

[email protected]:~# lspci
Will list all the hardware devices.  Confirm the Ethernet controller is loaded.

[email protected]:~# ifconfig -a
Will list all the interfaces known to the system regardless if they are 'UP'.  In my case the card was ETH4.

[email protected]:~# ifconfig eth4 up
Worked.

I wanted to clean this up as ETH0-3 are all a result of switching machines and MAC address.

nano /etc/udev/rules.d/70-persistent-net.rules

remove the redundant config and switch your NIC to ETH0

Saturday, 27 October 2012

Did they just reveal Judy Dench/M characters real name ?

Casino Royal
JB: "I thought 'M' was a randomly assigned letter. I had no idea it stood for-"
M: "Utter one more syllable and I'll have you killed"
Skyfall

James Bond introduces 'M' to Kincade the Gamekeeper. He hears Em and deduces Emma.

Coincidence ?

Saturday, 20 October 2012

iTunes and I really don't get on - 100% CPU

If I wasn't attached at the hip to iOS devices I would gladly put every known iTunes developer to the sword.  But I am, and Apple don't seem to be listening to my calls to buy MediaMonkey.

So I have to put up and shut up (well, not so much shut up).

My Windows 7 install of iTunes has been misbehaving. Very slow to start and between it and the AppleMobileDevice service stealing 100% of the CPU. Killing the AMD service made the machine usable, just.

Eventually looked into the issue and low and behold plenty of reported problems.  And all the solutions were to run 'netsh winsock reset' << Wait, what!, I seriously have to reset the settings back to default?

Apparently different apps clash, Apples bonjour service being particularly susceptible. Getting Autoruns and clicking the Winsock tab only showed bonjour and HMA VPN server (highly recommended) entries. This machine is close to a rebuild when Windows 8 is on general release so what the hell.

Ran the command, reboot and bingo. iTunes restored, HMA Winsock entries gone, but HMA still working (?)

Did some more reading and it seems any type of networking problem will lead to netsh winsock reset. Not sure after, cough, many years of being in tech I've never come across this before.

netsh winsock reset = swiss army knife of Windows.

Monday, 17 September 2012

My CISSP Journey.

On Sunday 16th September 2012 I sat, and passed the CISSP exam.

I won't say this was an entirely pleasant experience and certainly not something I plan on repeating anytime soon.  For those that maybe don't know the CISSP is a gold standard professional qualification for security in the business. Made up of 10 domains, each a 'common body of knowledge'.  An inch deep and a mile wide is the phrase often associated with this qualification.  Not sure I agree, at times it felt like a mile deep and I was standing at the bottom looking at a tiny shard of light.

My journey began in March 2012 when I decided to pursue the qualification and so ordered what some people review as the holy grail of resources, Shon Harris All in One CISSP Exam Guide (5th), commonly known as the AIO.  This is a behemoth of a book!  The instant it arrived I sought out a PDF which was hooked up to GoodReader (highly recommended app) on my iPad.

Around mid April I had finished chapter 3.  A seriously PAINFUL read. Security Architecture & Design.  I was ready to quit on more than one occasion.

By this time I had stumbled across plenty of decent online resources. cccure.org, with its excellent test engine (pay up people) and forums and a blog by Richard Rieben.  I emailed Richard to say thanks for taking the time to post and in return he kindly volunteered as a resource if I had any questions.  Which of course I had loads, I had inadvertadley gained a mentor.  And what a valued resource that was!

Richard recommended some other, lighter reading.  CISSP Prep Guide: Mastering the 10 Domains. A pretty old book but bang on the money for a resource.

I had set my self a target of a summer exam and was also considering taking the (ISC)² seminar along with self learning.  I (somehow) managed to get my employer to commit to paying for the bootcamp at Firebrand.  Listening to the reps you could just turn up with zero knowledge, 7 days later walk away with a CISSP.  Yeah, maybe, but not me.  I wanted that course to be the icing on the cake and so continued with the self learning.

Skip forward 6 months, a number of freak outs, LOTS of reading (I could easily have put in over 1000 hours!), NIST docs, watching videos, making copious notes, 2000+ questions taken on cccure and the day of the class had arrived/snuck up on me rather sharpish.

When the chit chat started it was quickly apparent that I was the guy who had done the most prep, most owned a book but gave up.  I was shocked, but not as much as they when the class started at 100mph.

I was booked on the Boot Camp, 6 days with the exam on day 7.  An all encompassing learning experience which started on the Sunday we arrived.  Dennis Griffin from (ISC)² would be our tutor and I can still hear his US Southern drawl, and I heard it all through the exam, like a mini Dennis sitting on my shoulder.

When I got the (ISC)² Seminar book I quickly realised that every piece of CISSP material out there, most of which I had consumed, including the Official (ISC)² Guide (OIG) had loads more info than the class, to a much greater depth and much of the information was out of date.

We stormed through the domains at an average of two a day, nothing we tackled was new to me and I started to feel comfortable,  maybe too comfortable.  As the test day approached I started to wonder what would happen if I failed.  Where would I go? how could I improve? I knew that content inside out.  Shortly after that realisation I started to freak.  Thursday PM I left the class early and just went for a long walk.  I think the whole week was starting to get to me, 14 hour days and reading before and after class was exhausting.

I followed the instructors, and Richards advice and packed up learning Saturday afternoon.  Went for a walk and had dinner at the local golf club, went back to the room and watched a couple of movies.  I slept surprisingly well considering every other night had been restless.

Sunday, test day.

The class had agreed a 09:00 start.  We were all ready by 08:00 and the guy said we could start if we wanted.  We all did.

The next 5 1/2 hours are a bit of a blur.  We'd been told the average time for the CBT test was 3 hours and the fastest 56 mins!  I already had my test plan, 50 questions, break, pee, drink, start again.  Any question I wasn't 100% on I would flag, note down and come back to.  The first time I looked at the clock 50 questions had taken me over an hour and my review sheet was growing at a horribly fast rate, a 6 question flag run somewhere in the 80s had me on the back foot.

I hit 250 at about 4:45.  Had a break and started to review the 50-60 I had marked.  Some immediately jumped out, the majority not.  By 5:30 I was clock watching and knew that I was mentally breaking so just started doing the remaining questions as if it were a practice test.  Maybe that helped with the stress and I hit some correct choices, I actually didn't care by then.

I ended and went through the multiple 'are you sure ?' boxes and walked out.  I felt shit, I didn't think I had a pass but also not a fail.  I was broken.  Nothing came out of the printer, "did you press exit?" - bugger.  The procture went and ended the test, the printer started, paper came out.

Congratulations! I made her read it twice to be sure and then did a little dance, really, I did.

My thoughts

If I were to advise someone who was considering this journey then I would strongly suggest they get hold of a Seminar course book, beg, borrow, buy, steal.  Get that book.  Read it and use it as the template to branch out using other resources but staying within the confines of the book.  If you can, take the seminar, if you go for a boot camp/fire hose then do the prep.  Don't turn up and hope to be drip fed.

The exam

The CBT actually worked OK and I think I would have preferred to a paper test.  Marking questions for review, navigation etc all works well and they even provide an on screen calculator if you need.  Once you get to the end you are prompted with marked questions, you can either review them individually or in order, unmarking as you go.

Half way through the exam I actually realised that even if was an open book exam it would probably only give you 20-30 questions, max!  The questions are clever and conceptual, wanting you to understand the question and apply knowledge and judgment.  Some questions had the obligatory 4 right answers but none of them were tricks, no double negatives.  Just a fair few WTF does that mean! In general I didn't have a problem with the way they worked but did find the majority of the 'scenario' questions rather pointless.  I of course can't give any details but came up with this analogy.

"You have been hired as a chocolatier for XYZ.  They make dark, milk, white, buttons, bars and eggs.  They have recently acquired a new company who make biscuits, they are moving to a bigger premises and will be recruiting 100 more people in the next 6 months.
The CEO has declared they need to :
  • Increase domestic growth 
  • Move into new markets."
 What is the main ingredient in chocolate?
  1. coca
  2. milk
  3. sugar
  4. paper
The actual question stands alone, the scenario mostly just kills your time.

What to learn

The Seminar book and everything else has lots of content.  Know this, but, and this what everyone says, understand it ! (see comments about open book)

The material I used:
My thanks to Richard and my long suffering girlfriend.  (in that order, she never reads my blog)

Wednesday, 8 August 2012

iTunes/AppStore default apps assigned to another user

The iLife apps which now come with Lion+ are by default 'assigned' to the first iTunes user that logs in to the MAC and updates.

Which is fine if its your personal device but not fine when its a business one and that initial user leaves the company.  Apple provide no method to re-assign apps and the no media mandate means you can't re-install.  Essentially your broken and can't update any of the apps.

Spent a good deal of time on Google and eventually emailed support - who were crap.

Resorted to calling Apple Care and after the first tech tried to send me back to iTunes support.  With some perseverance I got through to a senior tech (who wishes to remain anonymous). He took the details and totally owned the case.

Came back within the hour and said we could switch the registration from user XYZ to ABC.  We registered ABC, which will now become the business iTunes account and had the apps switched over.

At first this failed but a suggestion to delete the apps and then re-install resolved that.

Happy user, and really happy with the way Apple support dealt with this.

Monday, 9 July 2012

Chrome 20 - VERY laggy

After an Ubuntu 11.10 update my Chrome became utterly un-usable.  I mean really laggy when typing and scrolling.


Found a forum post that suggested the problem is a recent Flash update.


http://askubuntu.com/questions/161228/chromium-input-fields-lag/161539#161539

  1. Install the adobe-flashplugin package
  1. In Chrome, go to: chrome://plugins/
  1. Disable the /opt/google/chrome/PepperFlash/libpepflashplayer.so instance of Flash Player
  1. Restart Chrome

Problem fixed, at least for now.

Monday, 11 June 2012

Change the Grub Boot Order Ubuntu


GRUB can be configured using the /etc/default/grub file. Before you make any changes to it, it may be a good idea to back it up by creating a copy:sudo cp /etc/default/grub /etc/default/grub.bak
You can restore the copying the backup over the original:sudo cp /etc/default/grub.bak /etc/default/grub
Open the file using the text editor with root privileges:gksu gedit /etc/default/grub
The line GRUB_DEFAULT=0 means that GRUB will select the first menu item to boot. Change this to GRUB_DEFAULT=saved . This change will make it easier to change the default item later.
Save and close the file. Run this command to apply your changes to GRUB’s configuration:sudo update-grub
The configuration change we made allows the grub-set-default and grub-reboot commands to be used at any time. These allow you to change the default boot item permanently or only for the next boot, respectively.
Run grub-set-default or grub-reboot (with sudo) with the number of the menu item to boot (the first item is 0). This command will change the default to the second item:sudo grub-set-default 1
In the screenshot above, Windows Vista is menu item 5. If you want to select an item from a submenu like Previous Linux Versions, you can specify the position in the main menu, followed by a greater-than sign (>), followed by the position in the submenu. You can also name an entry instead of giving its position. There’s a Forum post about how this works. The Ubuntu Wiki also has more details on configuring GRUB.

Friday, 18 May 2012

VMware, a changing beast .. VMUG 17/5/2012

Attended the London VMUG yesterday which turned out to be a particularly interesting agenda.

UG have previously been very infrastructure specific. Servers, hardware, software releases, storage, heated network debates and third party vendors touting their wares.

This one had a slight deviation into some of the new VMware initiatives. First a short, but nice presentation on vFabric and vApp. Both things I'm interested in due to my employer recently jumping on the VMware/Spring stack. tcServer, Gemfire and even big brother EMC rolled in with a couple of Greenplum racks.

The second break from tradition was a slot given over to Neil Mills (@MillsHill_Neil) of Mills Hill Recruiting.

The pre-amble by Simon Gallagher (@vinf_net) very much set the tone on how the traditional VMware geek needed to, or should start to become way more holistic in their approach to technology and solutions.

Neil followed this up with his presentation setting the vision for the 'Cloud Angel' and the next 5 years.

Cloud Angel: Someone who's no longer constrained by the silos of technology, someone who's adept with the cloud harp and can transfix the business with their melodic musings of an automated data centre with apps and services flowing from the fingers of devs out to consumers with no more than a man and a dog.

Being a VMUG it was a VMware centric presentation, VCP will be/already is expected, push your VMware and storage, VMware and security, VMware and <insert technology>, you get the idea. On the journey home this poked a few brain cells.

Together the two presentations got me wondering about the future and how much of an angels tool box will contain the VMware we know today, 5 years is a long time.  Can they continue to be this dominant? I think something missed, maybe for controversial reasons, is to consider some of the alternatives.

VMware acquisitions are taking them up into the app layers while the new kids on the block are starting to get rowdy, OpenStack, Piston, Eucalyptus, AWS etc.  The trend is also towards infrastructure as a commodity, vBlock, Flexpod, wheel it in and wheel it out, bursting into public clouds, moving into public clouds.

Its the new things that will keep them in this market, I guess that's an obvious statement! But will it also become the direction at the expense of the more traditional. vApp is a great example that just happens to run on vSphere, but does it have to?! I wonder if theres a secret lab where virtual pixies are plugging the next generation of solutions into other API's and one day we'll might even see vSphere being given away.

VMware were undoubtedly a game changer in this industry but we're starting to see the next evolution. It will be interesting to see how they, and the Angels adapt.

I hope they do, I already buried Netware and that was traumatic enough.

Wednesday, 16 May 2012

I can't click on the flash plugin 'Allow/Deny'

Ubuntu, Chrome & Firefox both had this.  IM app tried to invoke a flash URL to launch a video share service.  The Flash 'allow/deny access to your camera' dialogue box would pop up but nothing was active, no clicky mouse.


Go to :

http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager09.html

and it displays the flash global settings for your workstation.  Set the site you want to allow to 'don't prompt' and all is well.

Tuesday, 1 May 2012

Backtrack Chromium

Chromium can be installed from the repo's but by default won't run - root error

Follow the steps below :

1. apt-get install chromium-browser
You can also use synaptic and select the chromium-browser.

2. cd /usr/lib/chromium-browser

3. Replace geteuid to be getppid using hexedit with the following command :

hexedit chromium-browser

Then press tab to switch to the mode string. Then press ctrl+s and type geteuid. Replace geteuid to be getppid then press ctrl+x to exit!

4. Finished

EDIT 9/11/2012

This same process works for the Google Chrome.  File to edit is /opt/google/chrome/chrome

Saturday, 14 April 2012

Alfa AWUS036H/RTL8187L on OSX 10.6

The drivers on the Alfa site only support up to OSX 10.5.  I found various blogs, which were all EXACT copies of each other and none of which worked.

Eventually stumbled this article which got me close.

This post will just extend that blog with the things I found.
  1. Download the 10.5 driver from the Alfa download site
  2. Install, ignore the corrupt warning & reboot
  3. Open a terminal and type :
  4. sudo kextutil /System/Library/Extensions/RTL8187l.kext
    Notice: /System/Library/Extensions/RTL8187l.kext has debug properties set.
    /System/Library/Extensions/RTL8187l.kext has problems:
    Authentication Failures:
    File owner/permissions are incorrect (must be root:wheel, nonwritable by group/other):
    /System/Library/Extensions/RTL8187l.kext/Contents/Resources
    /System/Library/Extensions/RTL8187l.kext/Contents/Resources/English.lproj
    /System/Library/Extensions/RTL8187l.kext/Contents/Resources/English.lproj/InfoPlist87l.strings
  5. You now need to :
sudo chmod go-w [The File]
eg : 
sudo chmod go-w /System/Library/Extensions/RTL8187l.kext/Contents/Resources
sudo chmod go-w /System/Library/Extensions/RTL8187l.kext/Contents/Resources/English.lproj
sudo chmod go-w /System/Library/Extensions/RTL8187l.kext/Contents/Resources/English.lproj/InfoPlist87l.strings

Now this is where it goes a little off piste.  Following the reference article you should now just run the Realtech util and off you go.  For me that didn't work and the app wouldn't even run.

I restarted again and ran :
sudo kextutil /System/Library/Extensions/RTL8187l.kext

It reported no file permission errors but at the same time I was both prompted with OSX's "found a new network interface" and the RealTech app launched and allowed me to configure the NIC.

UPDATE 12/11/2012 : These drivers are 32bit.  Apple has removed the ability to do anything in 32bit with the Mountain Lion release.  So far I can't find anyway to get the 8187L working on ML. <sad face>

Thursday, 5 April 2012

apt-get Proxy Issue

Testing out Security Onion and apt-get update was failing.  The server is behind a proxy.

Added proxy settings to all the regular places :

/etc/environment    
export http_proxy=http://proxy.domain:port
/etc/apt/apt.conf    
aquire::http::proxy "http://proxy.domain:port/"; 
/etc/apt/apt.conf.d/80proxy    
aquire::http::proxy "http://proxy.domain:port/";

None of which worked.  In the end the command :

http_proxy='http://proxy.domain:port/' apt-get update
and because I always forget how to do this :

#!/bin/bash
http_proxy='http://proxy.eu.rtdom.net:8080/' $1 $2 $3

Friday, 9 March 2012

MAC Keyboard with anything other than OSX

My friend @coringrieves recently posted a picture of his desktop. Which is a Windows PC (he is averse to anything other than Windows) and a wired MAC keyboard. After mocking him furiously I then went and did the same myself.

Still persevering with Ubuntu it has an English (UK, Macintosh)keyboard layout which works great.

Not so the VirtualBox Windows 7 VM I run nor the Win64 alternative OS I sometimes boot into (Never did find a decent/working H.232 Linux video client).

Trawling around it seems the options are mostly based on installing Apples bootcamp.  Which is huge, I'd rather have gone and bought a Mac looky likely kb than install that bloat-ware.

Stumbled across another suggestion of using Microsofts keyboard layout tool to create your own, or in this case someone else kindly did it.

http://www.logikdev.com/2010/02/18/apple-uk-keyboard-layout-for-windows/

Installed, VirtualBox VM and vanilla OS all work fine.

Wednesday, 7 March 2012

Friday, 2 March 2012

Ubuntu/Backtrack eth0/wlan0 Missing

My good deed for the week was to offer my laptop as a replacement for one with a screwed VGA port.

'Yeah just switch the disks' - Linux is clever, it will work it out. #FAIL

Dual boot with Ubuntu 11.10 & BackTrack (Ubuntu).  Both failed to connect to the network and had created eth1 & wlan1 interfaces.

Google took me to http://www.orzeszek.org/blog/2010/07/25/fix-missing-eth0-when-cloning-ubuntu-vmware-virtual-machines/

Its discussing the same problem, but in a virtual environment.  The conclusion is the same in that the MAC address has changed and Ubuntu stores this as a reference in :

/etc/udev/rules.d/70-persistent-net.rules
Delete the file, reboot, problem fixed.

Tuesday, 21 February 2012

I think I broke Google

A tweet from @MarkMaceSmith asking :
 Why have you got hundreds of my images on your website Paul Regan?
Had me wondering what the hell !?

A quick look and he was right (kind of).. But not just his images, EVERYONES!

http://www.paulregan.co.uk/m/viewAlbum?uname=110372774069389594216&aid=5492124562868999953&start=0

Shows his gallery on my domain.  Note the the Picasa Mobile URL (/m/) which also gave me the answer.

I have masked the Picasa URL using an Apache rewriteRule on my site :
RewriteRule   ^m/(.*)   http://picasaweb.google.com/m/$1   [NC,P,L]
It appears the Google spiders came along and followed this all the way through Picasa's structure.  I don't know how deep but Google site:www.paulregan.co.uk/m/ currently returns >250K links and every one of them works!

I can probably fix this with robots.txt, but ..

  • Should I?  
  • Have I inadvertently discovered SEO gold? 
  • Will I be struck off and sent to web-master jail/gaol? (I probably should be)

#twitter

Monday, 20 February 2012

Linux Clonezilla "Error: no argument specified"

Ubuntu 10.04 LTS cloned from an identical friend using Clonezilla.

When you boot theres a quick flash of an error, in this case SSD disks so too quick to read, and your presented with the GRUB menu.

Selecting the current kernel threw out :

Error: no argument specified
All the grub config files appeared correct.

Fix :

  1. apt-get remove grub-pc
  2. apt-get remove grub-common
  3. rm /boot/grub/grub.cfg
  4. apt-get install grub-common
  5. apt-get install grub-pc
    • Install grub to the disk to contain MBR, in my case /dev/sda / 


Wednesday, 15 February 2012

Puppy Linux Full Install


  1. Download and create the Puppy linux LiveCD/LIveUSB
  2. Boot the PC using #1
  3. Follow the options to configure the screen res and then the locale options
  4. Prepare the disk, if you need.  Menu -> System -> GParted.  Delete/create the partitions as you need and restart the PC.  Don't save settings
  5. Install the files to disk.  Menu -> Setup -> Puppy universal installer. Follow the prompts to select your local disk.
  6. Install Grub. Menu -> System -> Grub legacy boot loader.  Follow the prompts and when asked select your local disk, eg /dev/sda1 and make sure you select destination to MBR.
Puppy Linux installed on 9 year old Sony Vaio.  I thank you.  

Wednesday, 8 February 2012

Crowbar and OpenStack Pt Deux

As a follow up to part 1 which left me with an 'installed' environment but no networking I thought I should post a follow up.

Since I last messed around a new version of crowbar (1.2) had been released so that was used.  A nice addition is rather than research/guess the OpenStack barclamp install order they are now nicely arranged on the Crowbar admin panel.

I also came to the conclusion that my networking 'issues' were a result of both me trying to install on vSphere, which has no support for native VLAN's and by complicating things by trying to shoe horn the networking into my corp range.

So I build a little lab which consisted of anything not nailed to a desk, I could find lying around, or that no-body would notice missing.


Switch - vlans created with SVI ports as needed for default gateways and all ports 802.1q to the nodes.

Crowbar install went fine using Pt1 to fill in the missing details.

The Swift install failed until I added some more storage (those cutting edge USB disks on top) and restarted the Crowbar install from scratch.

My first attempt at building a instance failed.  The instance remained in status of 'building'.

To debug

Use the Nova console to check which node the image has been deployed to and then grep the local /var/log/nova/nova-compute.log for ERROR.

2012-01-13 02:52:59,933 ERROR nova.compute.manager [-] Instance '5' failed to spawn. Is virtualization enabled in the BIOS? Details: internal error no supported architecture for os type 'hvm'

This is a result of the crappy hardware I'm using so I changed the nova barclamp to 'qemu' and bingo,   deployed instance - well, sometimes.  It seems pretty hit and miss, which I can't yet trace.  I suspect I could still be suffering from the Heath Robinson lab I've put together.  Pt.3 :)


Some useful bits I picked up and am keeping here for the moment

nova uid and password : admin / crowbar

Deployed nova/images instance path - on nodes :
  /var/lib/libvirt

sudo nova-manage service list

mysql -u<user> -p<password>

Log entries of instance deploy and destroy.

2012-01-13 09:02:57,736 INFO nova.virt.libvirt_conn [-] instance instance-00000007: deleting instance files /var/lib/nova/instances/instance-00000007

2012-01-13 09:02:58,462 INFO nova.virt.libvirt_conn [-] Instance instance-00000007 destroyed successfully.

2012-01-13 09:07:29,306 INFO nova.virt.libvirt_conn [-] Instance instance-00000009 spawned successfully.

Monday, 6 February 2012

Windows Killed my MBR

Having recently acquired a SSD and some more geebees I re-installed Ubuntu x64.  The SSD already had a OEM Windows partition and I (foolishly) decided to just resize it 50/50 and put Linux on the back end.  With a mind to come back and build the Windows OS as a dual boot.

Well this morning I went back, built the Windows OS and then fried my GRUB boot loader.  Bye bye Ubuntu, insert sad face.

Recovering it wasn't so bad although as usual there is LOTS of conflicting documents and ways to get yourself out of this mess.  This method worked for me :
  • Boot Ubuntu DVD in live mode.
  • Jump into a terminal and switch to sudo -i and run parted -l to establish which partition you need to rebuild the MBR for.
~$ parted -l
Model: ATA SAMSUNG SSD PM83 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number  Start   End     Size    Type      File system     Flags
 1      1049kB  106MB   105MB   primary   ntfs            boot
 2      106MB   45.1GB  45.0GB  primary   ntfs
 3      45.1GB  128GB   82.9GB  extended
 5      45.1GB  120GB   74.4GB  logical   ext4  <---- Ubuntu Install
 6      120GB   128GB   8453MB  logical   linux-swap(v1)

  • mount the partition 
mount /dev/<partition> /destination
eg : mount /dev/sda5 /media/sda5

  • run 
grub-install --root-directory=<mount> <disk>
eg : grub-install --root-directory=/media/sda5 /dev/sda 
Assuming you get a success message your good to go.  Reboot and you should have Linux back and in my case Windows 7 also now existed on the GRUB loader.

Caveat : The first time I tried to boot Windows it complained of a missing loaded.  The second time it worked fine .. I never got to the bottom of that.

Moral of this story is install Windows first and Ubuntu second.  Ubuntu is a clever OS and Windows is not.

Sunday, 8 January 2012

New Year, new look

I've been wanting to revamp my website (all two pages of them) and blog design for a while now.  I wanted a cut down basic look which I'd seen on other sites.  I'm not shy, and 'imitation is the sincerest form of flattery' right !?

Most of the other sites I'd seen sat on Wordpress.  I toyed with this and even tested the theory using an AWS cloudformation Wordpress stack.  Which incidentally worked really well !  But I've committed to blogger so wasn't going to going to switch that part and learning another platform just for a few pages seemed excessive.  Although in hindsight probably less than the path I took.

I started to mess around and build up some html/css.  One of my targets was to get a functioning menu rather than the multiple image hack I'd put together before.  Reason : I'd stand more of a chance of getting the Google search sub-headings.  Thinking about it I don't really know 'why' I want them, but that's now irrelevant.

I found this http://blog.vogtjosh.com/post/2990652547/css3-animated-drop-down-menu which has a really nice looking transition menu - well, I say nice, nice on SOME browsers.  Basic on others (looking at you Microsoft).

De-constructing the CSS to get the look I wanted was not quick.  A steep learning curve which went back and forth as the smallest change broke the look in different browsers.

I applied the same fade look to the social icons, again, that took ages and often meant going back to square one.  Mostly due to my crap web skills but also because of very different behaviour across browsers and because I didn't do any revision control.

Persistence paid off and its mostly finished with the main page, picture gallery and blog all with a similar look.  There are a few bugs which I need to look at and I need to clean up and better annotate the CSS.  But mostly I'm happy with the result, especially in Chrome, IE - pah, who would use that as a browser now anyway. And I also learnt some new skills which is always nice.