Thursday, 2 June 2011

Solaris 10 RAID bug 6901327 - better workaround

If you've just initialized RAID 1 on 2 disks with a recent Solaris 10, you'll hit a bug - 6901327. Label can't be written to the disks after you initialize a RAID volume.

The workaround in the bugnotes is pretty shit - you have to use an earlier version of Solaris, boot off that in Single user mode and create your label. This sucks so here's a quicker way:

After you create the volume, issue (if c1t0d0 is your new RAID volume):
format -e c1t0d0
format -e c1t0d0

You'll create an EFI label, which isn't what you want but it will write. Then you change this to an SMI label - which is what couldn't be written in the first place.


Monday, 14 March 2011

Emulating Sparc Solaris on x86 - NEIN

Howdy. So I'm trying to install a Sparc version of Solaris on an x86 VM because:

- There's no spare Sparc machine around here powerful enough for what I need
- The one I can find is a POS and won't really do anything
- It'd be grand to be able to do it on my laptop

So installed qEmu which uses Bochs as an emulator. It doesn't boot Solaris - getting a system halted error. Apparently something to do with resource redirection.

One must now find a spare Sparc machine with enough power. NEIN!

Tuesday, 12 January 2010

Friday, 4 December 2009

Tuesday, 15 September 2009

Testing Windows 7 SMB 2.0 BSOD Exploit!

Friend and colleague Cedric told me about an exploit uncovered a week or so back (read about it here) that allows remote users on a network, to blue screen a machine running Vista, Windows 7 or Server 2008.

This is because these OS versions run SMB 2.0, and are suceptible to a malformed packet, causing a PAGE_FAULT_IN_NONPAGED_AREA blue screen of death.

Apparently, this is fixed in Windows 7 7100, at least with the update I'm currently running.

First, Cedric found a working Python install on the lab unix cluster. So the script was edited to include my IP address and run on the machine.

At first it was thought that perhaps SMB was blocked from lab to the user network, but this works fine - as you can see with these packets:

Ping from unix cluster in lab:
757 2009-09-15 10:46:30.618160 UNIX(IP-Removed) Win7(IP-Removed) ICMP Echo (ping) request

Here's a couple of MS DS packets coming in from the python script on the unix cluster:
49 2009-09-15 10:45:56.127200 UNIX(IP-Removed) Win7(IP-Removed) TCP 49065 > microsoft-ds [SYN] Seq=0 Win=49640 Len=0 MSS=1460 WS=0
71 2009-09-15 10:45:59.504096 UNIX(IP-Removed) Win7(IP-Removed) TCP 49065 > microsoft-ds [SYN] Seq=0 Win=49640 Len=0 MSS=1460 WS=0

And a reset from my machine:
85 2009-09-15 10:46:04.018977 UNIX(IP-Removed) Win7(IP-Removed) TCP 49065 > microsoft-ds [RST] Seq=1 Win=49640 Len=0

So it would appear the exploit is fixed in the evaluation build, 7100, of Windows 7. No BSOD.

Interesting experiment! Would be nice to get this working on a Vista machine. There's a laptop around here running it, I should find it and try.

Sunday, 26 July 2009

Diego Garcia...

Haha... Wut? Diego Garcia?!

Was searching for anything tagged as Military Base near Menwith Hill in the UK - and Google Maps suggested I search instead for Diego Garcia.

After further investigation - this isn't in fact a Mexican pop singer. It's actually an island in the Indian Ocean.

From Wikipedia:
Diego Garcia is an island considered the largest atoll, in terms of land area, of the Chagos Archipelago, and is part of the British Indian Ocean Territories.

In the 1960s, the Chagos archipelago was secretly leased to the United Kingdom and detached from Mauritius with the intention of expelling its entire population and establishing a military base.

So there..!

Tuesday, 9 June 2009

