<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6040678649103528371</id><updated>2012-05-18T07:02:24.219+01:00</updated><category term='linux'/><category term='ssh'/><category term='javascript'/><category term='mysql'/><category term='web'/><category term='gadgets'/><category term='html'/><category term='google'/><category term='socat'/><title type='text'>Squiddy's Blog</title><subtitle type='html'>Tim Watts' random tips and opinions on Linux and other stuff.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-7220929677826436390</id><published>2012-04-09T13:33:00.000+01:00</published><updated>2012-04-09T13:33:40.741+01:00</updated><title type='text'>Meddling MPs</title><content type='html'>You know, just once, I would like to go to sleep and wake up, read the newspaper and exclaim: "Wow, that's a really good idea the Government just had!".&lt;br /&gt;&lt;br /&gt;Instead, we have the content of the previous blog and today, I wake up to this:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.telegraph.co.uk/earth/greenerliving/9193803/Mandatory-green-projects-for-householders-building-conservatories.html" target="_blank"&gt;'Mandatory' green projects for householders building conservatories&lt;/a&gt;&lt;br /&gt;and&lt;br /&gt;&lt;a href="http://www.bbc.co.uk/news/business-17654781" target="_blank"&gt;Bank holidays 'cost economy £19bn'&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Addressing the former article: Superficially seems like a reasonable idea, except:&lt;br /&gt;&lt;br /&gt;The Law of Unintended Consequences will kick in, like it did with the Part P (electrical works brought under building regulations). Regarding Part P - a question in the House of Commons led to the revelation that around 8 deaths per year in England and Wales would be prevented by the introduction of Part P&lt;br /&gt;(see&amp;nbsp;&lt;a href="http://www.publications.parliament.uk/pa/cm200405/cmhansrd/vo050113/text/50113w02.htm" target="_blank"&gt;http://www.publications.parliament.uk/pa/cm200405/cmhansrd/vo050113/text/50113w02.htm&lt;/a&gt;&amp;nbsp;)&lt;br /&gt;Woopy doo. That was worth the expense then. A fraction of the effort expended and money spent could have reduced the 3000 deaths per year on the road by that amount. Also, I suspect a great many people have adapted to this sort of interfering state nannying by simply not bothering to inform the local council if they are undertaking internal renovation work. Which is a shame as Building Inspectors are very helpful in my personal experience when it comes to matters of the structural integrity of a house and how building works may affect that.&lt;br /&gt;&lt;br /&gt;In this case I predict a rise in unregistered gas fitters (including a large proportion of "cowboys") and a further reluctance to inform Building Control departments about anything.&lt;br /&gt;&lt;br /&gt;In the second case, it would be funny if someone hadn't wasted money on it. Just read this for the low down:&amp;nbsp;&lt;a href="http://www.salon.com/2012/03/14/bring_back_the_40_hour_work_week/" target="_blank"&gt;http://www.salon.com/2012/03/14/bring_back_the_40_hour_work_week/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Therefore, I rename "Think Tank" to "Oxygen Thieves" and "MP"&lt;br /&gt;&lt;br /&gt;Sigh...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-7220929677826436390?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/7220929677826436390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2012/04/meddling-mps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/7220929677826436390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/7220929677826436390'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2012/04/meddling-mps.html' title='Meddling MPs'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-6647700235293250426</id><published>2012-04-04T11:58:00.001+01:00</published><updated>2012-04-04T12:11:02.134+01:00</updated><title type='text'>Stalinist UK?</title><content type='html'>Wiretapping without warrant:&amp;nbsp;&lt;a href="http://www.independent.co.uk/news/uk/home-news/expansion-of-gchq-internet-monitoring-proposed-7606489.html" target="_blank"&gt;Expansion of GCHQ internet monitoring proposed&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Wow.&lt;br /&gt;&lt;br /&gt;Now let's be clear - GCHQ, the UK communications monitoring (aka spying) agency will not &lt;i&gt;allegedly&lt;/i&gt; be able to read your email or listen to your phone calls without a warrant.&lt;br /&gt;&lt;br /&gt;But they will be able to see &lt;b&gt;who you called&lt;/b&gt;&amp;nbsp;and &lt;b&gt;who called you&lt;/b&gt; at what time and &lt;b&gt;who emailed you&lt;/b&gt;&amp;nbsp;and &lt;b&gt;who you have emailed&lt;/b&gt; and which &lt;b&gt;websites you accessed&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;That's a lot of information to be able pick up on a whim. Are you comfortable with the idea that some anonymous &lt;i&gt;spook&lt;/i&gt; can correlate all the people you&amp;nbsp;communicate&amp;nbsp;with and where you browse on the Internet?&lt;br /&gt;&lt;br /&gt;This is akin to steaming open your post and recording the sender's details (but &lt;i&gt;promising&lt;/i&gt; to not read the actual contents of your letter) and having to check out a book in the library even for browsing whilst presenting the librarian with ID so your name and book title can be noted in a register.&lt;br /&gt;&lt;br /&gt;Your IP is anonymous? Is it? Well, this plan will be enacted with your ISP complicit, so at any given time your IP will be able to be correlated with your account. About the only way to be truly anonymous will be to use &lt;a href="https://www.torproject.org/" target="_blank"&gt;Tor&lt;/a&gt;&amp;nbsp;or to buy a PAYG data SIM for your phone for cash and hope your face didn't get on any CCTV recordings with &lt;a href="http://www.ccsr.cse.dmu.ac.uk/resources/general/ethicol/Ecv12no1.html" target="_blank"&gt;face recognition technology&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I suppose you feel rest assured that if you've done nothing wrong, you've nothing to hide? So what happens when you are a lecturer who emails a student whose uncle who is on a watchlist of "people who may be sympthetic with terrorism", even though the student knows nothing of his uncle's affiliations? Or your son is best friends with the kid from down the road and is phoning the house owned by a man who is a member of No2ID or runs a website &lt;a href="http://bexley-is-bonkers.co.uk/" target="_blank"&gt;like this one&lt;/a&gt;. Happy now?&lt;br /&gt;&lt;br /&gt;Or you are part of a perfectly legal group that is critical of government policy. I don't know, perhaps Liberty, or an anti nuclear group or a group that believes the country should become a republic or a group that believes the current form of democracy is ineffective or a group that investigates politicians with corrupt dealings with big business?&lt;br /&gt;&lt;br /&gt;Perhaps you don't care, because you think all such groups are whackpots? Fine. When you are used to this then what about when the government moves the goalposts a little. Then a little more. Until they are watching you because your child has joined a student protest in London. Or because you believe personal use of cannabis should be legalised. Or you are a member of an opposition party trying to displace your local MP in the next election and the MP happens to be the Home Secretary?&lt;br /&gt;&lt;br /&gt;Don't think it could happen here? Well, if you are old enough, or know someone who was alive in the 1970's or 1960's - compare society then with now. Make a checklist of information government agencies could &lt;i&gt;trivially&lt;/i&gt;&amp;nbsp;hold on you - then and now. You may be surprised.&lt;br /&gt;&lt;br /&gt;And now, advances in computing technology make it easy to correlate. Gone are the days of the cold war when, in order to build up a detailed dossier on someone, you would need a Michael Caine character personally on your tail backed by a small team - which made the possibility of mass surveillance fundamentally self limiting.&lt;br /&gt;&lt;br /&gt;Still don't care? Well, don't complain if one day, you or someone you care about ends up in a s&lt;a href="http://www.independent.co.uk/news/uk/politics/nick-clegg-criticises-secret-courts-plan-7618000.html" target="_blank"&gt;ecret court&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;And for those of you who are up on the news enough to see &lt;a href="http://www.independent.co.uk/news/uk/politics/government-retreats-on-digital-big-brother-plan-7615542.html" target="_blank"&gt;this piece&lt;/a&gt;: this is not the first time such a policy has been pushed. How many more times will it happen? Even on this occasion, despite the media outrage, will some of the measures still be enacted? Then a few more. Then a few more?&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Orwell may have been a little off on his timing and symbolism, but the day when everything you do outside your home and a fair bit of what you do inside is monitored is most certainly coming and a good deal of it is already here.&lt;br /&gt;&lt;br /&gt;Unless you, and I mean you, take a stand. I'm not suggesting you wear a funny beret and join the Tooting Popular Front. All it takes is a letter to your MP, a blog post giving your opinions, talking to friends - anything to keep awareness of the issue alive. Such policies are not successful when everyone is watching out for them - they are successfully enacted little by little when you are distracted, bored or don't care about anything except who gets evicted from Big Brother.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-6647700235293250426?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/6647700235293250426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2012/04/stalinist-uk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6647700235293250426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6647700235293250426'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2012/04/stalinist-uk.html' title='Stalinist UK?'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-4685765989086539118</id><published>2012-01-06T11:45:00.002Z</published><updated>2012-01-06T12:08:49.503Z</updated><title type='text'>New OpenBox Theme for Lubuntu/LXDE/OpenBox</title><content type='html'>Well, finally - I got around to making a window decoration theme for OpenBox.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://box-look.org/content/show.php/BigBrightGreen?content=148031"&gt;Big Bright Green&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It's simple, very bold and extremely clear (well, to me anyway). The "Green" is a matter of personal preference as I wanted the window titlebars to stand out from the rest of the junk on the screen, but you could easily edit those (either edit the themerc file or use "obtheme").&lt;br /&gt;&lt;br /&gt;&lt;a href="http://box-look.org/content/preview.php?preview=1&amp;amp;id=148031&amp;amp;file1=148031-1.jpg&amp;amp;file2=148031-2.jpg&amp;amp;file3=148031-3.jpg&amp;amp;name=BigBrightGreen"&gt;Here are the screenshots:&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://box-look.org/CONTENT/content-pre1/148031-1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://box-look.org/CONTENT/content-pre1/148031-1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://box-look.org/CONTENT/content-pre2/148031-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://box-look.org/CONTENT/content-pre2/148031-2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://box-look.org/CONTENT/content-pre3/148031-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://box-look.org/CONTENT/content-pre3/148031-3.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-4685765989086539118?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/4685765989086539118/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2012/01/new-openbox-theme-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/4685765989086539118'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/4685765989086539118'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2012/01/new-openbox-theme-for.html' title='New OpenBox Theme for Lubuntu/LXDE/OpenBox'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-7452867690887045336</id><published>2011-12-02T09:30:00.001Z</published><updated>2011-12-02T11:48:17.619Z</updated><title type='text'>Huawei E585 Review</title><content type='html'>I've been using a&amp;nbsp;&lt;a href="http://www.huaweidevice.com/worldwide/productFeatures.do?pinfoId=3073&amp;amp;directoryId=5009&amp;amp;treeId=3619&amp;amp;tab=0"&gt;Huawei E585&lt;/a&gt;&amp;nbsp;for several months now, mostly on the train from Robertsbridge to London. This is a cellular 3G to WIFI adaptor (often called a MIFI device). It sits on its own cellular connection and acts as a WIFI base station, meaning it can be used with any WIFI capabale device, eg laptop, phone, internet radio.&lt;br /&gt;&lt;br /&gt;Not bad when it works - with a "3" SIM, I can pull 4.3Mbit/s downstream and over 1Mbit/s upstream at good positions.&lt;br /&gt;&lt;br /&gt;The problem comes with all the tunnels on the Hastings line - there are two a mile long either side of Sevenoaks and over half a dozen others. Obviously, I don't expect the device to work when there is no signal.&lt;br /&gt;&lt;br /&gt;However, I do expect it to re-acquire cleanly when the signal comes back.&lt;br /&gt;&lt;br /&gt;The E585 doesn't. Not reliably anyway. On the odd day, I can travel from London Charing Cross to Roberstbridge without a problem. On most days though, the device will lose signal in a tunnel, then get the signal back at the other end - indicated by lots of bars on the display. What it then does is lose its WAN IP - ie loses the IP layer. At this point, it should be making active efforts to get it back. It doesn't. It sits there like a lemon until manually rebooted, whereupon it will come straight back with a strong signal and connection.&lt;br /&gt;&lt;br /&gt;This wouldn't be so bad if:&lt;br /&gt;&lt;br /&gt;1) I could programmatically reboot the device. So far, all attempts to remote script the web interface have failed due to the particularly weird session handling they employ.&lt;br /&gt;&lt;br /&gt;2) They actually issued some firmware updates occasionally;&lt;br /&gt;&lt;br /&gt;3) They actually had technical support. "3" don't count, like most cell phone companies, you'll get a bloke in India who asks for a load of irrelevant details then tells you Linux isn't supported - despite the fact it's a WIFI device!&lt;br /&gt;&lt;br /&gt;This is typical of so much of the consumer electronics industry where the motto is "first to market, then make the next one".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-7452867690887045336?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/7452867690887045336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/12/huawei-e585-review.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/7452867690887045336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/7452867690887045336'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/12/huawei-e585-review.html' title='Huawei E585 Review'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-7977174322703560818</id><published>2011-10-13T21:01:00.005+01:00</published><updated>2011-10-13T23:30:46.813+01:00</updated><title type='text'>Dell EqualLogic PS6500E 1TB SATA RAID capacities</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: large;"&gt;RAID layouts and capacities.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Disk capacity is 931.51GiB and there are 48 such drives&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;RAID 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;37.83TiB&lt;/b&gt; and there are 2 hotspares. Overhead = 90GB per disk.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;RAID 6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;35.12TiB &lt;/b&gt;and 1 hotspare&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;RAID 10&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;20.71TiB &lt;/b&gt;with 2 hotspares&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;RAID 50&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;35.12TiB&amp;nbsp;&lt;/b&gt;with 1 hotspares&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-7977174322703560818?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/7977174322703560818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/10/dell-equallogic-ps6500e-1tb-sata-raid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/7977174322703560818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/7977174322703560818'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/10/dell-equallogic-ps6500e-1tb-sata-raid.html' title='Dell EqualLogic PS6500E 1TB SATA RAID capacities'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-536015563185591295</id><published>2011-10-12T01:13:00.030+01:00</published><updated>2011-10-13T23:43:37.426+01:00</updated><title type='text'>EqualLogic PS6500E speed test with linux hosts</title><content type='html'>&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Equipment&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;2 linux hosts, each comprising:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Dell R610,&amp;nbsp;96GB RAM,&amp;nbsp;2x Intel Xeon Processor X5680 (12M Cache, 3.33 GHz, 6.40 GT/s) (6 cores, 12 hyperthreads),&amp;nbsp;2 x 4 port Intel Pro1000 NICs &amp;nbsp;(Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01))&lt;/li&gt;&lt;li&gt;2 x Dell PC6224 stacked gigabit switches&lt;/li&gt;&lt;li&gt;1 x EQL PS6500E with 48 x 1TB SATA 7200RPM drives&amp;nbsp;ST31000524NS SATA 3Gb/s 1TB 32MB cache&lt;/li&gt;&lt;li&gt;Wiring: 4 x gig from each host to PC6224s split across switches; 8 x gig from both PS6500E controllers to swiches, split across switches.&lt;/li&gt;&lt;li&gt;Switches and hosts confirgured for MTU of 9000 to match PS6500&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Optimise both hosts thus:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 4194304 &amp;gt; /proc/sys/net/core/rmem_default&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 4194304 &amp;gt; /proc/sys/net/core/rmem_max&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 4194304 &amp;gt; /proc/sys/net/core/wmem_default&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 4194304 &amp;gt; /proc/sys/net/core/wmem_max&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 0 &amp;gt; /proc/sys/net/ipv4/tcp_timestamps&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 1 &amp;gt; /proc/sys/net/ipv4/tcp_sack&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 1 &amp;gt; /proc/sys/net/ipv4/tcp_window_scaling&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo "4194304 4194304 4194304" &amp;gt; /proc/sys/net/ipv4/tcp_rmem&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo "4194304 4194304 4194304" &amp;gt; /proc/sys/net/ipv4/tcp_wmem&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;ifconfig eth8 txqueuelen 1000&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;ifconfig eth9 txqueuelen 1000&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;ifconfig eth10 txqueuelen 1000&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;ifconfig eth11 txqueuelen 1000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;PS6500E has 2 x 10TB volumes ona RAID50, each volume is mounted to one of the hosts using round robin multipathing, formatted to XFS and mounted:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;iscsiadm -m node --logoutall=all&lt;br /&gt;iscsiadm -m discovery -t st -p 10.223.10.5&lt;br /&gt;iscsiadm -m node  --login -T 'iqn.2001-05.com.equallogic:0-8a0906-388f3f80a-e907d15ce794e948-test3'&lt;br /&gt;multipath&lt;br /&gt;mkfs.xfs -L TEST3 /dev/dm-0&lt;br /&gt;mount -onoatime,logbsize=262144,logbufs=8 /dev/dm-0 /mnt/&lt;/span&gt;&lt;br /&gt;We used streamput and streamget which are simple homegrown C programs to read and write single large buffers of random data to files (few large files), run for a reasonable time to ensure the host RAM is saturated vis a vis caches (streamput can also do O_DIRECT writes to bypass caching). Buffer for single IO operation is 1MB of random data, generated once at program start. Buffer is page aligned for optimal DMA and O_DIRECT.&lt;br /&gt;&lt;br /&gt;Our basic streamput test comprised:&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;./streamput -v -t 1200 -l 4096 -w /mnt/&amp;lt;uniquesubdir&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;(Write 4GB files with random name into test dir and repeat for a total of 1200 seconds using plain ordinary C file writes with no special flags)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Our basic streamread test comprised&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;./streamread -v -t 1200 -w /mnt/&amp;lt;uniquesubdir&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;(Read 4GB files with random name from test dir and repeat for a total of 1200 seconds using plain ordinary C file writes with no special flags)&lt;/i&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 1 simple streamed writing&lt;/span&gt;&lt;br /&gt;2 x streamput tests on 2 hosts in parallel&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Results&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;streamput,PID,14225,Megabytes/sec,45.8&lt;br /&gt;streamput,PID,14227,Megabytes/sec,45.0&lt;br /&gt;streamput,PID,13640,Megabytes/sec,44.1&lt;br /&gt;streamput,PID,13639,Megabytes/sec,44.1&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Total 179MB/sec&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 2 reading&lt;/span&gt;&lt;br /&gt;2 x streamread tests&amp;nbsp;on 2 hosts in parallel&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Results&lt;/span&gt;&lt;/div&gt;&lt;div&gt;streamread,PID,14364,Megabytes/sec,54.5&lt;/div&gt;&lt;div&gt;streamread,PID,14363,Megabytes/sec,50.9&lt;/div&gt;&lt;div&gt;streamread,PID,13767,Megabytes/sec,54.6&lt;/div&gt;&lt;div&gt;streamread,PID,13766,Megabytes/sec,64.5&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Total 224.5MB/sec&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Reconfigure to RAID10, setup with XFS s above.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 3&lt;/span&gt;&lt;br /&gt;2 x streamput tests on 2 hosts in parallel&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Results&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;streamput,PID,15107,Megabytes/sec,46.1&lt;br /&gt;streamput,PID,15106,Megabytes/sec,48.6&lt;br /&gt;streamput,PID,14471,Megabytes/sec,44.2&lt;br /&gt;streamput,PID,14470,Megabytes/sec,50.8&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Total 189.7MB/s&lt;/b&gt;ec&lt;br /&gt;&lt;br /&gt;Test 4&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 3 &amp;gt; /proc/sys/vm/drop_caches&lt;/span&gt;&lt;br /&gt;2 x streamread tests on 2 hosts in parallel&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Results&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;streamread,PID,15197,Megabytes/sec,19.9&lt;br /&gt;streamread,PID,15198,Megabytes/sec,20.0&lt;br /&gt;streamread,PID,14558,Megabytes/sec,23.4&lt;br /&gt;streamread,PID,14557,Megabytes/sec,23.1&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Total 86.4 MB/sec&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Reconfigure to RAID10, setup with XFS s above.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 5&lt;/span&gt;&lt;br /&gt;2 x streamread tests on 2 hosts in parallel&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Results&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;streamput,PID,15845,Megabytes/sec,40.8&lt;br /&gt;streamput,PID,15843,Megabytes/sec,49.7&lt;br /&gt;streamput,PID,15063,Megabytes/sec,43.6&lt;br /&gt;streamput,PID,15062,Megabytes/sec,45.9&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Total 180MB/sec&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 3 &amp;gt; /proc/sys/vm/drop_caches&lt;/span&gt;&lt;br /&gt;2 x streamread tests on 2 hosts in parallel&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;streamread,PID,15088,Megabytes/sec,72.0&lt;/div&gt;&lt;div&gt;streamread,PID,15087,Megabytes/sec,45.6&lt;/div&gt;&lt;div&gt;streamread,PID,15878,Megabytes/sec,49.4&lt;/div&gt;&lt;div&gt;streamread,PID,15877,Megabytes/sec,35.9&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Total 202.9MB/sec&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Reconfigure to RAID10, setup with XFS s above.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 7 during RAID5 reconstruction&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;echo 3 &amp;gt; /proc/sys/vm/drop_caches&lt;br /&gt;2 x streamread tests on 2 hosts in parallel&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Results&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;streamput,PID,15379,Megabytes/sec,43.4&lt;br /&gt;streamput,PID,15378,Megabytes/sec,48.8&lt;br /&gt;streamput,PID,16235,Megabytes/sec,44.7&lt;br /&gt;streamput,PID,16234,Megabytes/sec,47.9&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Total 184.8MB/sec&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 8 Array reconstructing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;echo 3 &amp;gt; /proc/sys/vm/drop_caches&lt;/span&gt;&lt;br /&gt;2 x streamread tests on 2 hosts in parallel&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Results&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;streamread,PID,15398,Megabytes/sec,45.6&lt;br /&gt;streamread,PID,15397,Megabytes/sec,44.4&lt;br /&gt;streamread,PID,16253,Megabytes/sec,36.5&lt;br /&gt;streamread,PID,16252,Megabytes/sec,36.8&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Total 163.3MB/sec&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;Array (re)construction time:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Time to initialise RAID5: 58% completion in approx 14 hours. At 13:05, 62%, 15:29 73%.&amp;nbsp;Estimated full time 21 hours 49 minutes&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: x-large;"&gt;fio IOPS tests&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 9 RAID5 (Raid rebuild complete)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;fio --filename=/dev/dm-0 --direct=1 --rw=randwrite --bs=4k --numjobs=64 --runtime=300 --group_reporting --name=raid5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;on 1 host&lt;br /&gt;&lt;br /&gt;&lt;b&gt;IOPS=2862&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;raid5: (groupid=0, jobs=64): err= 0: pid=21151&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; write: io=3407MB, bw=11452KB/s, &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;iops=2862&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;, runt=304630msec&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; clat (usec): min=220, max=7629K, avg=21083.39, stdev=47412.87&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; bw (KB/s) : min= &amp;nbsp; &amp;nbsp;0, max= 5261, per=2.36%, avg=269.97, stdev=69.20&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; cpu &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: usr=0.04%, sys=0.10%, ctx=874983, majf=0, minf=1523&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; IO depths &amp;nbsp; &amp;nbsp;: 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, &amp;gt;=64=0.0%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;submit &amp;nbsp; &amp;nbsp;: 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;complete &amp;nbsp;: 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;issued r/w: total=0/872151, short=0/0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (usec): 250=2.28%, 500=90.23%, 750=3.62%, 1000=0.47%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (msec): 2=2.27%, 4=0.53%, 10=0.09%, 20=0.06%, 50=0.05%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (msec): 100=0.02%, 250=0.02%, 500=0.01%, 750=0.01%, 1000=0.01%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (msec): 2000=0.01%, &amp;gt;=2000=0.33%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; WRITE: io=3407MB, aggrb=11451KB/s, minb=11726KB/s, maxb=11726KB/s, mint=304630msec, maxt=304630msec&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;Disk stats (read/write):&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; dm-0: ios=0/871635, merge=0/0, ticks=0/19261868, in_queue=19261440, util=99.97%, aggrios=0/0, aggrmerge=0/0, aggrticks=0/0, aggrin_queue=0, aggrutil=0.00%&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 10 RAID5 write (Raid rebuild complete) shorter test time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;fio --filename=/dev/dm-0 --direct=1 --rw=randwrite --bs=4k --numjobs=64 --runtime=60 --group_reporting --name=raid5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;IOPS=3261&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;raid5: (groupid=0, jobs=64): err= 0: pid=21222&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; write: io=839936KB, bw=13048KB/s, iops=3261, runt= 64375msec&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; clat (usec): min=222, max=7480K, avg=18589.17, stdev=43118.68&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; bw (KB/s) : min= &amp;nbsp; &amp;nbsp;0, max= 7520, per=1.55%, avg=202.70, stdev=13.74&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; cpu &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: usr=0.11%, sys=0.10%, ctx=211492, majf=0, minf=1523&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; IO depths &amp;nbsp; &amp;nbsp;: 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, &amp;gt;=64=0.0%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;submit &amp;nbsp; &amp;nbsp;: 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;complete &amp;nbsp;: 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;issued r/w: total=0/209984, short=0/0&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (usec): 250=11.03%, 500=83.24%, 750=2.35%, 1000=0.52%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (msec): 2=1.74%, 4=0.54%, 10=0.09%, 20=0.06%, 50=0.05%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (msec): 100=0.02%, 250=0.02%, 500=0.01%, 750=0.01%, 1000=0.01%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (msec): 2000=0.03%, &amp;gt;=2000=0.29%&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; WRITE: io=839936KB, aggrb=13047KB/s, minb=13360KB/s, maxb=13360KB/s, mint=64375msec, maxt=64375msec&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;Disk stats (read/write):&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #6aa84f; font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; dm-0: ios=0/209453, merge=0/0, ticks=0/3930736, in_queue=3930732, util=99.61%, aggrios=0/0, aggrmerge=0/0, aggrticks=0/0, aggrin_queue=0, aggrutil=0.00%&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 10 RAID5 read&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;fio --filename=/dev/dm-0 --direct=1 --rw=randread --bs=4k --numjobs=64 --runtime=60 --group_reporting --name=raid5&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;IOPS=159&lt;/b&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;raid5: (groupid=0, jobs=64): err= 0: pid=21295&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; read : io=40636KB, bw=654080B/s, iops=159, runt= 63618msec&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp; clat (usec): min=527, max=6767K, avg=374501.76, stdev=152589.35&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp; bw (KB/s) : min= &amp;nbsp; &amp;nbsp;0, max= &amp;nbsp;318, per=2.21%, avg=14.08, stdev= 1.64&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; cpu &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: usr=0.09%, sys=0.01%, ctx=10210, majf=0, minf=1651&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; IO depths &amp;nbsp; &amp;nbsp;: 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, &amp;gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;submit &amp;nbsp; &amp;nbsp;: 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;complete &amp;nbsp;: 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, &amp;gt;=64=0.0%&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;issued r/w: total=10159/0, short=0/0&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (usec): 750=0.11%, 1000=0.15%&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (msec): 2=0.97%, 4=9.81%, 10=55.35%, 20=17.33%, 50=1.62%&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (msec): 100=0.83%, 250=2.15%, 500=1.53%, 750=0.88%, 1000=0.64%&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;lat (msec): 2000=1.39%, &amp;gt;=2000=7.24%&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;Run status group 0 (all jobs):&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; &amp;nbsp;READ: io=40636KB, aggrb=638KB/s, minb=654KB/s, maxb=654KB/s, mint=63618msec, maxt=63618msec&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;Disk stats (read/write):&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: #6aa84f;"&gt;&amp;nbsp; dm-0: ios=10138/0, merge=0/0, ticks=3905828/0, in_queue=3905812, util=99.62%, aggrios=0/0, aggrmerge=0/0, aggrticks=0/0, aggrin_queue=0, aggrutil=0.00%&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 10 RAID5 read on 2 hosts in parallel&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;fio --filename=/dev/dm-0 --direct=1 --rw=randread --bs=4k --numjobs=64 --runtime=60 --group_reporting --name=raid5&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;IOPS=138 and 123, total 261&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 11 RAID 10 Write (Reconstructing) 1 Host&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;fio --filename=/dev/dm-0 --direct=1 --rw=randwrite --bs=4k --numjobs=64 --runtime=60 --group_reporting --name=raid10&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;IOPS=3068&lt;/b&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Test 12 RAID 10 Read (Reconstructing) 1 Host&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;fio --filename=/dev/dm-0 --direct=1 --rw=randread --bs=4k --numjobs=64 --runtime=60 --group_reporting --name=raid10&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;IOPS=8&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;(Seems wrong but repeatible!)&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-536015563185591295?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/536015563185591295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/10/equallogic-ps6500e-speed-test-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/536015563185591295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/536015563185591295'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/10/equallogic-ps6500e-speed-test-with.html' title='EqualLogic PS6500E speed test with linux hosts'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-6056626112725227479</id><published>2011-08-23T16:52:00.002+01:00</published><updated>2011-08-26T13:28:17.566+01:00</updated><title type='text'>debirf - Building custom debian USB keys/CDROMs and run in RAM</title><content type='html'>I needed a way to make a simple custom bootable USB key to run linux on some test servers.&lt;br /&gt;Furthermore I needed a strong linux environment that was easy to install additional tools into - such as an iSCSI initiator, bonnie++ and other tools to benchmark a new SAN.&lt;br /&gt;&lt;br /&gt;I was also looking for a simple way to run the system from RAM (tmpfs) so I was not dependent on leaving the media in.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cmrg.fifthhorseman.net/wiki/debirf"&gt;debirf&lt;/a&gt;&amp;nbsp;is just such a tool. It builds an ISO image of a debian 6 system which boots into RAM and behaves like a normal system (ie you can trivially apt-get extra packages into the running system).&lt;br /&gt;&lt;br /&gt;Turns out it's not too hard to tell it to add more packages to the ISO. Of course, when you have an ISOLINUX bootable ISO, it's not too hard to transfer to a USB key, though there is no automated way to do this yet.&lt;br /&gt;&lt;br /&gt;It exists as a Debian package and also in Ubuntu, though I found problems running it from Ubuntu 10.10, so I installed a minimal Debian 6 system in a &lt;a href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt; virtual machine.&lt;br /&gt;&lt;br /&gt;The rough steps are, as root on the Debian 6 machine:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;apt-get install debirf syslinux&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;mkdir /root/debirf; cd /root/debirf # You need lots of space here, use a suitable location&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;tar -xzf&amp;nbsp;/usr/share/doc/debirf/example-profiles/rescue.tgz&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;Now edit rescue/debirf.conf and add the following line:&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000; font-family: 'Courier New', Courier, monospace;"&gt;export DEBIRF_ISO_BOOTLOADER=isolinux&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;That just makes life slightly easier as you will get a usable isolinux config for using syslinux on a USB key.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now some more steps:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;as an example of how to add more packages to the image, add a file rescue/modules/benchmark:&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000; font-family: 'Courier New', Courier, monospace;"&gt;#!/bin/bash -e&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000; font-family: 'Courier New', Courier, monospace;"&gt;# debirf module: benchmark&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000; font-family: 'Courier New', Courier, monospace;"&gt;# remove/install extra packages&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000; font-family: 'Courier New', Courier, monospace;"&gt;#&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000; font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000; font-family: 'Courier New', Courier, monospace;"&gt;# install packages&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #990000; font-family: 'Courier New', Courier, monospace;"&gt;debirf_exec apt-get --no-install-recommends --assume-yes install bonnie++ iftop fio iperf&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;debirf make rescue&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;debirf makeiso rescue&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Hopefully now, you will find an ISO file in rescue/&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Burn this to a CDWR, or prep a USB key in the usual way:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;fdisk /dev/sdX # Add one primary partition, type 0xc, boot flag set&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;syslinux -i /dev/sdX1&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;mount /dev/sdX /mnt/usb&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;mount -oloop rescue/&amp;lt;isofilefromdebirf&amp;gt;.iso /mnt/iso&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;cp /mnt/iso/* /mnt/usb/&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="color: blue; font-family: 'Courier New', Courier, monospace;"&gt;umount /mnt/iso /mnt/usb&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Insert USB key (or CDWR) into computer, boot from it and you should see a syslinux menu offering console over "video" or "serial" (ttyS0 at 115000 baud).&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Remove key and use again if required.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;&lt;u&gt;UPDATE&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;You can also just run the "isohybrid" command on the original iso, the dd the result to a USB key:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;isohybrid&amp;nbsp;rescue/&amp;lt;isofilefromdebirf&amp;gt;.iso&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;dd if=rescue/&amp;lt;isofilefromdebirf&amp;gt;.iso of=/dev/sdX&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Where /dev/sdX is the device node of your USB stick. Make sure you umount the sick first as many OSes will auto mount it upon insertion!&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-6056626112725227479?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/6056626112725227479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/08/debirf-building-custom-debian-usb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6056626112725227479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6056626112725227479'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/08/debirf-building-custom-debian-usb.html' title='debirf - Building custom debian USB keys/CDROMs and run in RAM'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-7355150169984493184</id><published>2011-07-31T13:43:00.006+01:00</published><updated>2011-08-01T16:39:35.669+01:00</updated><title type='text'>Email for Kids - and moderating messages</title><content type='html'>&lt;div style="color: black;"&gt;I want to give my two kids (5 &amp;amp; 7) email. If I don't, eventually they'll sort themselves out on gmail or something and whilst gmail might do a good job of getting rid of willy pill spams, it won't protect your kids against approaches by undesireables or bullying.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;So, this assumes you run your own email server (or can):&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;The basic requirements are:&lt;/div&gt;&lt;ul style="color: black;"&gt;&lt;li&gt;Anyone can email them, but all such emails are trapped in a queue&lt;/li&gt;&lt;li&gt;A moderator (ie one or more of the child's guardians) will be alerted&amp;nbsp; when there are new emails waiting and can approve or reject each one after checking the content.&lt;/li&gt;&lt;li&gt; Some sender addressed could be whitelisted - ie will bypass the requirement for moderation. Do this for your own email addresses or for the kid's trusted friends.&lt;/li&gt;&lt;/ul&gt;&lt;div style="color: black;"&gt;Sounds&amp;nbsp; a bit like a mailing list doesn't it? A lot like it in fact. Well, to be specific: a mailing list with one member (the kid's physical mailbox address), posting allowed by non list members with the default policy of "hold for moderation".&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Mailman meets the requirements here, so this is a quick howto, assuming the mail system itself is exim (using other systems should be possible.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;The only other problem is that we should block the kid's physical  mailbox address from being able to receive external mail, though it must  be able to receive mail from mailman.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;u&gt;Exim config snippets&lt;/u&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;In the ACLs section, you can put in the bit that disallows external hosts from being able to send directly to the kid's local mailbox:&lt;/div&gt;&lt;br /&gt;&lt;div style="color: blue;"&gt;check_recipient:&lt;br /&gt;&lt;br /&gt;deny&amp;nbsp;&amp;nbsp;&amp;nbsp; local_parts = ^.*[@%!/|] : ^\\.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;&lt;/span&gt;&lt;span style="color: #cc0000;"&gt; deny hosts = !+relay_from_hosts&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp; condition = ${if exists{/etc/exim4/domains/$domain/uservialist}}&lt;br /&gt;&amp;nbsp; condition = ${lookup{${sg{$local_part}{\N[_\+].+$\N}{}}}lsearch{/etc/exim4/domains/$domain/uservialist}{true}{false}}&lt;br /&gt;&amp;nbsp; logwrite = Recipient address $local_part@$domain blocked by \&lt;br /&gt;&amp;nbsp; user protection list /etc/exim4/domains/$domain/uservialist&lt;br /&gt;&amp;nbsp; message = Recipient globally blocked (handled by list)&lt;/span&gt;&amp;nbsp;&lt;/div&gt;&lt;span style="color: blue;"&gt;accept&amp;nbsp; hosts&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;The bit you want is the red part, somewhere near the top of the acl_smtp_rcpt ACL. My setup is multidomain, but if yours is a single domain setup, you could simplify the condition and logwrite lines to:&lt;/div&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;/etc/exim4/domains/$domain/uservialist &lt;/span&gt;&lt;span style="color: #cc0000;"&gt;-&amp;gt; &lt;/span&gt;&lt;span style="color: #cc0000;"&gt;/etc/exim4/uservialist&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;This file contains a list of local usernames of your kids, one per line.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Note the sg{} rexeg - this is because I run a system with throwaway email addresses (ie for any valid local part "local", "local+&amp;lt;anything&amp;gt;" and "local_&amp;lt;anything&amp;gt;" are valid addresses mapping back to "local").&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;If you don't do this, you could simplify that line to:&lt;/div&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;condition = ${lookup{$local_part}lsearch{/etc/exim4/domains/$domain/uservialist}{true}{false}}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;Routers section:&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Standard mailman config (file locations correct for Debian 6, may need to adjust for other OSes):&lt;/div&gt;&lt;span style="color: #cc0000;"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;mailman_router:&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; debug_print = "R: mailman_router for $local_part@$domain"&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domains = +local_domains&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; require_files = MAILMAN_HOME/lists/$local_part/config.pck&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver = accept&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; local_part_suffix_optional&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; local_part_suffix = -bounces : -bounces+* : \&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -confirm+* : -join : -leave : \&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -subscribe : -unsubscribe : \&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -owner : -request : -admin : -loop&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; transport = mailman_transport&lt;/span&gt;&lt;br style="color: #cc0000;" /&gt;&lt;span style="color: #cc0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group = MAILMAN_GROUP&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;You will need the following definition in the global section of the exim config list:&lt;/div&gt;&lt;span style="color: #cc0000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #cc0000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #cc0000;"&gt;&lt;br /&gt;MAILMAN_HOME=/var/lib/mailman&lt;br /&gt;MAILMAN_WRAP=MAILMAN_HOME/mail/mailman&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #cc0000;"&gt;&lt;span style="color: black;"&gt;&lt;span style="color: #cc0000;"&gt;MAILMAN_USER=list&lt;br /&gt;MAILMAN_GROUP=daemon&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="color: black;"&gt;The only thing left is to configure the mailman list. You'll need to configure the web interface to mailman but the supplied apache.conf snippet in the debian package is OK.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Assuming your kid has a username of kiduser, your domain is example.com and you want them to have an email address of kid@example.com :&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Create a list called "kid". Subscribe "kiduser@example.com" to this list (the only member).&lt;/div&gt;&lt;div style="color: black;"&gt;Set yourself and any other guardians' email addresses as the list moderator.&amp;nbsp;&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;You may turn off the List-* headers and remove both the subject line prefix [kid] and the standard signature that usually gets added to list emails.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;"What steps are required for subscription?" should be set to "Require approval"&lt;/div&gt;&lt;div style="color: black;"&gt;"Action to take for postings from non-members for which no              explicit action is defined." MUST be set to "Hold" - This is the route by all of the emails come in.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Whitelisting friends:&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Add trusted sender addresses to the section: "List of non-member addresses whose postings should be              automatically accepted." Do not make such people list members or everyone gets a copy of all emails!!&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;a href="https://mailman.dionic.net/admin/owen/?VARHELP=privacy/sender/accept_these_nonmembers"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;The beauty is that you can moderate either using the web interface or by email. Mailman will email the list moderators every time a non approved sender emails your kid. Any of the list moderators can approve or reject any of the emails and can choose, on the web interface, to whitelist the sender.&lt;/div&gt;&lt;div style="color: black;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="color: black;"&gt;Of course, if you want to monitor your kid's emails, even whitelisted ones, you could add yourself as a list member and you will get a copy of everything.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-7355150169984493184?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/7355150169984493184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/07/email-for-kids-and-moderating-messages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/7355150169984493184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/7355150169984493184'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/07/email-for-kids-and-moderating-messages.html' title='Email for Kids - and moderating messages'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-331632743673767457</id><published>2011-06-28T11:33:00.015+01:00</published><updated>2011-06-28T14:18:50.029+01:00</updated><title type='text'>Apache 2.2: PAM authentication and SSL made easy.</title><content type='html'>&lt;h1&gt;The problem&lt;/h1&gt;If you run an Apache webserver and need to authenticate web users against system accounts with a central authentication service (LDAP, NIS, Kerberos), you previously had two basic choices:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Use the specific authentication modules, eg auth_kerb or authnz_ldap&lt;/li&gt;&lt;li&gt;Use auth_pam&lt;/li&gt;&lt;/ol&gt;I don't like option 1 - if you need to change your backend scheme (eg augment LDAP with kerberos, or switch the other way) you now have additional references to LDAP or kerberos sprinkled everywhere. That is a matter of opinion though - if you do want to do direct authentication from Apache, you may still find elements below of use with adaption.&lt;br /&gt;&lt;br /&gt;It would also be cute to allow HTTP requests, and redirect them to HTTPS rather than just denying them with an SSLRequireSSL statement.&lt;br /&gt;&lt;br /&gt;I am greatly in favour of PAM - it was designed to bring authentication into one place and it offers a lot of additional flexibility. I used to use auth_pam but it seems that the module is dead due to Apache 2.2 API changes. &lt;br /&gt;&lt;br /&gt;However there is a very nice alternative: authnz_external. authnz_external forms a link between Apache's authentication phase and an external program which is handed the username and password on a pipe. All the program has to do is perform the authentication step and return a code to authnz_external to indicate success or mode of failure. pwauth is one such readily available program but as the program is decoupled from apache's API, it's pretty easy to write your own.&lt;br /&gt;&lt;br /&gt;As it stands, pwauth uses pam via the pam service "pwauth" which makes configuration a breeze. What authnz_external does not do is handle group membership but it can be used in conjunction with authz_unixgroup to handle that.&lt;br /&gt;&lt;br /&gt;Another problem is that you generally want to force HTTPS/SSL on for authenticated HTTP to protect against password sniffing. I'd like to present my solution which seems flexible and not prone to accidental misconfiguration issues. This is based on a Debian 6 system but it should be applicable to any Apache 2.2 installation and fairly easy to adapt.&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Worked example&lt;/h1&gt;&lt;pre&gt;mkdir /etc/apache2/snippets&lt;/pre&gt;&lt;br /&gt;Add the following files and contents:&lt;br /&gt;&lt;br /&gt;/etc/apache2/snippets/redirect-https&lt;br /&gt;&lt;pre&gt;# Rewrite non SSL to SSL via 301 perm redirect&lt;br /&gt;#&lt;br /&gt;RewriteEngine on&lt;br /&gt;#&lt;br /&gt;# Case 1 redirect port 80 to SSL&lt;br /&gt;RewriteCond %{HTTPS} !=on&lt;br /&gt;RewriteCond %{SERVER_PORT} =80&lt;br /&gt;RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R=301]&lt;br /&gt;#&lt;br /&gt;# Case 2 redirect port 8080 to SSL&lt;br /&gt;RewriteCond %{HTTPS} !=on&lt;br /&gt;RewriteCond %{SERVER_PORT} =8080&lt;br /&gt;RewriteRule ^ https://%{SERVER_NAME}:8443%{REQUEST_URI} [R=301]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;[Case 2 is optional and merely demonstrates how to handle alternative cases]&lt;br /&gt;&lt;br /&gt;/etc/apache2/snippets/authload&lt;br /&gt;&lt;pre&gt;# Set up authnz_external to pwauth&lt;br /&gt;#&lt;br /&gt;DefineExternalAuth auth_pam pipe /usr/sbin/pwauth&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;/etc/apache2/snippets/auth&lt;br /&gt;&lt;pre&gt;# Set up auth and force user onto HTTPS&lt;br /&gt;#&lt;br /&gt;# Do the force to HTTPS&lt;br /&gt;        Include /etc/apache2/snippets/redirect-https&lt;br /&gt;#&lt;br /&gt;# Set up auth external (uses pwauth, needs snippets/authload)&lt;br /&gt;#&lt;br /&gt;        AuthType Basic&lt;br /&gt;        AuthBasicProvider external&lt;br /&gt;        AuthExternal auth_pam&lt;br /&gt;        AuthName "DDH at King's College London"&lt;br /&gt;# Check unix (via NSS) groups&lt;br /&gt;        AuthzUnixgroup on&lt;br /&gt;# Here be magic - needs an env var "SSL_ON" set for all HTTPS connections&lt;br /&gt;        Order Deny,Allow&lt;br /&gt;        Deny from all&lt;br /&gt;        Allow from env=!SSL_ON&lt;br /&gt;# More magic - if non SSL, we allow with no auth, but redirect above then fires&lt;br /&gt;# so no page served.&lt;br /&gt;# Next time round, HTTPS connection fails the Allow test so falls back to Auth checks&lt;br /&gt;        Satisfy any&lt;br /&gt;# All you need are the appropriate "Require" directive after the Include of this snippet&lt;br /&gt;# because the Require will vary from vhost and/or location.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;/etc/apache2/snippets/enablessl&lt;br /&gt;&lt;pre&gt;# Enable SSL and set SSL_ON environment variable &lt;br /&gt;SSLEngine On&lt;br /&gt;RewriteEngine on&lt;br /&gt;RewriteRule ^ - [E=SSL_ON]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Usage is pretty easy:&lt;br /&gt;&lt;br /&gt;In your vhost config:&lt;br /&gt;&lt;pre&gt;&amp;lt;virtualhost *:80&amp;gt;&lt;br /&gt;        Include /etc/apache2/sites-available/yoursite.d/globalconfig&lt;br /&gt;&amp;lt;/virtualhost&amp;gt;&lt;br /&gt;&amp;lt;virtualhost *:443&amp;gt;&lt;br /&gt;        Include /etc/apache2/snippets/enablessl&lt;br /&gt;        Include /etc/apache2/snippets/authload&lt;br /&gt;        Include /etc/apache2/sites-available/yoursite.d/globalconfig&lt;br /&gt;&amp;lt;/virtualhost&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;and /etc/apache2/sites-available/yoursite.d/globalconfig&lt;br /&gt;&lt;pre&gt;ServerName www.example.com&lt;br /&gt;ServerAdmin webmaster@example.com&lt;br /&gt;DocumentRoot /var/www/www.example.com&lt;br /&gt;ErrorLog /var/log/apache2/www.example.com-error.log&lt;br /&gt;CustomLog /var/log/apache2/www.example.com-access.log&lt;br /&gt;&amp;lt;directory /var/www/www.example.com&amp;gt;   &lt;br /&gt;    # Whatever&lt;br /&gt;&amp;lt;/directory&amp;gt;&lt;br /&gt;&amp;lt;location /&amp;gt;&lt;br /&gt;    Include /etc/apache2/snippets/auth&lt;br /&gt;    Require group group1 [... group2 etc]&lt;br /&gt;# or&lt;br /&gt;    Require user user1 [... user2 etc]&lt;br /&gt;# and optionally to allow unauthenticated local access:&lt;br /&gt;     Allow from 10.0.1.0/24&lt;br /&gt;&amp;lt;/location&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h1&gt;Explanation&lt;/h1&gt;&lt;b&gt;enablessl&lt;/b&gt; sets an Apache Environment variable &lt;b&gt;SSL_ON&lt;/b&gt; for any HTTPS connection (this is not an OS level environment variable). This variable is likely to make it through to CGI or WSGI scripts.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;authload&lt;/b&gt; sets up authnz_external (auth_pam here is merely a local identifier and can be anything as long as you change all occurrences of it)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;auth&lt;/b&gt; is the hard part. If a request arrives here with &lt;b&gt;SSL_ON&lt;/b&gt; set, then it relies on the Auth settings logical-OR any other &lt;b&gt;Allow&lt;/b&gt; statements. If the request arrives here without &lt;b&gt;SSL_ON&lt;/b&gt; set then we have a problem: we want the redirect rule to fire, but unfortunately Apache applies the Auth and Allow statements first. To get around this, we use the line: &lt;b&gt;Allow from env=!SSL_ON&lt;/b&gt; which bypasses any other Allow and Auth rules and allows the request to proceed. This is counter intuitive as we do not actually serve the usual target of this request. Instead, this block is satisfied:&lt;br /&gt;&lt;pre&gt;RewriteCond %{HTTPS} !=on&lt;br /&gt;RewriteCond %{SERVER_PORT} =80&lt;br /&gt;RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R=301]&lt;br /&gt;&lt;/pre&gt;The last statement issues as permanent 301 redirect to the browser to come back to the same URI but with HTTPS on.&lt;br /&gt;&lt;br /&gt;The &amp;lt;Location &amp;gt; may be applied to one or more sub URLs if desired.&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Caveats&lt;/h1&gt;&lt;br /&gt;Don't forget to enable the relevant modules with a2enmod&lt;br /&gt;&lt;br /&gt;It's a pretty stable solution, but you must be careful not to have a &lt;b&gt;Satisfy All&lt;/b&gt; statement in the same scope or the association between Auth and Allow will be changes from a logical-OR to a logical-AND which will break the scheme.&lt;br /&gt;&lt;br /&gt;Generally you should be careful with any other &lt;b&gt;Auth&lt;/b&gt;, &lt;b&gt;Allow&lt;/b&gt; or &lt;b&gt;Rewrite&lt;/b&gt; rules. Rewrite rules performing other tasks are fine, but should come after the section:&lt;br /&gt;&lt;pre&gt;Include /etc/apache2/snippets/enablessl&lt;br /&gt;Include /etc/apache2/snippets/authload&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Allow&lt;/b&gt; statements should only come after &lt;b&gt;Include /etc/apache2/snippets/auth&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Don't forget to set up /etc/pam.d/pwauth - this is too system specific to cover here. You could start by copying one of the other services configs to it unless your OS has set it up for you.&lt;br /&gt;You may want to have a trimmed down config that avoids trying local passwd/shadow auth and only uses your external service.&lt;br /&gt;&lt;br /&gt;Be aware that pwauth is hard coded to disallow UIDs below 500. This is a #define in the code so pretty easy to rebuild if required.&lt;br /&gt;&lt;br /&gt;I recommend testing pwauth on the command line with some test accounts to verify that it is doing what you think it should.&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;auth_kerb&lt;/h1&gt;This is a rather special case. Some bright spark decided that the KrbStripRealm statement didn't belong and that modification of the supplied "username" (ie stripping the @realm... part) should really be handled by another more general ID mapping module. I agree with the reasoning but until such a general mapping module actually exists (not that I could find) it was a bit off in my opinion to remove it making auth_kerb useless in a great many installations.&lt;br /&gt;&lt;br /&gt;If this applies to you, you may find the authnz_external method above useful. What you will lose is the ability to handle GSSAPI authentication from browsers that support it. If that is important to you, people have reported being able to patch the KrbStripRealm option back in.&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;License&lt;/h1&gt;Use what you want. For the pedants amongst you, the above code snippets are licensed under the BSD licence - do what you like :)&lt;br /&gt;&lt;br /&gt;&lt;h1&gt;Acknowledgements&lt;/h1&gt;This is born out of my work with the Department of Digital Humanities, King's College London and credit is due in part to a number of blogs and group comments around the internet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-331632743673767457?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/331632743673767457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/06/apache-22-pam-authentication-and-ssl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/331632743673767457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/331632743673767457'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/06/apache-22-pam-authentication-and-ssl.html' title='Apache 2.2: PAM authentication and SSL made easy.'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-6190180445812821504</id><published>2011-06-03T09:16:00.002+01:00</published><updated>2011-06-05T20:43:05.482+01:00</updated><title type='text'>Fancy free fonts for your website</title><content type='html'>I guess this might be a well known fact but it wasn't for me...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.google.com/webfonts"&gt;http://www.google.com/webfonts&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;gives a quick and almost trivially simple way to jazz up your website with the same set of fonts that blogger.com offers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-6190180445812821504?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/6190180445812821504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/06/fancy-free-fonts-for-your-website.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6190180445812821504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6190180445812821504'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/06/fancy-free-fonts-for-your-website.html' title='Fancy free fonts for your website'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-6121064848430151610</id><published>2011-06-01T01:04:00.014+01:00</published><updated>2011-06-01T10:29:11.263+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><category scheme='http://www.blogger.com/atom/ns#' term='gadgets'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>The future of website design is gadgets. Or is it?</title><content type='html'>There's almost no need to build custom websites with complex functionality these days, at least if you are a small company or a person with a personal website.&lt;br /&gt;&lt;br /&gt;Indeed, many people who once upon a time might have dared venture out with Tripod or Geocities are quite happy with Facebook. Facebook offers the scenario of publishing something about yourself, popping up a few snaps and interacting with others by way of comments.&lt;br /&gt;&lt;br /&gt;After discounting Facebook users and also "proper" companies like Amazon or Sainsburys who need a "real website" with complex functionality, there remains a group of people, including me, who want to maintain a couple of websites with real man's HTML and CSS, but also want a bit of dynamic content such as a front page with news items and readers comments or a calendar of interesting events.&lt;br /&gt;&lt;br /&gt;Traditionally, we would have had to have coded such things, usually badly, usually ugly, often unfinished. I have a couple of sites like this - my own website, and one for &lt;a href="http://www.robertsbridge.org/"&gt;the village I live in&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Don't get me wrong - I am &lt;b&gt;not&lt;/b&gt; a web designer. I am a systems programmer. State of the art design for me is using a couple of Gimp artistic plugins on photos and abusing the not-yet-standard CSS colour gradient properties. On a good day, my HTML and CSS might just all pass the W3C validators, because that appeals to my sense of neatness as a programmer. On a really good day, the pages might look OK in everything from IE8 upwards, Firefox, Chrome, Safari and a text browser.&lt;br /&gt;&lt;br /&gt;Thus, I find myself experimenting with the IFRAME and OBJECT HTML tags to embed other peoples' hard work into my sites. Case in point - this blog, hosted by Google's Blogger.com. I have two on the village site - one for the front page news items and one for bulletins from the local police. I have a couple of Google calendars too: one for the police again, as it makes sense to put crime reports on a calendar and one for upcoming village events.&lt;br /&gt;&lt;br /&gt;Google calendars are a joy to embed: they adapt themselves to whatever space you give them. The work involved is nothing more that using the Google "embed calendar" feature to set the display attributes, then pasting their generated code snippet into my site as an IFRAME or OBJECT. I set the display size and all is well.&lt;br /&gt;&lt;br /&gt;It looks like my page has a calendar or "agenda" list, you can click it and it does what it's supposed to without caring one jot that it is part of a larger scheme.&lt;br /&gt;&lt;br /&gt;Things aren't quite so easy with the blog though. That adapts its width nicely to suit the space it's given (especially if one hacks the blog template to achieve a fluid resizing model). But there's one thing blogs all have in common: they get longer. And longer. And then suddenly shorter as some magical archive date is passed.&lt;br /&gt;&lt;br /&gt;Now we have the crux of the problem: IFRAMES don't dynamically resize very well. Well, sometimes they do, but not if they are contained in a DIV block that controls their placement on a fluid page layout.&lt;br /&gt;&lt;br /&gt;So we have three choices, it seems:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Declare the frame to be a "reasonable size". This works nicely, until the contained content overflows it. Then both the frame and the browser are likely to grow scrollbars and it really isn't a natural experience working two scrollbars at once to follow the content;&lt;/li&gt;&lt;li&gt;Make the frame vastly oversized. This is better in some ways, leaving all the content at the mercy of the main browser scrollbar. But it looks silly when the reader gets to the end to find a screen or mores worth of empty space before the page footer.&lt;/li&gt;&lt;li&gt;Pull some serious JavaScript-Fu. This seems to be the way everyone tries to handle the problem. Essentially it boils down to asking the frame how big it is (repeatedly as it may change as the reader clicks within it) and telling the container blocks to match that size with suitable padding.&lt;/li&gt;&lt;/ol&gt;Option 3 runs into a serious problem when the embedded content is in a different DNS domain to the container page. Allowing unfettered JavaScript shenanigans between two domains is considered a Bad Idea (TM) for a variety of reasons that could empty your bank account or see all your contacts signed up for a healthy dose of extra SPAM. So the designers made it difficult, on purpose, and with good reason.&lt;br /&gt;&lt;br /&gt;There are ways around this, involving putting a little JavaScript "server" on the target site (assuming you can) and having it tell the containing page's JavaScript the rendered size of the frame, so that the containing page can adjust itself. Having experimented with this, I can vouch for the fact that it is complicated and fragile, being easily upset by the semantics of the container blocks, such as DIVs on a two column page layout.&lt;br /&gt;&lt;br /&gt;Some people on the forums I visited today suggested other solutions,  such as server side handling. For example, rather than embed a blog  site, simply process the blog's XML feed and generate your own text for  direct inclusion in the page.&lt;br /&gt;&lt;br /&gt;That would work well for a number of use cases, mostly where you  know you only want the reader to see the last few days' worth of  entries. However, you lose the richness of the original site, such as  the ease of browsing older archived material or leaving interactive  comments.&lt;br /&gt;&lt;br /&gt;You could implement that yourself, but at that point, you are coming dangerously close to the amount of work had you written your own personal system from scratch.&lt;br /&gt;&lt;br /&gt;But, here's a thought. And it's a crazy one: Wouldn't it be nice to have a page embedding mechanism where it is simple to tell it what you want it to do? You probably either want a fixed size (which may be relative to the browser window, other container or even absolute), or you want it to grow, vertically at least, to suit the content. Possibly, just, you may want to put some constraints on how big or how small it is allowed to go.&lt;br /&gt;&lt;br /&gt;Call me naive, but it doesn't sound like a tall order to me, at least not for the browser makers nor the W3C standards body.&lt;br /&gt;&lt;br /&gt;I certainly hope they see a need and get on with it - because, I believe that gadgets, to coin a Google term, are the way forward. I can see a future where significant sections of websites could be built quickly and simply out of embedded gadgets and content-blocks either written, or hosted by other sites while still maintaining the odd benefit of hosting your own site.&lt;br /&gt;&lt;br /&gt;The whole idea brings a number of other issues, such as searchability and coherent Google indexing, but that's for another article.&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: blue; color: yellow;"&gt;&lt;b&gt;Addendum&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;It occurred to me this morning, over coffee that that there may be a sensible compromise solution. Having concluded that a blog site is probably better being left as a blog site without embedding, then what if:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;We use the XML feed to present a list of recent titles and perhaps the first paragraph which are server side rendered onto our main website.&lt;/li&gt;&lt;li&gt;For each article, we add in a link such as "Read full article".&lt;/li&gt;&lt;li&gt;Clicking the link takes the reader to a new browser tab or page which is nothing but the blog site - no embedding tricks.&lt;/li&gt;&lt;/ul&gt;This might very well be a good compromise solution. It has the advantage of keeping our main website &lt;i&gt;alive&lt;/i&gt; with changing content which is good for Google search rankings and also for any Google custom search engines embedded within the website (Google does not, to my knowledge, introspect embedded object/iframe content when spidering a site).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-6121064848430151610?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/6121064848430151610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/06/future-of-website-design-is-gadgets-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6121064848430151610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6121064848430151610'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/06/future-of-website-design-is-gadgets-or.html' title='The future of website design is gadgets. Or is it?'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-2882376155638249974</id><published>2011-05-28T16:52:00.008+01:00</published><updated>2011-05-29T20:36:48.273+01:00</updated><title type='text'>Can primary school children use Linux?</title><content type='html'>Long story abbreviated:&lt;br /&gt;&lt;br /&gt;I have two children, 5 and 7 years old. The primary school would like them to have ready access to the school's VLE website. I happened to have two old laptops, both semi broken and under powered - but fine with a light OS and sitting on a table plugged into the wall. One laptop is a 6 year old HP, the other an Asus eeePC.&lt;br /&gt;&lt;br /&gt;I decided on Xubuntu (Ubuntu but with the less hungry XFCE window manager), version 10.04, a Long Term Support release, maintained for 3 years.&lt;br /&gt;&lt;br /&gt;Two base installations later, I then integrated the laptops with my home systems and locked the WIFI to my base station (ie removed NetworkManager).&lt;br /&gt;&lt;br /&gt;Then a cursory configuration of each of their desktops - fix the fonts to be a bit bigger for small kids, clean up the "gnome style" twin task panels into a more Windows like single panel (the aim here is to allow them to feel comfortable going between my systems and the school computers). Added some media players and Flash so that the school VLE website worked correctly and defaulted Firefox to the school VLE.&lt;br /&gt;&lt;br /&gt;The last jobs included installing the ubuntu-edu-primary metapackage, which adds lots of great education stuff like a fractions quiz, hangman, kiddie friendly paint program and lots of other stuff. Added GoogleEarth too.&lt;br /&gt;&lt;br /&gt;My daughter (7) had a chance to further customise her desktop with verbal guidance and I fixed my son's (5) up by asking him what background colour he'd like.&lt;br /&gt;&lt;br /&gt;It is quick and responsive, uncluttered and has a rich environment perfect for kids their age. My daughter is even learning perl programming. They know about logging out, saving files, hibernating and remembering to turn the power off.&lt;br /&gt;&lt;br /&gt;They have few problems with the differences between Linux and MS Windows - the "Start" menu is in the same place and does similar things. Most apps have a similar menu layout (eg "File/Save", "Edit", "Help" and the more common keystrokes such as CTRL-C/V/X copy/paste/cut and CTRL-S save are the same anyway.&lt;br /&gt;&lt;br /&gt;So overall this has proven a great success. Total cost of legitimate software: £0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-2882376155638249974?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/2882376155638249974/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/05/can-primary-school-children-use-linux.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/2882376155638249974'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/2882376155638249974'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/05/can-primary-school-children-use-linux.html' title='Can primary school children use Linux?'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6040678649103528371.post-6291274933069985607</id><published>2011-05-28T15:59:00.014+01:00</published><updated>2011-05-29T21:01:36.554+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mysql'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='socat'/><title type='text'>So you can't run GUI tools on your MySQL server?</title><content type='html'>GUI tools bring in a lot of dependent packages which is usually undesirable on a tight linux server. MySQL server is usually configured&amp;nbsp; to listen to a local UNIX domain socket and the MySQL root user is usually only allowed by default to connect from this socket. If you have your security right, this socket should have restricted permissions and not allow everyone to connect.&lt;br /&gt;&lt;br /&gt;So when you want to run a GUI such as MySQL Administrator as root on your server, how do you manage this? &lt;br /&gt;&lt;br /&gt;Fortunately, the answer comes via &lt;a href="http://www.dest-unreach.org/socat/"&gt;socat&lt;/a&gt; which is a more modern version of &lt;a href="http://netcat.sourceforge.net/"&gt;netcat&lt;/a&gt; along with our old friend, SSH tunnels. socat and openSSH are core packages in Debian and Ubuntu, although socat may need sourcing from a third party repository for some linux distros.&lt;br /&gt;&lt;br /&gt;Here's the magic:&lt;br /&gt;&lt;br /&gt;# On the MySQL server, as whichever linux user can access the MySQL socket:&lt;br /&gt;&lt;div style="color: blue;"&gt;socat tcp-listen:13306,reuseaddr,fork,bind=127.0.0.1 unix:/var/run/mysqld/mysqld.sock&lt;/div&gt;&lt;div style="color: blue;"&gt;&lt;/div&gt;# On your PC&lt;br /&gt;&lt;div style="color: blue;"&gt;ssh -L3306:localhost:13306 mysql.example.com&lt;/div&gt;&lt;br /&gt;The socat command will need the path adjusted for the location of mysqld.sock (check /etc/mysql/my.cnf - it may be in /var/lib, /var/run or /tmp). socat creates a tcp server on port 13306 accessible from 127.0.0.1 only.&lt;br /&gt;&lt;br /&gt;The ssh command needs the host to be your MySQL server and you may login with any account that is permitted. What happens now, is ssh creates a tcp server on your PC on port 3306 bound to 127.0.0.1 only and wired through to socat on the MySQL server which is wired to the MySQL unix domain socket.&lt;br /&gt;&lt;br /&gt;So your PC's 127.0.0.1:3306 tcp listener in now effectively wired to the heart of your remote MySQL server - clever eh?&lt;br /&gt;&lt;br /&gt;Now run MySQL Administrator or whatever tool from the comfort of your machine! Remember to connect to 127.0.0.1, standard port of 3306. Don't try to use "localhost" as, for some reason, probably due to bad mushrooms, the MySQL developers decided that "localhost" meant "unix domain socket". &lt;i&gt;Sigh...&lt;/i&gt;&lt;br /&gt;&lt;div style="color: red;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background-color: red; color: yellow; font-family: inherit;"&gt;&lt;b&gt;Security implications&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;On the MySQL server, be aware that any other local user may now connect to the 13306 port, thus gain root access to your databases, depending on whether root has a password configured. The same applies to your PC on port 3306 - so if your "PC" happens to be a *nix multiuser server with loads of other people logged in, this would classify as a Bad Idea (TM).&lt;br /&gt;&lt;br /&gt;Close down your ssh tunnel and socat as soon as you have finished.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6040678649103528371-6291274933069985607?l=squiddy.blog.dionic.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://squiddy.blog.dionic.net/feeds/6291274933069985607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://squiddy.blog.dionic.net/2011/05/so-you-cant-run-gui-tools-on-your-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6291274933069985607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6040678649103528371/posts/default/6291274933069985607'/><link rel='alternate' type='text/html' href='http://squiddy.blog.dionic.net/2011/05/so-you-cant-run-gui-tools-on-your-mysql.html' title='So you can&apos;t run GUI tools on your MySQL server?'/><author><name>Tim Watts</name><uri>https://profiles.google.com/106804227975826624524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-4MNKBfXId3Q/AAAAAAAAAAI/AAAAAAAADwc/7w1at8OJKDU/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
