<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
<!--}}}-->
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}

#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0em 14em;}

.toolbar {text-align:right; font-size:.9em;}

.tiddler {padding:1em 1em 0em 1em;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}

.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
<!--{{{-->
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
To get started with this blank TiddlyWiki, you'll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You'll also need to enter your username for signing your edits: <<option txtUserName>>
These InterfaceOptions for customising TiddlyWiki are saved in your browser

Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)

<<option txtUserName>>
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkRegExpSearch>> RegExpSearch
<<option chkCaseSensitiveSearch>> CaseSensitiveSearch
<<option chkAnimate>> EnableAnimations

----
Also see AdvancedOptions
<<importTiddlers>>
|''Type:''|file|
|''URL:''|http://tiddlyvault.tiddlyspot.com/#ImportTiddlersPlugin|
|''Workspace:''|(default)|

This tiddler was automatically created to record the details of this server
*[[Colors]]
*[[Themes]]
*[[Toggling page elements]]
*[[Other style changes]]
*[[Formatting and viewing text]]
*[[Icons, smileys]]
<<formTiddler NewPluginTemplate>><data>{"author":"Eric Shulman (~TiddlyTools)","link":"http://www.tiddlytools.com","format":"Plugin","twversion":"2.1","category":"Behind the scenes","description":"--"}</data>
/***
|''Name:''|CryptoFunctionsPlugin|
|''Description:''|Support for cryptographic functions|
***/
//{{{
if(!version.extensions.CryptoFunctionsPlugin) {
version.extensions.CryptoFunctionsPlugin = {installed:true};

//--
//-- Crypto functions and associated conversion routines
//--

// Crypto "namespace"
function Crypto() {}

// Convert a string to an array of big-endian 32-bit words
Crypto.strToBe32s = function(str)
{
	var be = Array();
	var len = Math.floor(str.length/4);
	var i, j;
	for(i=0, j=0; i<len; i++, j+=4) {
		be[i] = ((str.charCodeAt(j)&0xff) << 24)|((str.charCodeAt(j+1)&0xff) << 16)|((str.charCodeAt(j+2)&0xff) << 8)|(str.charCodeAt(j+3)&0xff);
	}
	while (j<str.length) {
		be[j>>2] |= (str.charCodeAt(j)&0xff)<<(24-(j*8)%32);
		j++;
	}
	return be;
};

// Convert an array of big-endian 32-bit words to a string
Crypto.be32sToStr = function(be)
{
	var str = "";
	for(var i=0;i<be.length*32;i+=8)
		str += String.fromCharCode((be[i>>5]>>>(24-i%32)) & 0xff);
	return str;
};

// Convert an array of big-endian 32-bit words to a hex string
Crypto.be32sToHex = function(be)
{
	var hex = "0123456789ABCDEF";
	var str = "";
	for(var i=0;i<be.length*4;i++)
		str += hex.charAt((be[i>>2]>>((3-i%4)*8+4))&0xF) + hex.charAt((be[i>>2]>>((3-i%4)*8))&0xF);
	return str;
};

// Return, in hex, the SHA-1 hash of a string
Crypto.hexSha1Str = function(str)
{
	return Crypto.be32sToHex(Crypto.sha1Str(str));
};

// Return the SHA-1 hash of a string
Crypto.sha1Str = function(str)
{
	return Crypto.sha1(Crypto.strToBe32s(str),str.length);
};

// Calculate the SHA-1 hash of an array of blen bytes of big-endian 32-bit words
Crypto.sha1 = function(x,blen)
{
	// Add 32-bit integers, wrapping at 32 bits
	add32 = function(a,b)
	{
		var lsw = (a&0xFFFF)+(b&0xFFFF);
		var msw = (a>>16)+(b>>16)+(lsw>>16);
		return (msw<<16)|(lsw&0xFFFF);
	};
	// Add five 32-bit integers, wrapping at 32 bits
	add32x5 = function(a,b,c,d,e)
	{
		var lsw = (a&0xFFFF)+(b&0xFFFF)+(c&0xFFFF)+(d&0xFFFF)+(e&0xFFFF);
		var msw = (a>>16)+(b>>16)+(c>>16)+(d>>16)+(e>>16)+(lsw>>16);
		return (msw<<16)|(lsw&0xFFFF);
	};
	// Bitwise rotate left a 32-bit integer by 1 bit
	rol32 = function(n)
	{
		return (n>>>31)|(n<<1);
	};

	var len = blen*8;
	// Append padding so length in bits is 448 mod 512
	x[len>>5] |= 0x80 << (24-len%32);
	// Append length
	x[((len+64>>9)<<4)+15] = len;
	var w = Array(80);

	var k1 = 0x5A827999;
	var k2 = 0x6ED9EBA1;
	var k3 = 0x8F1BBCDC;
	var k4 = 0xCA62C1D6;

	var h0 = 0x67452301;
	var h1 = 0xEFCDAB89;
	var h2 = 0x98BADCFE;
	var h3 = 0x10325476;
	var h4 = 0xC3D2E1F0;

	for(var i=0;i<x.length;i+=16) {
		var j,t;
		var a = h0;
		var b = h1;
		var c = h2;
		var d = h3;
		var e = h4;
		for(j = 0;j<16;j++) {
			w[j] = x[i+j];
			t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=16;j<20;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),d^(b&(c^d)),w[j],k1);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=20;j<40;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k2);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=40;j<60;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),(b&c)|(d&(b|c)),w[j],k3);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}
		for(j=60;j<80;j++) {
			w[j] = rol32(w[j-3]^w[j-8]^w[j-14]^w[j-16]);
			t = add32x5(e,(a>>>27)|(a<<5),b^c^d,w[j],k4);
			e=d; d=c; c=(b>>>2)|(b<<30); b=a; a = t;
		}

		h0 = add32(h0,a);
		h1 = add32(h1,b);
		h2 = add32(h2,c);
		h3 = add32(h3,d);
		h4 = add32(h4,e);
	}
	return Array(h0,h1,h2,h3,h4);
};


}
//}}}
Damon has been working in Linux since 2000.
Welcome to Damtek.
/***
|''Name:''|DeprecatedFunctionsPlugin|
|''Description:''|Support for deprecated functions removed from core|
***/
//{{{
if(!version.extensions.DeprecatedFunctionsPlugin) {
version.extensions.DeprecatedFunctionsPlugin = {installed:true};

//--
//-- Deprecated code
//--

// @Deprecated: Use createElementAndWikify and this.termRegExp instead
config.formatterHelpers.charFormatHelper = function(w)
{
	w.subWikify(createTiddlyElement(w.output,this.element),this.terminator);
};

// @Deprecated: Use enclosedTextHelper and this.lookaheadRegExp instead
config.formatterHelpers.monospacedByLineHelper = function(w)
{
	var lookaheadRegExp = new RegExp(this.lookahead,"mg");
	lookaheadRegExp.lastIndex = w.matchStart;
	var lookaheadMatch = lookaheadRegExp.exec(w.source);
	if(lookaheadMatch && lookaheadMatch.index == w.matchStart) {
		var text = lookaheadMatch[1];
		if(config.browser.isIE)
			text = text.replace(/\n/g,"\r");
		createTiddlyElement(w.output,"pre",null,null,text);
		w.nextMatch = lookaheadRegExp.lastIndex;
	}
};

// @Deprecated: Use <br> or <br /> instead of <<br>>
config.macros.br = {};
config.macros.br.handler = function(place)
{
	createTiddlyElement(place,"br");
};

// Find an entry in an array. Returns the array index or null
// @Deprecated: Use indexOf instead
Array.prototype.find = function(item)
{
	var i = this.indexOf(item);
	return i == -1 ? null : i;
};

// Load a tiddler from an HTML DIV. The caller should make sure to later call Tiddler.changed()
// @Deprecated: Use store.getLoader().internalizeTiddler instead
Tiddler.prototype.loadFromDiv = function(divRef,title)
{
	return store.getLoader().internalizeTiddler(store,this,title,divRef);
};

// Format the text for storage in an HTML DIV
// @Deprecated Use store.getSaver().externalizeTiddler instead.
Tiddler.prototype.saveToDiv = function()
{
	return store.getSaver().externalizeTiddler(store,this);
};

// @Deprecated: Use store.allTiddlersAsHtml() instead
function allTiddlersAsHtml()
{
	return store.allTiddlersAsHtml();
}

// @Deprecated: Use refreshPageTemplate instead
function applyPageTemplate(title)
{
	refreshPageTemplate(title);
}

// @Deprecated: Use story.displayTiddlers instead
function displayTiddlers(srcElement,titles,template,unused1,unused2,animate,unused3)
{
	story.displayTiddlers(srcElement,titles,template,animate);
}

// @Deprecated: Use story.displayTiddler instead
function displayTiddler(srcElement,title,template,unused1,unused2,animate,unused3)
{
	story.displayTiddler(srcElement,title,template,animate);
}

// @Deprecated: Use functions on right hand side directly instead
var createTiddlerPopup = Popup.create;
var scrollToTiddlerPopup = Popup.show;
var hideTiddlerPopup = Popup.remove;

// @Deprecated: Use right hand side directly instead
var regexpBackSlashEn = new RegExp("\\\\n","mg");
var regexpBackSlash = new RegExp("\\\\","mg");
var regexpBackSlashEss = new RegExp("\\\\s","mg");
var regexpNewLine = new RegExp("\n","mg");
var regexpCarriageReturn = new RegExp("\r","mg");

}
//}}}
This is a teaching my wife did on Joseph and his walk with God.