Chicken, tomato, onion stew with pasta

  • 4 Chicken legs on the bone
  • 1 Red onion
  • 2 Cloves of garlic or some ready crushed shit
  • Some chilli flakes (leave the amount up to you - don't overpower it, if you use a lot, put it in early)
  • Couple of mushrooms cut into small slices or cubes
  • Tablespoon of olive oil
  • Cup of water (loads of fluid, we will cook the shit out of it)
  • 2 large tomatoes
For the tomato sauce, you can either:
  • Get a 330ml pot of ready made tomato sauce with basil, or
Make your own:
  • 3 tablespoons tomato puree
  • 2 more really finely chopped/crushed large tomatoes
  • Water - a cup?
  • Salt, pepper
  • Basil
So now you have the ingredients, fry the chicken on a medium heat for 10 minutes or so - so the skin is browned. While you do this, put everything else in a pot, chop the tomatoes quite liberally so they are thick slices - make sure the pot is big enough to allow everything to sit and stew.

You want to give it a good stir and heat this up the same time you fry the chicken. Then when everything is hot, put the chicken in and stir it a bit.

Then leave it for like 20 minutes on medium/low heat and cover it. Then give it a quick stir and put the lid back on. We want the chicken to cook through properly, and this will be much better with the lid on.

So leave for another 10 or 15, until it's bubbled away for some time and the chicken will be done. Check the chicken if you like, it will probably be falling off the bone anyway at this stage.
Then uncover, and leave again - you may need to increase the heat a couple of notches to get it bubbling with no lid -but watch the burning on the pan. Stir more often!

While this is bubbling away, leave until it's a bit more cooked down, then stick the pasta on, if you want it with pasta. Will be good with rice too.

You can crack some pepper on it just before serving.

Great with red wine, or a cold lager if you made it spicy.

Also - leaving this in the fridge for a night, then cooking up again next day with a bit of water and oil is great. The flavours really get into the chicken.

Wednesday, 4 March 2009

Chicken with mango and spicy pasta

Chicken with Mango salsa with spicy tomato pasta

Mango, Pineapple, Papaya

Put the oven on at about 220*C (fan oven) and put the kettle on with 500ml water.

On a baking tray, put about 30x30cm foil, a bit of oil and some chilli flakes. I put a bit of cracked black pepper too but probably didn't make any difference.

Get a chicken piece and make some large cuts in it, probably half deep in the chicken. Put this on the baking tray.
On the chicken goes some more chilli flakes and some
chopped garlic if you can be arsed. Otherwise I put a little finely chopped onion, and then the Mango, Pineapple and Papaya salsa. I guess not quite enough to totally cover the chicken piece. But it's up to you. Remember there will be sauce with the pasta too.

Get a tomato and chop it coarsely, quite thick slices, then half the slices and put them so they're on the chicken but upright at the side if that makes sense. Standing up, one could say. But leaning on the chicken. A bit like a drunk waiter. Anyway, once that's on there, fold up the foil to make a miniature tent above the chicken with a gap above, to trap the steam.

Then best to put it in the oven or it will be shit and raw and noone will eat it.

Then put the pasta on, I cooked that, drained it, added tomato and basil sauce then when that's finished warming through, hopefully (around 15-20 minutes later) you should have the chicken ready as well. Combine cooked chicken + pasta with sauce and you have yourself food hopefully.

Found it nice with red wine. But then I find everything nice with red wine.


Tomato sauce with Basil

Saturday, 31 January 2009

Hot dog

I made a hot dog:

Half a tortilla wrap
Herta hot dog
Some chilli flakes

In the microwave for 1 minute

Put some tomato ketchup on it

Eat it

Then go to bed

Sunday, 4 January 2009

Chorizo on toast

Nice Italian inspired snack

- Roll with olive pieces in
- Chorizo with nuts in
- Feta cheese
- Shredded sun dried tomato
- Chillis
- Green pesto
- Extra virgin olive oil

So you get a nice roll with olive bits in, spread over the pesto, then some feta cheese cubes, shredded tomato pieces, put the slices of chorizo around the cheese, sprinkle on the chilli seeds from inside the chillis, and then drizzle over a little extra virgin olive oil.

Put it under a grill for 5-10 minutes - the cheese will burn if left too near the top of the grill.

Then eat it massively. Recommended with cold Orangina from a tin.

Monday, 8 December 2008

Windows XP Crash on Demand

If you need to generate a memory/kernel dump for any reason, you can force XP into a blue screen of death:

Hold right control key, press scroll lock twice quickly

There is a registry setting that is to be enabled for this to work - however it was already enabled here. I can't tell if it's enabled on a standard XPSP2 build (this is a custom corporate build).

Obviously this will hang your session so I don't need to tell you to save your work before doing it.

Saturday, 22 November 2008

Recipe: Pesto pasta with Chorizo, Chicken, Chilli

Pesto Pasta with Chorizo, Chicken, Chilli

Quite a good one this. Quite fun to make, takes ~15 minutes.

Ingredients per person:
  • Pasta - Penne Rigate number 73
  • Bertolli Est. 1865 Extra virgin olive oil - 2.5 tablespoons
  • Chicken - 1 breast (hurrhurr)
  • Unpeppered Chorizo - 8 ~4mm Slices
  • Red Chillis in Vinegar - 2
  • Dried 'Blue Elephant' Red Thai Bangkok Chillis - 3
  • Pesto alla Genovese - 2 hearty teaspoons
  • Cracked black pepper
  • Little bit of salt
  • Tiny bit of that green mixed herb shit that I can't remember while writing the recipe and drinking scotch
Cut the chicken into thin strips, think stir fry but a little bigger maybe. Up to you really but this way, you really get the oils and stuff around the chicken pieces.

Get a good wide pan for the meats and stuff, and another for the pasta. Put boiling water in one and fill full of however much pasta you will need, it's up to you really. I put shit loads in then end up having leftover.

Now put your pan on the heat and add the olive oil. Be plentiful, we're not cooking bacon - this oil is part of the ingredients, not just to stop it from sticking. (But please don't put the whole bottle in that's silly). (If you do, take a picture). -Here is where you adjust timings if you like your pasta really soft. Leave it two minutes until you put the meat on here. Otherwise, it will be just a little al' dente.

Get two of the chillis in vinegar (shake off the vinegar) and take off the stalks - cut in two and rub them between your fingers so they break open - now put them in the oil (skin as well, it's not dried because of the vinegar). This will flavour the oil with chilli goodness.

Chop the chorizo while this is heating up - but just as the chilli seeds start to go a little nuts, put in the chicken closely followed with chorizo. The oil will be hot so stir like a bastard for a bit and maybe turn it down to 7/10, or if you're on a gas hob GTFO instead.

Pasta might be going a bit crazy now so to avoid hot water everywhere, turn it down maybe.

Stir everything around as usual, and now add two thai chillies. Then occasionally stir for a few minutes - until the pasta is ready.
watch the chicken to make sure it's cooked. The two pans should be ready at around the same time if you like your pasta a little al' dente, if not then adjust timing at the start.

Just before you're ready - grind in the black pepper. You can add a bit of salt but the chorizo probably takes care of this for you.

So turn down the meat pan to like 3 and then drain the pasta. Add however much pasta you want to eat to the meat pan, and then put in the pesto. Stir around massively and add one further thai chilli here for back-of-the-throat heat!

Serve with ice cold lager because it's great for the throat with the chilli. May I suggest Heineken, Jupiler, anything light. Strong beer might not mix with the chorizo.
Or a nice red wine - but I am no wine expert. Choose one that goes with rich, spicy, salty food.

I'm off to drink scotch and hope it starts snowing again. Ole'!

Saturday, 28 June 2008

Metronidazole and Alcohol - how much can you have?

So antibiotics eey? The long standing tradition of not drinking while on antibiotics has come a reality this week.
In my quest to resume tradition of another booze fuelled weekend, I did a little research on this, as I originally thought that alcohol would inhibit the antibiotics, rendering them useless and therefore the course of medication is irrelevant. And the infection comes back and eats not only your healthy cells, but also your cat, TV, laptop AND drinking suit.

It appears that drinking does indeed change the effectivity of antibiotics, but not to such an extent where they stop working - the main worry is nausea, extreme vomiting and other fun effects - but it really does depends on what antibiotics you are on.

The first, err what's it called - Amoxicillin, is a penicillin based antibiotic - and is not really affected by the intake of alcohol. Drinking just after taking it isn't advised, but this is only because it can adversely affect the absorption into the stomach and digestive system - as with anything. So no actual reaction between the two.

Metronidazole however is a different kettle of fish. This can cause nausea, massive vomiting and tachycardia. So I wonder why?
It's something to do with limiting the body's ability to break down and metabolise the alcohol - by blocking the breakdown of propylene glycol in the liver. This increases the amount of propylene glycol in the blood, and can harm the liver and other fun items in the body that allow life to happen.

So it makes propylene glycol stay in my body for ages, so what does this do? Well it looks like it's used in loads of household goods, from deoderant sticks to being a moisturiser in cosmetics. It's even a safe food additive in the US (not checked other countries..) - However this method of ingestion (oral) is minimally effective, and is therefore deemed quite safe - but when propylene glycol is allowed into the bloodstream, intravenously as it were, it becomes quite dangerous.

To make use of this and try to find out how much booze I can actually consume before the propylene glycol becomes fatally toxic, I need to find out the fatal dose... for which there is no data.

Absorption rates in rats after ingestion is 90-100%, usually not building up in the body. But when breakdown is inhibited this could build up quickly.

Ingestion of a sufficient quantity can definitely cause death. 1g per KG of body weight, so say 90g of this stuff can affect the central nervous system, causing numbness, visual distortions etc.... Increase this to 3g/kg, and you get massively drunk, slurred speech and stupor/agitation mental state shifts.
Over that, you get coma, loss of reflexes and probably death.

So it's quite inconclusive unless data on how much of this stuff is held back by the body.

All of the above sounds like getting pissed anyway, but I don't think I will booze on during the course of these antibiotics. I will find out tomorrow.

Tuesday, 6 November 2007

AAC-LD and it's Vorbis Equivalent?

For low delay streaming, AAC-Low Delay would be good as the specification says that the encoding algorithm should have no more delay than 20ms. This would be acceptable given we can't usually notice a phasing difference with anything lower than 15ms.
But is there a vorbis equivalent? I don't think there is, but is it possible to get vorbis's input sample buffer low enough to have some latency like 50ms? Quality isn't the main concern yet, and I think, the higher the bitrate becomes, the more that effect negates the short buffer length. So if we use something stupid like a megabit for 2 channel, should sound alright?

Sunday, 14 October 2007

Streaming delay stuff and such

Update on the problem of streaming latency over a fast network...

Decided to try just PCM, so no compression, just passing the PCM to the client - and it cuts the time down to about 2 - 3 seconds. Which is OK, but still not perfect - I got better results using FLAC. But it's better than WMA... I will experiment and see what happens!