<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hard drive &#8211; Phocean.net</title>
	<atom:link href="/tag/hard-drive/feed" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Computer Security Blog</description>
	<lastBuildDate>Fri, 24 Feb 2017 21:17:51 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.10</generator>
	<item>
		<title>Disk wiping : Myth broken</title>
		<link>/2011/03/06/disk-wiping-myth-broken.html</link>
		<pubDate>Sun, 06 Mar 2011 18:58:10 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Privacy]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[dd]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[Hard drive]]></category>
		<category><![CDATA[wiping]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=1024</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=1024</guid>
		<description><![CDATA[There are many urban legends in the industry. I did believe in one of them : &#8220;wiping a disk to properly prevent data restore requires random writes and several passes&#8221;. At least until I found this very instructive article, &#8220;Disk Wiping &#8211; One pass is enough&#8220;. Don&#8217;t miss the second part which clarifies some points...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2011/03/06/disk-wiping-myth-broken.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>There are many urban legends in the industry. I did believe in one of them : &#8220;wiping a disk to properly prevent data restore requires random writes and several passes&#8221;.</p>
<p>At least until I found this very instructive article, &#8220;<a title="Disk Wiping - one pass is enough" href="http://www.anti-forensics.com/disk-wiping-one-pass-is-enough" target="_blank">Disk Wiping &#8211; One pass is enough</a>&#8220;. Don&#8217;t miss <a title="Disk Wiping - one pas is enought - part 2" href="http://www.anti-forensics.com/disk-wiping-one-pass-is-enough-part-2-this-time-with-screenshots" target="_blank">the second part</a> which clarifies some points and gives more details.</p>
<p>In short, after one pass, every bit of the disk is filled with zero and there is simply no way to find out what the previous value was. Even the best tools out there have no clue to do it.</p>
<p>Then, there is a theory of physically restoring each bit using a magnetic force microscope. It has always came with a high error rate, and with modern high density disks it is even less reliable. Now, considering any real world data length, errors occurring on the restored bits would make it impossible to rebuild any usable data. There is obviously no chance for such a technique to recover a file.</p>
<p>So, in the future, I will not only save time doing one pass, but I will replace :</p>
<pre>$ dd if=/dev/urandom of=/dev/sda</pre>
<p>with</p>
<pre>$ dd if=/dev/zero of=/dev/sda</pre>
<p>Note that formating just reset the partition table. In no way it clears out every bit of the disk.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Cold boot attack, not a threat to Full disk encryption (FDE)</title>
		<link>/2008/02/26/cold-boot-attack-not-a-threat-to-full-disk-encryption-fde.html</link>
		<comments>/2008/02/26/cold-boot-attack-not-a-threat-to-full-disk-encryption-fde.html#comments</comments>
		<pubDate>Tue, 26 Feb 2008 09:53:02 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Cold boot attack]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[FDE]]></category>
		<category><![CDATA[Hard drive]]></category>
		<category><![CDATA[TPM]]></category>
		<category><![CDATA[Vulnerability]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=100</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=100</guid>
		<description><![CDATA[Since the new cold boot attack hack is on the news, touching most of the software encryption solutions, I have wondered if it had any chance to concern also hardware encryption. Hardware encryption is provided by a few laptop makers, generally on high-range an business models. It has much less performance impact than software encryption,...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2008/02/26/cold-boot-attack-not-a-threat-to-full-disk-encryption-fde.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Since the new cold boot attack hack is on the news, touching most of the software encryption solutions, I have wondered if it had any chance to concern also hardware encryption.</p>
<p>Hardware encryption is provided by a few laptop makers, generally on high-range an business models.</p>
<p>It has much less performance impact than software encryption, and protect the data independently from your system configuration and its partitions.</p>
<p>Full disk encryption is the so called hardware encryption technology used by Lenovo on my Thinkpad.</p>
<p><span id="more-100"></span></p>
<p>Mine comes with a Hitachi hard drive. Hitachi names its encryption technology <strong><em>&#8220;Bulk Data Encryption&#8221;</em></strong>.</p>
<p>I know at least Seagate provides the same kind of feature.</p>
<p>The bulk data encryption is based on the<strong> AES algorithm with a 128 bits key</strong>.</p>
<p>Actually, the encryption is not done by the laptop itself but by the hard-drive.</p>
<p>You need both the hard drive and the laptop supporting encryption , for the following reasons :</p>
<ol>
<li>your motherboard must have a TPM chip, which is used for the encryption, as a unique source to derivate the encryption keys.</li>
<li>the BIOS must interface with the hard drive FDE, to set/unset the encryption and to prompt for the password before the real boot (actually, a small OS embedded on the drive take care of this authentication).</li>
</ol>
<p>In reality, the encryption is always active and the password to access to the drive is just another security feature. There is no link between these two functions. That&#8217;s why the fact of setting a password is immediate : no reencryption is done because the password has nothing to do with encryption.</p>
<p>In case of authentication success, the system boots normally.</p>
<p>In case of failure, and if the maximum number of attempt is reached, the data is erased. Instead of initializing the content with 0, which would take a lot of time and could be interrupted by shutting down the machine, just the keys are destroyed within a few seconds.</p>
<p>Anyway, the content is supposed to be very hard to retrieve thanks to the effectiveness of the AES algorithm.</p>
<p>One important thing is that <strong>the key is not a derivate of the password you set</strong>.</p>
<p>The hard drive password is a feature that does not come necessarily with encryption.</p>
<p>It is just there to limit the access of the content, but not its confidentiality.</p>
<p>For instance, you could imagine that if the drive is stolen, someone opens physically the drive, change the ROM to pass over the password and read your data without any pain.</p>
<p>The con of that is <strong>the encryption keys generation is based on your hardware</strong>. A different hardware can&#8217;t decipher the drive.</p>
<p>If your motherboard breaks down, you won&#8217;t be able to read your data from another computer ! Make some good backups&#8230;</p>
<p>To go back to the main topic, <strong>is the cold boot attack a threat for this hardware encryption ?</strong></p>
<p>No. The encryption algorithm is not in the user land, so no key is stored in RAM.</p>
<p><strong> The key hashes are stored directly on the disk.</strong></p>
<p>These documents from Hitachi provide more detailed information :</p>
<p><a title="Bulk encryption white paper" href="/wp-content/uploads/2008/02/bulk_encryption_white_paper.pdf">Bulk encryption white paper</a></p>
<p><a title="HowTo guide for bulk data encryption" href="/wp-content/uploads/2008/02/howtoguide_bulkdataencryption_final.pdf">HowTo guide for bulk data encryption</a></p>
<p><a title="Hardware encryption" href="http://en.wikipedia.org/wiki/Full_disk_encryption">This Wikipedia article</a>, underlining the main points of hardware encryption,  is also interesting.</p>
<p>I guess that at some point it would be possible to read some hash on the hard drive electronic board, but this is not going to be easy. You need to be a hardware expert in hard drives and for sure it can&#8217;t be done as quickly as with the RAM chip.</p>
<p>Of course, even the cold boot attack is extreme. Most of thief won&#8217;t care about your data, or won&#8217;t be the knowledge or the practical possibility to conduct a successful attack.</p>
<p>If you don&#8217;t have FDE support, you should continue to use an encryption solution like dm-crypt or Truecrypt and maybe consider turning off your computer more often.</p>
<p>It anyway remains an excellent solution for external disks, as it is normally not all the time attached to your computer.</p>
<p>Personally, as FDE offers more performance and transparency, I am using it on my laptop but I keep using dm-crypt on all my external drives.</p>
<p>Now the question is : what good workaround can be found to provide more secure software encryption ?</p>
]]></content:encoded>
			<wfw:commentRss>/2008/02/26/cold-boot-attack-not-a-threat-to-full-disk-encryption-fde.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disk encryption methods : hacked !</title>
		<link>/2008/02/25/disk-encryption-methods-hacked.html</link>
		<pubDate>Mon, 25 Feb 2008 21:25:49 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Cold boot attack]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Hard drive]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=99</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=99</guid>
		<description><![CDATA[Damned ! A team of researchers found a way to defeat all the most common disk encryption methods &#8211; including dm-crypt for Linux that I previously described on this blog. All systems are actually concerned, because the attack is low level. It is based on the RAM chips properties. After shutdown, and therefore no more...<br><i class="icon-right-hand"></i> <span class="read-more"><a href="/2008/02/25/disk-encryption-methods-hacked.html">Continue Reading</a></span>]]></description>
				<content:encoded><![CDATA[<p>Damned !</p>
<p><a title="disk encryption hackers" href="http://citp.princeton.edu/memory">A team of researchers</a> found a way to defeat all the most common disk encryption methods &#8211; including dm-crypt for Linux that I <a title="dm-crypt tutorial" href="http://http//www.phocean.net/?p=85">previously described</a> on this blog.</p>
<p><a title="disk encryption hackers" href="http://citp.princeton.edu/memory">A team of researchers</a> found a way to defeat all the most common disk encryption methods &#8211; including dm-crypt for Linux that I <a title="dm-crypt tutorial" href="http://http//www.phocean.net/?p=85">previously described</a> on this blog.</p>
<p>All systems are actually concerned, because the attack is low level. It is based on the RAM chips properties. After shutdown, and therefore no more electricity powering, a chip will still contain some readable information during a few seconds.</p>
<p>The data contained is deteriorating, but for example if you cool the chip enough, for example with a computer dry air dust cleaner, you can keep the data several minutes !</p>
<p>The problem concerning data encryption is that the decryption key is kept in RAM, and that way be stolen to read all your data.</p>
<p>The attack would not so easy in practice, if suspend-to-ram did not exist.</p>
<p>But as many users, including me, use heavily suspend-to-ram with their laptop, this issue is rather problematic&#8230;</p>
<p>The team provides a rather impressive video :</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="http://www.youtube.com/v/JDaicPIgn9U&amp;rel=1" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://www.youtube.com/v/JDaicPIgn9U&amp;rel=1" wmode="transparent"></embed></object></p>
<p>I no longer use dm-crypt since my <a title="my thinkpad T61" href="/?p=97">Thinkpad</a> provides hardware encryption, but I wonder now where the key is stored in my case. I don&#8217;t think it is in RAM, but I have to check it to make sure.I will do it tomorrow, since I need to rest now.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Disk Encryption on Linux</title>
		<link>/2007/11/18/disk-encryption-on-linux.html</link>
		<comments>/2007/11/18/disk-encryption-on-linux.html#comments</comments>
		<pubDate>Sun, 18 Nov 2007 17:56:47 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Cryptography]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[cryptoloop]]></category>
		<category><![CDATA[cryptsetup]]></category>
		<category><![CDATA[dmcrypt]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Hard drive]]></category>
		<category><![CDATA[Luks]]></category>
		<category><![CDATA[swap]]></category>

		<guid isPermaLink="false">http://www.phocean.net/?p=85</guid>
		<guid isPermaLink="false">http://www.phocean.net/?p=85</guid>
		<description><![CDATA[I finally encrypted some partitions of my hard drive.

An external hard drive that I just bought (320 Gb) that allowed me to back up my entire /home partition and consider encrypting it.]]></description>
				<content:encoded><![CDATA[<p>I finally encrypted some partitions of my hard drive.</p>
<p>An external hard drive that I just bought (320 Gb) that allowed me to back up my entire /home partition and consider encrypting it.</p>
<p>I mainly used <a title="Encryption on Ubuntu" href="http://johnleach.co.uk/words/archives/2006/12/06/245/" target="_blank">this tutorial</a>, but I derived a little from it about the unlocking system : I did not want to input a password while the machine boots, I wanted it to be transparent while I log in. This <a title="dmcrypt" href="http://dev.riseup.net/grimoire/storage/encryption/dmcrypt/" target="_blank">how to</a> provides more complete information, if needed.</p>
<p>So I will summarize here the actions to get an encrypted volume.</p>
<p><strong>The tools</strong></p>
<p><a title="dmcrypt" href="http://www.saout.de/misc/dm-crypt/" target="_blank">dmcrypt</a> is a device mapper supported by the 2.6 Linux kernel. Roughly, this is an abstraction layer between the kernel and the real file system, doing all encrypting / decrypt operations. It is a replacement of <a title="cryptoloop" href="http://tldp.org/HOWTO/Cryptoloop-HOWTO/index.html">cryptoloop</a>, which created a loop device in a file within the file system. It can&#8217;t encrypt a whole partition and can be considered now as less reliable and secured.</p>
<p>The encryption is based on <a title="LUKS" href="http://luks.endorphin.org/" target="_blank">LUKS</a> is a userland tool aiming to simplify the set-up of dm-crypt. It also stores some set-up information related to the encryption in the partition header, to make easy the transportation of the data from a machine to another, changing the passphrase without having to re-encode the entire partition, and even support having multi passphrases for the same device.</p>
<p><strong>What to encrypt and why ? </strong></p>
<p>The first thing is to decide what you will encrypt and how. Of course, I consider that your drive is rightly partitioned with, at least, the /, /home and swap having each a separated partition.</p>
<p>It is the case on my laptop. I chose to encrypt both the /home and the swap partitions.</p>
<p>In my case, there were little interest in encrypting the / partition. It contains only configuration files (without any password hardcoded), the /temp and applications &#8211; nothing to keep secret. But of course it might be different for you, depending on the security level you are looking for.</p>
<p>To the contrary, the /home partitions contains a lot of private data that I wouldn&#8217;t like anyone access in any case.</p>
<p>Then, it is rather important to encrypt the swap, because it is roughly a partial of you RAM and therefore contains all kind of information from your opened session. The annoying thing is that hibernation (suspend to disk) will not work anymore. It is anyway worth to be done, as it is well explained by <a title="Why encrypting the swap" href="http://theworldofapenguin.blogspot.com/2006_12_01_archive.html" target="_blank">this blogger</a>.</p>
<p><strong>Preparing the software</strong></p>
<p>Using Debian Etch or Ubundu Festy/Gutsy, it is easy though the provided kernel (2.6) already supports device mapper, crypt target and AES cipher algorithm as modules :</p>
<pre>$ apt-get install dmsetup cryptsetup libpam-mount</pre>
<p><strong>Encrypting swap</strong></p>
<p><em><strong>UPDATE 2008/04/13 : it is now possible to encrypt the swap in <a title="Encrypting Swap and Suspend to disk" href="http://feeding.cloud.geek.nz/2008/03/encrypted-swap-partition-on.html" target="_blank">a way that preserve suspend-to-disk</a>.</strong></em></p>
<p>It is a good test to start with the swap, as there is no risk that you loose some valuable data.</p>
<p>First, let&#8217;s deactivate the current swap before any operation :</p>
<pre>$ swapoff /dev/hda2</pre>
<p>We suppose that hda2 is your swap partition :</p>
<pre>$ cryptsetup luksFormat -c aes-cbc-essiv:sha256 /dev/hda2</pre>
<p>add this line to the /etc/crypttab file :</p>
<pre>swap    /dev/hda2       /dev/urandom     swap</pre>
<p>It means that we are going to create a mapper named swap for the <strong>/dev/hda2</strong> device. It will use a random key as a passphrase for the encryption.</p>
<p>There is a choice to do between <strong>/dev/random</strong> and <strong>/dev/urandom</strong>. The latter is in theory a little bit less secure (the randomizing is inferior to the /dev/random, as it reuses the internal pool data for the generation), but it is preferable if you don&#8217;t want to be blocked at boot time, while the kernel is trying to get more entropy (you can shorten this by pressing some keys, though).</p>
<p>Now starts this script :</p>
<pre>$ /etc/init.d/cryptdisks start</pre>
<p>It will create a mapper named <strong>swap</strong> to the <strong>/dev/hda2</strong> partition, as set in the <strong>crypttab</strong> file.<br />
This is equivalent to this command :</p>
<pre>$ cryptsetup -y create swap /dev/hda2</pre>
<p>Now, we need to create the file system :</p>
<pre>$ mkswap /dev/mapper/swap</pre>
<p>Now we need to update the /etc/fstab file, commenting the old entry for hda2 and adding a new one for the mapped device :</p>
<pre>/dev/hda2       none            swap    sw              0       0
/dev/mapper/swap        none    swap    sw      0       0</pre>
<p>Now you are ready to test ! Just reboot, and without any user interaction, you should get an encrypted swap with a randomized key.</p>
<p><strong>Encrypting /home</strong></p>
<p>Now let&#8217;s encrypt the /home. Before doing anything, <strong>be SURE that you made a BACK UP of ALL your data</strong>. <strong>The entire /home will be ERASED !</strong></p>
<p>We consider that <strong>hda3</strong> is the /home partition :</p>
<pre>$ cryptsetup luksFormat -c aes-cbc-essiv:sha256 /dev/had
$ cryptsetup -y create home /dev/hda
$ mkfs.ext3 /dev/mapper/home</pre>
<p>We won&#8217;t use neither the <strong>crypttab</strong> file or the <strong>fstab</strong> one, because we don&#8217;t want to be prompted at boot time for a password. And of course we can&#8217;t afford to crypt our data with a randomized key, changing at every boot !</p>
<p>What we want is the encryption to be done at log-in time, without prompting the user for another passphrase. Don&#8217;t we have enough passwords to memorize to add one more !?</p>
<p>We are going to use <strong>PAM,</strong> the Linux authentication mechanism, with its <strong>libpam-mount</strong> module. It is designed to mount some devices while the user log in, exactly what we need ! The user Linux password will be used as the encryption passphrase.</p>
<p>Of course, the security level will depend on your user password &#8211; take a good care on its length and complexity (though it must be already the case, encryption or not). A good compromise is probably an 8 digits password. Of course, if you are looking for the top level security, prefer the boot time passphrase prompting method&#8230;</p>
<p>To activate it, create or edit the <strong>/etc/security/pam-mount.conf.xml</strong> file and add this line :</p>
<pre><code>&lt;volume user="user" fstype="crypt" path="/dev/mapper/home" mountpoint="/home" options="fsck,relatime" /&gt;</code></pre>
<p>Also add this at the end of the <strong>/etc/pam.d/common-auth</strong> file :</p>
<pre># cryptsetup
auth    optional        pam_mount.so use_first_pass</pre>
<p>That&#8217;s done ! Testing is easy : log off, log in and check that your /home partition is well monted. It should not been mounted or readable for other users, including root.</p>
<p><strong>Encrypting a removable device</strong></p>
<p>We assume that you have a usb key (once again BACK UP your data) inserted, corresponding to the <strong>/dev/sda</strong> device :</p>
<pre>$ cryptsetup luksFormat -c aes-cbc-essiv:sha256 /dev/sda1</pre>
<p>We open manually the luks partition :</p>
<pre>$ cryptsetup luksOpen /dev/sda1 usbkey</pre>
<p>We format it with the filesystem of your choice (here ext3) :</p>
<pre>$ mkfs.ext3 /dev/mapper/usbkey</pre>
<p>We close the partition :</p>
<pre>$ cryptsetup luksClose usbkey</pre>
<p>Now every time you insert the key, you will be prompted for the password (at least by Gnome through the keyring manager box, though I haven&#8217;t tested yet with a different window manager).</p>
<p><strong>Conclusion</strong></p>
<p>This was a much easier experience than I previously thought. Much work has been made to hide the complex layers behind that, and it now takes only a few steps to get a pretty well secured hard drive.</p>
<p>However I think it really must become more user-friendly for the masses. Most of people will still be scared to open a terminal and type the commands above, so I am looking forward to seeing some graphical front-end to manage all that. Sure there are coming, and if you already know some project, please let me know.</p>
<p>About performance, if encryption must have a resource cost, I could not notice any slow down on a pretty modest hardware (celeron M 1,5 Ghz).</p>
]]></content:encoded>
			<wfw:commentRss>/2007/11/18/disk-encryption-on-linux.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Measure the access time of your Hard Disk&#8230;</title>
		<link>/2007/05/17/measure-the-access-time-of-your-hard-disk.html</link>
		<pubDate>Thu, 17 May 2007 18:32:00 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Hard drive]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://192.168.1.10/wordpress/?p=31</guid>
		<description><![CDATA[<p><a hreflang="en" href="http://blog.wompom.org/index.php/2007/05/17/timing-random-disk-seeks/">There is a nice script to measure the access time of your disk</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><a hreflang="en" href="http://blog.wompom.org/index.php/2007/05/17/timing-random-disk-seeks/">There is a nice script to measure the access time of your disk</a>.</p>
<p><span id="more-31"></span><br />
Just copy the lines from the link in your terminal (you are supposed to run Perl and don&#8217;t forget, as I did first, to adjust the path to your disk ;) ) :</p>
<h3>Laptop with Hitachi 100 Mb, 7200 rpm (OpenSuse 10.2) :</h3>
<p>Took 24.57s for 1500 seeks of /dev/hda (93 GB)<br />
Mean: 16.4ms; Median: 14-15ms; Std dev: 10.6ms</p>
<p>real    0m27.479s<br />
user    0m0.120s<br />
sys     0m0.050s</p>
<h3>Server with Hitachi 80 Gb and 120 Gb, 7200 rpm, 8 Mb of cache (Debian 4.0) :</h3>
<p>Took 20.15s for 1500 seeks of /dev/hda (76 GB)<br />
Mean: 13.4ms; Median: 12-13ms; Std dev: 5.64ms</p>
<p>real    0m20.184s<br />
user    0m0.040s<br />
sys     0m0.092s</p>
<p>Took 19.5s for 1500 seeks of /dev/hdb (115 GB)</p>
<p>Mean: 13ms; Median: 11-12ms; Std dev: 3.77ms</p>
<p>real    0m19.534s<br />
user    0m0.044s<br />
sys     0m0.076s</p>
<p>Conclusion : I am pretty satisfied by the performances of my laptop disk.</p>
<p>Thanks to the author for this nice script.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Final upgrade of my laptop</title>
		<link>/2006/12/29/final-upgrade-of-my-laptop.html</link>
		<pubDate>Fri, 29 Dec 2006 20:47:00 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Hard drive]]></category>
		<category><![CDATA[Laptop]]></category>

		<guid isPermaLink="false">http://192.168.1.10/wordpress/?p=15</guid>
		<description><![CDATA[For Christmas, I got a new hard drive for my laptop. As all accessories for laptops, it is rather expensive. But still less expensive and extravagant than buying a new computer when you don't really need a big CPU power. My goal was not having a huge capacity, but rather speed and reliability.]]></description>
				<content:encoded><![CDATA[<p>For Christmas, I got a new hard drive for my laptop. As all accessories for laptops, it is rather expensive. But still less expensive and extravagant than buying a new computer when you don&#8217;t really need a big CPU power. My goal was not having a huge capacity, but rather speed and reliability.<br />
<span id="more-15"></span><br />
Talking about speed, anyone who has a 5200 rpm or inferior disk will see what I mean. It is truly unstandable every time you boot, start an program or, the worst, swap.</p>
<p>Mine was a terrible 4200 rpm Hitachi disk (<span class="boldtitle">Travelstar 4K120)</span>. Just terrible. My old desktop was often faster just thanks to its 7200 rpm disks.</p>
<p>Morever, I was not trustful anymore in its reliability. It produces an infamous click noise every time the head moves. Infamous, because there are many posts about that on many forums, concerning any laptop brand. It is not the kind of click when a disk dies, as it always did it. I have no evidence of that, but I am pretty sure it is the same model in all cases. It must be a common disk on cheap laptops. Anyway, for me no trick worked to kill this noise : on forums, laptop-mode tool was sometimes accused, and other times the ACPI setting of hdparm.</p>
<p>I looked for a Hitachi Travelstar 7K100 &#8211; 100 (~ 130 €). Why this brand ? I am used to it, I have been always buying this brand since they took over IBM and was never disapointed by their speed, their silence and their reliability.</p>
<p><img src="/wp-content/uploads/2007/05/public/PC250054.JPG" alt="" width="300" height="331" align="absmiddle" /></p>
<p>Its main features are the 7200 rpm, a cache of 8 Mb, 10 ms access time and a maximum power consumption of 5,5 W (2 W for reading/writing and 0.5 W idle).</p>
<p>After having used it several days now, I have to say that I am extrimely satisfied.<br />
It is not noisy at all despite its 7200 rpm. It is actually more silent than the 4200 and, very important, the click noise definitely dispeared !!!<br />
About speed, the difference is big too. I don&#8217;t want to do a full benchmark here, but every program launches faster and all the system runs smoothly.<br />
As an exemple, my Ubuntu starts in less than 30 s where it took 50 s before (from the BIOS to a fully operational Gnome).<br />
One point I was worried about was its power consumption and its impact on the autonomy of the laptop. Normaly, a 7200 rpm needs more power than a 4200 one. I have been totally relieved now since I don&#8217;t see any change.<br />
I was not expecting the last point : temperature. The 4K120 was rather hot : 42°C on normal charge, 50°C on full charge. The 7K100 impresses me : 33°C on normal charge, 39°C on full charge ! As good as the desktop models ! It is not only safer for the data, but it benefits to the whole laptop.</p>
<p>Finally, I recycled the old disk in a USB box. This one, Advance BX-2520, is very cheap (~ 12 €), small and does what it is done for very well. <img src="/wp-content/uploads/2007/05/public/21317.js" /></p>
<p>To transfer the data, I first set up the new disk in the Advance usb box.<br />
I copied the first partition (<strong>sda1</strong> is mounted as <strong>/</strong>) :</p>
<pre lang="bash">$ sudo dd if=/dev/hda1 of=/dev/sda1</pre>
<p>Then I resized sda1 to fit my new needs, made up the swap partition and the /home one with Gparted.<br />
I just transfered my <strong>/home</strong> with a simple <strong>cp</strong>.<br />
The issue I had was concerning the new way that Ubuntu Edgy addresses partitions (<strong>UUID</strong> instead of <strong>/dev/hdx</strong>) :</p>
<pre lang="bash">$ sudo vol_id -u /dev/hda2</pre>
<p>or</p>
<pre lang="bash">ls -la /dev/disk/by-uuid/</pre>
<p>The output looks like it :</p>
<pre lang="text">087b3a57-6703-42eb-99d3-278d01618336</pre>
<p>It gives you, for instance, the UUID of the swap partition.<br />
I updated my <strong>fstab</strong> :</p>
<pre lang="text">UUID=087b3a57-6703-42eb-99d3-278d01618336  none            swap    sw              0       0</pre>
<p>Repeat this for all the partitions.<br />
Concerning the swap, to keep the hibernation working, you have to edit <strong>/etc/initramfs-tools/conf.d/resume</strong>.<br />
The line it contains must be :</p>
<pre lang="text">RESUME=UUID=087b3a57-6703-42eb-99d3-278d01618336</pre>
<p>Finally, to generate a new <span>initramfs</span> image, do :</p>
<pre lang="bash">$  sudo update-initramfs -u -k $(uname -r)</pre>
]]></content:encoded>
			</item>
		<item>
		<title>Back-up your disk with DD</title>
		<link>/2006/12/04/back-up-your-disk-with-dd.html</link>
		<pubDate>Mon, 04 Dec 2006 15:32:00 +0000</pubDate>
		<dc:creator><![CDATA[phocean]]></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Hard drive]]></category>

		<guid isPermaLink="false">http://192.168.1.10/wordpress/?p=8</guid>
		<description><![CDATA[<p>I had several bad experiences losing my data in my life. Sometimes because of the hardware, sometimes because of my stupidness or inexperience. At least, it learned to be careful. I backup my data regularly, and on several support concerning the important ones.</p>]]></description>
				<content:encoded><![CDATA[<p>I had several bad experiences losing my data in my life. Sometimes because of the hardware, sometimes because of my stupidness or inexperience. At least, it learned to be careful. I backup my data regularly, and on several support concerning the important ones.</p>
<p><span id="more-8"></span></p>
<p>I sometimes back up my primary partition, where the system is set. If my drive crashed, I want to recover quickly a system without having to reinstall hundreds of applications. I have used several times Partimage and was satisfied. But now I tend to use dd, which basically do the same thing in just one line. The advantage is that it is by default on any Linux distribution.</p>
<p>To back it up on an usb disk :</p>
<pre>$ sudo dd   if=/dev/hda1   |   gzip   -v   |   dd   of=/media/usbdisk/backup_hda1.gz</pre>
<p>To backup my home and other data partitions, I just copy the files manually, it is faster and there is no need to backup such a thing as the boot sector. But of course you could use the same command above.</p>
<p>When you wish to restore the partition to a new hard drive, just :</p>
<pre>$ zcat   /mnt/hdb5/sauvegarde.gz   |   dd   of=/dev/hda1</pre>
<p>To do that, you will have probably booted on a live CD Linux as Knoppix to restore the crashed system. In any case, don&#8217;t overwrite the system you just booted on !</p>
<p>One tip if you want to back up only the boot sector :</p>
<pre>$ sudo dd   if=/dev/hda   of=/home/secteur_boot.dd   bs=512   count=1</pre>
<p>And to restore :</p>
<pre>$ sudo dd   if=/home/secteur_boot.dd   of=/dev/hda   bs=512   count=1</pre>
]]></content:encoded>
			</item>
	</channel>
</rss>