you can click on this link to listen or right click and  choose " save as"  to dowload:  [[Great things are going to happen (Joseph)|http://www.damtek.com/Great_things_are_going_to_happen(Joseph).mp3]]
Why Debian?  I like it.  It was my first Linux I ever really got to get to know.  It is very flexible.  The motto is "The Universal Operating System" and has been around since about 1993 and runs on more architectures then any other OS.  The thing that distinguishes one distribution from another are the tools packaged and made part of the OS to make things "easy" to do.  Probably the most important tool is the package maintainer, or "how do you add programs or update the system?".  There simply is nothing as good as apt-get.  Want to install firefox?  apt-get install firefox.  Do you have a basic system installed and want to install a GUI?  apt-get install gnome-desktop (or kde).  That is how hard it is.  Want to get the latest release of Debian?  Just do aptitude full-upgrade (after changing your /etc/apt/sources.list to point to the new release) and you are done.  Once you install Debian, unless you have some sort of catastrophic failure, there is no reason to ever re-install it.  

A word on the "flavors" of Debian:  there are three:  Stable, Testing, and Unstable.  If you are running a server, with out overpowering reasons, you will be running stable.  The same for a desktop workstation that has "got to be working".  Stable releases normally run for about two years between releases.  Once released, they only do security updates to stable.  It is Stable.

Testing "The testing distribution contains packages that haven't been accepted into a stable release yet, but they are in the queue for that. The main advantage of using this distribution is that it has more recent versions of software." 

Unstable: "The unstable distribution is where active development of Debian occurs. Generally, this distribution is run by developers and those who like to live on the edge."

See here for details:  http://www.us.debian.org/releases/

I like to run unstable on my desktop/workstation.  It is about as stable as """FC""", """OpenSuse, Mandriva,or Ubuntu""" or even more so (in my experiance, more so).  The lable "unstable" does not refer to how well it runs, but rather the packages that are moved in or out of it.  It is constantly changing.  In fact, for the most part Unbuntu is a snapshot of unstable with some work put in for usabiity.

Again, I want to say, my preference is to run unstable, //however// many, many people feel this is a mistake and insist that you run stable, especially if you are //new// to Linux or Debian.  I learned on unstable and I know that this is not an insurmountable hurdle, however at least once I was left with a useless system because of an update I applied to carelessly.   

With out respect to the "flavor" you will want to run, start out with a stable install CD or net-install CD.  Why?  The Testing or Unstable versions might well be broke and you will spend hours troubleshooting your install to no avail!  If the installer is broke (after all it """IS""" Testing or Unstable and is meant to test different settings and configurations, not all of which will work on all machines) nothing you will do will fix it and you will go over and over it trying to find that one "thing" you did "wrong" to make it work.  Just get Stable.  Get it? http://www.debian.org/CD/http-ftp/  If you want to get the full CD, you only need the first one.  You can get the rest of the packages online after the base is installed.  A full CD is faster then a net install, as your CD works faster then your network.

Rather then re-invent the wheel, just follow this guide here:  http://www.howtoforge.com/the_perfect_desktop_debian_etch

Once the system is installed, that is when I upgrade to Sid/Unstable: as root

----
aptitude update
aptitude safe-upgrade
aptitude install apt-listbugs
----
now your system is in sync with the latest version of Stable. If you insists on running anything but stable, you //MUST// install apt-listbugs.  Apt-listbugs will list all known bugs, and the severity of all packages you install, giving you a chance to abort the upgrade/install of some buggy package.  If you are new to Linux, you will probably not have a clue if it is safe or not, but you can still read it and come to reasonable conclusions.  For example something might say "does not work on hardware foo" and you don't have foo, it is probably OK for """YOU""".  Again, if I have not scared you off of unstable, ''//if//'' you insist on having the //latest// versions of packages and the //newest// applications then it will not matter what distribution of Linux you run, they will "all" have these serious bugs.  If you don't believe me, google "fedora core 9 problem" or "Ubuntu problem".  As a foot note:  Many new to Linux must have the latest distribution or the newest package of something.  It's like a drug.  Newer=better.  //NOT!//  Newer means not tested, full of bugs, maybe not even working.  Just because some package is three revisions older then the one the author/authors just released does not mean it is not as "good".  New features may break backward compatibilities or older functions or might cause Firefox to crash.  If you run unstable, you will get all the features of Ubunutu only your packages will be newer.  You will have the ability to set up your box the same way they do (but you have to set it up that way, it will not come pre-packaged to work exactly like that) but you will have the same bugs and as you keep upgrading your system, you will get to have the experience of finding newer, more exciting bugs!   Again, ''//IF//'' you need to have a workstation up and running to get //work// done, don't run unstable, don't run testing, run stable unless and only unless your box will not work on stable for some reason.  

Now back to upgrading to Sid.

----
gedit /etc/apt/sources.list
----

Here is my sources.list

----
deb http://debian.mirrors.tds.net/debian/ testing main

deb http://debian.mirrors.tds.net/debian/ testing contrib non-free

"""#added for vido codecs"""
deb http://debian-multimedia.org/ lenny main

deb http://mirrors.kernel.org/debian/ lenny main
deb http://mirrors.kernel.org/debian/ lenny contrib non-free

----

Lenny and testing are the same thing at this point in time.  Change your sources to reflect testing and do this:

----
aptitude update
aptitude install debian-multimedia-keyring
aptitude safe-upgrade
----

read the output of apt-listbugs.  Read it again.  If it looks like it will work, type "y" and watch the "magic" happen.

This will only update packages you have to newer packages that are in testing, it will not remove anything.

If all goes well, do this:

----
aptitude update
aptitude full-upgrade

----

read the messages and make sure you will not have an unusable system when you are done, if you are happy, commit to it.

Now, if all goes well, you are running "Testing".  It may not all go well.  Read the terminal window.  It might well tell you something went wrong.  Run an update, if it says something is wrong, run "apt-get -f install", run it!  Again, I say READ the terminal, it tells quite a bit.

Now update your apt-sources to point to Sid:  gedit /etc/apt/sources.list

----
deb http://debian.mirrors.tds.net/debian/ sid main

deb http://debian.mirrors.tds.net/debian/ sid contrib non-free

#added for vido codecs
deb http://debian-multimedia.org/ sid main

deb http://mirrors.kernel.org/debian/ sid main
deb http://mirrors.kernel.org/debian/ sid contrib non-free

----

By the way, the reason I have two sources for sid main is in the event one is down or in the middle of being updated, the other will work.  You don't need two.

----

aptitude update
aptitude safe-upgrade
aptitude full-upgrade

----

Need I say to check the output of apt-listbugs?  If you run into a show stopper (server bug in foo:  No boot when update on all packages, for example)  just wait a few days to a week and try again.  Unstable is constantly getting updates and fixes applied to it.  Any show stopper will get worked on and re-submitted for us to test.  You might also want to subscribe to the debian-user mail list to track all kinds of issues people have and general questions and answers/work arounds:  http://lists.debian.org/debian-user/ and the Debian-announce mailing list:  http://lists.debian.org/debian-announce/

About once a week or so, run a new update, a new safe-upgrade and you will be kept up with the latest, greatest packages and their bugs






/***
|''Name:''|LegacyStrikeThroughPlugin|
|''Description:''|Support for legacy (pre 2.1) strike through formatting|
|''Version:''|1.0.2|
|''Date:''|Jul 21, 2006|
|''Source:''|http://www.tiddlywiki.com/#LegacyStrikeThroughPlugin|
|''Author:''|MartinBudden (mjbudden (at) gmail (dot) com)|
|''License:''|[[BSD open source license]]|
|''CoreVersion:''|2.1.0|
***/

//{{{
// Ensure that the LegacyStrikeThrough Plugin is only installed once.
if(!version.extensions.LegacyStrikeThroughPlugin) {
version.extensions.LegacyStrikeThroughPlugin = {installed:true};

config.formatters.push(
{
	name: "legacyStrikeByChar",
	match: "==",
	termRegExp: /(==)/mg,
	element: "strike",
	handler: config.formatterHelpers.createElementAndWikify
});

} //# end of "install only once"
//}}}
''MainMenu''
[[mdadm, Raid & the Linux kernel]]

[[mdadm, RAID and the /boot dir]]

[[Dell Vostro and sound]]

[[Configuring the wireless, Dell Vostro + Debian]]

[[Installing Debian]]

[[Dell Vostro 1500 and Linux]]

[[Great Things are going to happen (Joseph)]]
a non-linear personal web notebook containing the random musing of Damon while he explores the wonderful world of computers, Linux, and technology.
Damtek.Com
/***
|''Name:''|SparklinePlugin|
|''Description:''|Sparklines macro|
***/
//{{{
if(!version.extensions.SparklinePlugin) {
version.extensions.SparklinePlugin = {installed:true};

//--
//-- Sparklines
//--

config.macros.sparkline = {};
config.macros.sparkline.handler = function(place,macroName,params)
{
	var data = [];
	var min = 0;
	var max = 0;
	var v;
	for(var t=0; t<params.length; t++) {
		v = parseInt(params[t]);
		if(v < min)
			min = v;
		if(v > max)
			max = v;
		data.push(v);
	}
	if(data.length < 1)
		return;
	var box = createTiddlyElement(place,"span",null,"sparkline",String.fromCharCode(160));
	box.title = data.join(",");
	var w = box.offsetWidth;
	var h = box.offsetHeight;
	box.style.paddingRight = (data.length * 2 - w) + "px";
	box.style.position = "relative";
	for(var d=0; d<data.length; d++) {
		var tick = document.createElement("img");
		tick.border = 0;
		tick.className = "sparktick";
		tick.style.position = "absolute";
		tick.src = "data:image/gif,GIF89a%01%00%01%00%91%FF%00%FF%FF%FF%00%00%00%C0%C0%C0%00%00%00!%F9%04%01%00%00%02%00%2C%00%00%00%00%01%00%01%00%40%02%02T%01%00%3B";
		tick.style.left = d*2 + "px";
		tick.style.width = "2px";
		v = Math.floor(((data[d] - min)/(max-min)) * h);
		tick.style.top = (h-v) + "px";
		tick.style.height = v + "px";
		box.appendChild(tick);
	}
};


}
//}}}
Welcome to Damtek.  This site is not linear, you don't scroll from the top to the bottom. Instead, open a link on the left, or search for an item on the right and those articles will appear below. Just to the right of the title of the article, you will see a "close" button. Close it when you are done. Opening a link will open a new article and you will be taken to that selection. This is based off of tiddlywiki and is, of course, free to use http://www.tiddlywiki.com/

I plan to post various things I find interesting, howtos and observations, mostly dealing with Linux. If you have anything you would like to have posted here, just ask.


I plan on posting things I think are interesting, howtos and observations on mostly Linux things.
RAID and the /boot dir

Now lets say I understand how to use mdadm and I understand the advantages of using raid, especially RAID 1 on, say, /boot. But I have all ready installed my linux (in this case """RHEL4""") and I did not use RAID and I really, really want it up and running: what can I do? Reinstall? NO!


Here is what I did. Boot up into the RHEL install cd and chose linux rescue to boot up into the rescue environment. Do you need to do this? No, I just did not want my file system mounted while I was playing with grub. The RHEL rescue will mount your file system under /mnt/sysimage. I cd into /mnt/sysimage, chroot /mnt/sysimage, umount /dev/hda1, then I did all the below. Again, you don't have to do this, you can do this just by booting into the system it's self and then umount /dev/hda1 and do all the below.


using fdisk (see the previous blog entry) I made a 100M primary partition on /dev/hdb and /dev/hdd. I made them type fd (linux auto raid). I copied the contents of /boot into /root/boot (mkdir /root/boot (you have to be root to do this), cp -r /boot/* /root/boot/) then I


umount /dev/hda1

fdisk /dev/hda1

typed in t and selected fd

typed in w for write

mkfs.ext3 /dev/hda(b)(d)1

"""mdadm --create --level=1 /dev/md0 --raid-devices=2 /dev/hda1 /dev/hdd1 –spare-devices=/dev/hdb1"""

mkfs.ext3 /dev/md0


if you run mdadm -D /dev/md0 you can see the details:


[root@Dam-test proc]# mdadm -D /dev/md0

/dev/md0:

Version : 00.90.01

Creation Time : Sun May 7 11:43:54 2006

Raid Level : raid1

Array Size : 104320 (101.88 """MiB""" 106.82 MB)

Device Size : 104320 (101.88 """MiB""" 106.82 MB)

Raid Devices : 2

Total Devices : 3

Preferred Minor : 0

Persistence : Superblock is persistent


Update Time : Sun May 7 17:55:31 2006

State : clean

Active Devices : 2

Working Devices : 3

Failed Devices : 0

''Spare Devices : 1''



Number Major Minor """RaidDevice""" State

0            3 1     0 active sync /dev/hda1

1            22     65 1 active sync /dev/hdd1

2             3      65 -1 spare /dev/hdb1

UUID : 6862e23b:a05d1729:85df186a:b2ee204d

Events : 0.74


Do you see that line I made ''bold''? If you were paying attention, you noticed I added ''THREE'' devices to a """RAID1""" device. /dev/hdb1 is added as a spare. What does that mean? If hda1 or hdd1 fail, then /dev/hb1 will pick up and the kernel will rebuild the array and will cause hdd1 to mirror hda1 or hdd1, which ever is still in the array.


But we still don't have a /boot partition. So, cp that /root/boot data back to /dev/md0 like this:


mount /dev/md0 -t ext3 /boot

cp -r /root/boot/* /boot/



No, we still are not done. Now we have to reinstall grub. You see grub installs into the MBR (main boot record) of a hard drive and /dev/md0 is NOT a hard drive. But here is a problem: if you install grub into MBR of /dev/hda and /dev/hda fails, then you can not boot! Why? even though your /boot is mounted on /dev/md0 and md0 is still running (ain't """RAID1""" wonderful!) you have no record of the MBR to boot up. So now you have to do some grub configing.


This one took some searching to find the cryptic grub commands. I have no idea why grub can't use the same device names as linux, but it does not. So here are the commands I ran.


grub

This took about two minutes to find all the possible devices then it

left a “>” as a prompt.

At the prompt I typed:


grub> device (hd0) /dev/hda grub> root (hd0,0)
Filesystem type is ext2fs,
partition type 0xfd grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes  Checking if
"/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes  
Running "embed /grub/e2fs_stage1_5 (hd0)"...
15 sectors are embedded.  succeeded
Running "install /grub/stage1 (hd0) (hd0)1+15 p
(hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
Done.  

You see, I need to install grub into the MBR of /dev/hda so that the
system will boot. I also need to install it into the MBR of
/dev/hdd so that if /dev/hda fails, then I can still boot.  Remember
the entire /boot dir is mirrored onto /dev/hda1 and /dev/hdd1 so
that grub CAN boot if it is the MBR of both of the devices if either
of them fail.  Again /boot is mounted on device /dev/md0 which is
made up of dev/hda1 and /dev/hdd1 and as a spare /dev/hdb1. S0, then:

grub> device (hd0) /dev/hdd 
grub> root (hd0,0)  Filesystem type is ext2fs,
partition type 0xfd grub> setup (hd0)  Checking if
"/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes  Checking if
"/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"...
15 sectors are embedded.  succeeded
Running "install /grub/stage1 (hd0) (hd0)1+15 p
(hd0,0)/grub/stage2  /grub/grub.conf"... succeeded  
Done.

You are almost done!  You can not run this command on /deb/hdb1.  I
think because it is not 'active'.  So if hda1 or hdb1 fail, you will
need to run this again on hdb1, which WILL be active should one of
the other two fail.  I hope this is clear!  Now RHEL has what I
consider a strange /etc/fstab.  I am used to a line like the
following:

 /dev/md0  /boot  ext3  defualts 1 0 

but in RHEL that line is as folllows

LABEL=/boot    /boot   ext3    defaults        1 2

So in order to get your /boot to mount on /dev/md0 at system
boot time, you need to run this command:

 e2label /dev/md0 /boot

 and make sure that the fstab line for /boot has the correct label
(i.e. not LABEL/boot1 or some such thing)and matches the label you
gave it with e2babel.  That's it!  Your done.  Now exit or
reboot (if you are in the system and did not use the rescue mode
of the install cd) and test the grub. You will notice that your
boot will look just a little different, sorry, I don't have a
screen shot, but you know it works when you see your grub menu.
If you get a failure, just double check your work.
I hope this helps you!   
Raid & The Linux Kernel

RHEL uses fdisk to manually modify the partitions of hd. Become very comfortable with fdisk.. My layout, RHEL 4.3, 3 HD, hda, hdb, hdd. I installed RH on hda, and accepted the default layout for the install. hda1 100MB /boot, hda2 20G /, and a 1G swap partition /hda3.


Now I wanted to add a raid1 device (raid 1 is two drives, mirrored )


fdisk /dev/hdd

Command (m for help): n

Command action

e extended

p primary partition (1-4)

e

Partition number (1-4): 1

First cylinder (1-9729, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-9729, default 9729):


Using default value 9729

Command (m for help): n

Command action

l logical (5 or over)

p primary partition (1-4)

l

First cylinder (1-9729, default 1): 1

Last cylinder or +size or +sizeM or +sizeK (1-9729, default 9729): +5000M


Command (m for help): p


Disk /dev/hdd: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


Device Boot Start End Blocks Id System

/dev/hdd1 1 9729 78148161 5 Extended st partition I made

/dev/hdd5 1 609 4891729+ 83 Linux nd one I made.


Command (m for help): t <

Partition number (1-5): 5 <

Hex code (type L to list codes): fd

Changed system type of partition 5 to fd (Linux raid autodetect)


Command (m for help): w <

The partition table has been altered!


Calling ioctl() to re-read partition table.

Syncing disks.


I called up fdisk again to check the partitions and used the p function:


Disk /dev/hdd: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


Device Boot Start End Blocks Id System

/dev/hdd1 1 9729 78148161 5 Extended

/dev/hdd5 1 609 4891729+ fd Linux raid autodetect



As you can see, hdd5 is now about 5 G in size and is has a t ID of fd.


Repeat this for hdb


Disk /dev/hdb: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


Device Boot Start End Blocks Id System

/dev/hdb1 1 9729 78148161 5 Extended

/dev/hdb5 1 5001 40170469+ fd Linux raid autodetect


Now you need to start using the mdadm package (Meta Device admin) to join the two partitions, but first format them using mkfs.ext3:


mkfs.ext3 /dev/hdb5 and /dev/hdd5


"""[root@Dam-test ~]# mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/hdb5 /dev/hdd5"""

mdadm: /dev/hdb5 appears to contain an ext2fs file system

size=40170468K mtime=Wed Dec 31 18:00:00 1969

mdadm: /dev/hdd5 appears to contain an ext2fs file system

size=4891728K mtime=Wed Dec 31 18:00:00 1969

mdadm: size set to 4891648K

mdadm: largest drive (/dev/hdb5) exceed size (4891648K) by more than 1%

Continue creating array? y

mdadm: array /dev/md0 started.

[root@Dam-test ~]#


This makes a Meta Device called /dev/md0 that can now be used like any other /dev/hdX device. You can also use mdadm to look at the details of this device like this:


[root@Dam-test ~]# mdadm """--"""detail /dev/md0

/dev/md0:

Version : 00.90.01

Creation Time : Thu May 4 18:42:37 2006

Raid Level : raid1

Array Size : 4891648 (4.67 GiB 5.01 GB)

Device Size : 4891648 (4.67 GiB 5.01 GB)

Raid Devices : 2

Total Devices : 2

Preferred Minor : 0

Persistence : Superblock is persistent


Update Time : Thu May 4 18:44:06 2006

State : clean

Active Devices : 2

Working Devices : 2

Failed Devices : 0

Spare Devices : 0



Number Major Minor RaidDevice State

0 3 69 0 active sync /dev/hdb5

1 22 69 1 active sync /dev/hdd5

UUID : e1c85b4a:294b0187:ac5b1831:99a08e07

Events : 0.2

[root@Dam-test ~]#