ubuntu https://www.gremwell.com/ en Ubuntu 11 on Kingston SV100S2/256G SSD https://www.gremwell.com/node/396 <span>Ubuntu 11 on Kingston SV100S2/256G SSD</span> <div><p>Here are some notes about my attempt to install Ubuntu 11 on Kingston SV100S2/256G SSD (on Dell Latitude E6510 laptop). Just in case somebody else finds it useful.</p> <p>I have Googled around for information about SSD disk optimization for Linux and found that there are two main things to consider: partition alignment and filesystem options.</p> <p>It appears to be important to (try to) align disk writes by the boundaries of SDD erase block size. This [1] article talks about LVM volumes alignment.</p> <p>Most tutorials out there seems to blindly assume SSD erase block size is 128KB, unclear on what ground. This post [3] suggest the kind of disk I have features 1MB erase block size. I decided to take use this value.</p> <p>Finally, I have ended up with the following partition layout, with alignment by 1MB:<br /><code><br /> $ sudo fdisk -S 64 -H 32 /dev/sdb<br /> ...<br /> Command (m for help): p</code></p> <p>Disk /dev/sdb: 256.1 GB, 256060514304 bytes<br /> 32 heads, 63 sectors/track, 248074 cylinders<br /> Units = cylinders of 2016 * 512 = 1032192 bytes<br /> Sector size (logical/physical): 512 bytes / 512 bytes<br /> I/O size (minimum/optimal): 512 bytes / 512 bytes<br /> Disk identifier: 0xfeb3c9c1</p> <p> Device Boot Start End Blocks Id System<br /> /dev/sdb1 1 103 103792+ 83 Linux<br /> /dev/sdb2 104 248074 249954768 8e Linux LVM<br /></p> <p>Creating LVM physical volume, with its meta-data size set to align start offset of its extents to with 1MB boundary.<br /><code><br /> $ sudo pvcreate --metadatasize 994k /dev/sdb2<br /> Physical volume "/dev/sdb2" successfully created<br /> $ sudo pvs /dev/sdb2 -o+pe_start<br /> PV VG Fmt Attr PSize PFree 1st PE<br /> /dev/sdb2 lvm2 -- 238.38g 238.38g 1.00m<br /></code></p> <p>Create physical volume group and logical volume.<br /><code><br /> $ sudo vgcreate e6510-ssd1 /dev/sdb2<br /> Volume group "e6510-ssd1" successfully created<br /> $ sudo lvcreate --size 32G --name root e6510-ssd1<br /> Logical volume "root" created<br /></code></p> <p>Finally, create a file system, with stripe width set to 1MB (256 x 4K blocks). "Resize" parameter limits the maximum size your filesystem can grow live, it is optional parameter, just saves a few megabytes.<br /><code><br /> $ sudo mke2fs -t ext4 -E stripe-width=256,resize=250G /dev/e6510-ssd1/root<br /></code></p> <p>To make use the instructions above, you will need to use alternative installer CD which lets you interfere with partitioning/filesystem creation process.</p> <p>References:<br /> [1] <a href="http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/">http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-…</a> (also available at <a href="http://web.archive.org/web/20101130200444/http://thunk.org/tytso/blog/2009/02/20/aligning-filesystems-to-an-ssds-erase-block-size/">http://web.archive.org/web/20101130200444/http://thunk.org/tytso/blog/2…</a>)<br /> [2] <a href="http://williamscott.me/blog/2010/12/ssd-tweaks-linux-align-partitions/">http://williamscott.me/blog/2010/12/ssd-tweaks-linux-align-partitions/</a><br /> [3] <a href="http://forum.notebookreview.com/notebook-news-reviews/395398-kingston-ssdnow-v-series-notebook-upgrade-kit-review-6.html">http://forum.notebookreview.com/notebook-news-reviews/395398-kingston-s…</a></p> </div> <span><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">abb</span></span> <span>Sat, 10/08/2011 - 13:40</span> Sat, 08 Oct 2011 11:40:17 +0000 abb 396 at https://www.gremwell.com Self-encrypting (FDE) Hard Disks & Linux https://www.gremwell.com/self-encrypting-hard-drives-and-linux <span>Self-encrypting (FDE) Hard Disks &amp; Linux</span> <div><p>Recently I have upgraded to Dell Latitude E6510 with 4 cores / 8 threads processor, plenty of RAM, and a fast hard disk. Nevertheless, the interactive performance of Ubuntu becomes sloppy beyond any measure when a virtual machine or two start trashing the disks.</p> <p>There seems to be known performance problems in Linux kernel, like <a href="https://bugzilla.kernel.org/show_bug.cgi?id=12309">Bug 12309</a>. And full disk encryption makes things even worse. It appears that new FDE technology will give laptop users a chance to move the burden of encryption to hard drives.</p> <p>Some vendors already offer devices doing all the crypto stuff by themselves, on-the-fly, and supposedly with no performance impact whatsoever. I have heard about these drives a while ago, but just now came across this <a href="http://www.seagate.com/staticfiles/support/sedqual/emsMB595_1_0905US_SelfQual.pdf">document</a> from Seagate, which convinced me that their drive are likely to work in my laptop and Linux, or pretty much any laptop/OS with BIOS supporting password-protected hard drives.</p> <p>I have just ordered <a href="http://www.seagate.com/ww/v/index.jsp?locale=en-US&amp;name=st9500421as-momentus-7200-fde-sata-500gb-hd&amp;vgnextoid=ceec1e05175d1210VgnVCM1000001a48090aRCRD&amp;vgnextchannel=a8727f06af9fc110VgnVCM100000f5ee0a0aRCRD&amp;reqPage=Model#tTabContentOverview">ST9500421AS - Momentus 7200 FDE.2 500-GB Hard Drive</a> for a bit over 62 euro before tax, we will see how it works out...</p> </div> <span><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">abb</span></span> <span>Thu, 02/03/2011 - 15:52</span> Thu, 03 Feb 2011 14:52:14 +0000 abb 148 at https://www.gremwell.com Build NetExpect on Ubuntu 10 https://www.gremwell.com/build-netexpect-on-ubuntu <span>Build NetExpect on Ubuntu 10</span> <div><p>I came across a nice tool, potentially useful for pen testing: TCP/IP-aware version of TCL expect. Written by Eloy Paris from Cisco Systems it is currently distributed in sources only. I didn't have much time to play with it yet, but it looks very promising. Tomorrow will try to use it for SIP REGISTER flooding, currently done with <a href="http://sipp.sourceforge.net/">sipp</a>. (In a way, SIPP is similar to NetExpect, can execute send-expect <a href="http://sipp.sourceforge.net/doc3.0/reference.html#Create+your+own+XML+scenarios">scenarios</a>, but seems to be focused on SIP protocol.)</p> <p>A bunch of slides illustrating what NetExpect can do can be found <a href="http://netexpect.org/wiki/Documentation?action=AttachFile&amp;do=get&amp;target=netexpect.pdf">here</a>.</p> <p>On Ubuntu 10 installation goes as following (instructions at <a href="http://netexpect.org/wiki/PortabilityPage">http://netexpect.org/wiki/PortabilityPage</a> are for older versions of Ubuntu):</p> <p><code><br /> sudo apt-get install libglib2.0-dev tcl8.4-dev wireshark-dev libpcap-dev libdumbnet-dev libnet1-dev<br /> sudo mv /usr/include/pcap.h /usr/include/pcap.h-<br /> ./configure --prefix=/usr/local/netexpect-0.18 --with-tcl=/usr/lib/tcl8.4 --with-tcl-includes=/usr/include/tcl8.4<br /> make<br /> sudo mv /usr/include/pcap.h- /usr/include/pcap.h<br /> sudo make install<br /></code></p> <p>The commands above will install the binaries under /usr/local/netexpect-0.18/bin.</p> </div> <span><span lang="" about="/user/1" typeof="schema:Person" property="schema:name" datatype="">abb</span></span> <span>Tue, 10/26/2010 - 21:36</span> Tue, 26 Oct 2010 19:36:31 +0000 abb 65 at https://www.gremwell.com