<?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>Jontas &#187; linux</title>
	<atom:link href="http://www.f15ijp.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.f15ijp.com</link>
	<description>My digital notepad (notes etc)</description>
	<lastBuildDate>Wed, 28 Dec 2011 18:24:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Add a user to a group</title>
		<link>http://www.f15ijp.com/2010/12/03/add-a-user-to-a-group/</link>
		<comments>http://www.f15ijp.com/2010/12/03/add-a-user-to-a-group/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 10:14:33 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[BSD]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[bsd]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://www.f15ijp.com/?p=745</guid>
		<description><![CDATA[To add a existing user to a group usermod -a -G thegroup theuser To add a user to a group when the user is created useradd -G thegroup theuser]]></description>
			<content:encoded><![CDATA[<p>To add a existing user to a group</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">usermod <span style="color: #660033;">-a</span> <span style="color: #660033;">-G</span> thegroup theuser</pre></div></div>

<p>To add a user to a group when the user is created</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">useradd <span style="color: #660033;">-G</span> thegroup theuser</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/12/03/add-a-user-to-a-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Finding the serial number of a hard drive</title>
		<link>http://www.f15ijp.com/2010/07/23/linux-finding-the-serial-number-of-a-hard-driv/</link>
		<comments>http://www.f15ijp.com/2010/07/23/linux-finding-the-serial-number-of-a-hard-driv/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 20:33:22 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[hd]]></category>
		<category><![CDATA[hdparm]]></category>
		<category><![CDATA[sd]]></category>

		<guid isPermaLink="false">http://www.f15ijp.com/?p=557</guid>
		<description><![CDATA[Finding the serial number of a hard drive on a Linux console (as root) is simple with the right tool. The right tool in this case is hdparm (using the -i option). -i will query the device directly for the details. Example: themachine:/proc# hdparm -i /dev/sda &#160; /dev/sda: &#160; Model=ST31500341AS , FwRev=CC1H , SerialNo= 9VS21ZXM [...]]]></description>
			<content:encoded><![CDATA[<p>Finding the serial number of a hard drive on a Linux console (as root) is simple with the right tool.<br />
The right tool in this case is hdparm (using the -i option).<br />
-i will query the device directly for the details.</p>
<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">themachine:<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #666666; font-style: italic;"># hdparm -i /dev/sda</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda:
&nbsp;
 <span style="color: #007800;">Model</span>=ST31500341AS                            , <span style="color: #007800;">FwRev</span>=CC1H    , <span style="color: #007800;">SerialNo</span>=            9VS21ZXM
 <span style="color: #007800;">Config</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span> HardSect NotMFM HdSw<span style="color: #000000; font-weight: bold;">&gt;</span>15uSec Fixed DTR<span style="color: #000000; font-weight: bold;">&gt;</span>10Mbs RotSpdTol<span style="color: #000000; font-weight: bold;">&gt;</span>.5<span style="color: #000000; font-weight: bold;">%</span> <span style="color: #7a0874; font-weight: bold;">&#125;</span>
 <span style="color: #007800;">RawCHS</span>=<span style="color: #000000;">16383</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">63</span>, <span style="color: #007800;">TrkSize</span>=<span style="color: #000000;">0</span>, <span style="color: #007800;">SectSize</span>=<span style="color: #000000;">0</span>, <span style="color: #007800;">ECCbytes</span>=<span style="color: #000000;">4</span>
 <span style="color: #007800;">BuffType</span>=unknown, <span style="color: #007800;">BuffSize</span>=0kB, <span style="color: #007800;">MaxMultSect</span>=<span style="color: #000000;">16</span>, <span style="color: #007800;">MultSect</span>=?<span style="color: #000000;">16</span>?
 <span style="color: #007800;">CurCHS</span>=<span style="color: #000000;">16383</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">16</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">63</span>, <span style="color: #007800;">CurSects</span>=<span style="color: #000000;">16514064</span>, <span style="color: #007800;">LBA</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span>, <span style="color: #007800;">LBAsects</span>=<span style="color: #000000;">18446744072344861488</span>
 <span style="color: #007800;">IORDY</span>=on<span style="color: #000000; font-weight: bold;">/</span>off, <span style="color: #007800;">tPIO</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span>min:<span style="color: #000000;">120</span>,w<span style="color: #000000; font-weight: bold;">/</span>IORDY:<span style="color: #000000;">120</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>, <span style="color: #007800;">tDMA</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span>min:<span style="color: #000000;">120</span>,rec:<span style="color: #000000;">120</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 <span style="color: #000000; font-weight: bold;">*</span>udma6 
 <span style="color: #007800;">AdvancedPM</span>=no <span style="color: #007800;">WriteCache</span>=enabled
 Drive conforms to: unknown:  ATA<span style="color: #000000; font-weight: bold;">/</span>ATAPI-<span style="color: #000000;">4</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">6</span>,<span style="color: #000000;">7</span>
&nbsp;
 <span style="color: #000000; font-weight: bold;">*</span> signifies the current active mode</pre></div></div>

<p>Using the option -I instead gives even more information:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">themachine:<span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #666666; font-style: italic;"># hdparm -I /dev/sda</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda:
&nbsp;
ATA device, with non-removable media
        Model Number:       ST31500341AS                            
        Serial Number:      9VS21ZXM
        Firmware Revision:  CC1H    
        Transport:          Serial
Standards:
        Used: unknown <span style="color: #7a0874; font-weight: bold;">&#40;</span>minor revision code 0x0029<span style="color: #7a0874; font-weight: bold;">&#41;</span> 
        Supported: <span style="color: #000000;">8</span> <span style="color: #000000;">7</span> <span style="color: #000000;">6</span> <span style="color: #000000;">5</span> 
        Likely used: <span style="color: #000000;">8</span>
Configuration:
        Logical         max     current
        cylinders       <span style="color: #000000;">16383</span>   <span style="color: #000000;">16383</span>
        heads           <span style="color: #000000;">16</span>      <span style="color: #000000;">16</span>
        sectors<span style="color: #000000; font-weight: bold;">/</span>track   <span style="color: #000000;">63</span>      <span style="color: #000000;">63</span>
        <span style="color: #660033;">--</span>
        CHS current addressable sectors:   <span style="color: #000000;">16514064</span>
        LBA    user addressable sectors:  <span style="color: #000000;">268435455</span>
        LBA48  user addressable sectors: <span style="color: #000000;">2930277168</span>
        device <span style="color: #c20cb9; font-weight: bold;">size</span> with M = <span style="color: #000000;">1024</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">1024</span>:     <span style="color: #000000;">1430799</span> MBytes
        device <span style="color: #c20cb9; font-weight: bold;">size</span> with M = <span style="color: #000000;">1000</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #000000;">1000</span>:     <span style="color: #000000;">1500301</span> MBytes <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1500</span> GB<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Capabilities:
        LBA, IORDY<span style="color: #7a0874; font-weight: bold;">&#40;</span>can be disabled<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        Queue depth: <span style="color: #000000;">32</span>
        Standby timer values: spec<span style="color: #ff0000;">'d by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = ?
        Recommended acoustic management value: 254, current value: 0
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
             Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4 
             Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
           *    SMART feature set
                Security Mode feature set
           *    Power Management feature set
           *    Write cache
           *    Look-ahead
           *    Host Protected Area feature set
           *    WRITE_BUFFER command
           *    READ_BUFFER command
           *    DOWNLOAD_MICROCODE
                SET_MAX security extension
           *    Automatic Acoustic Management feature set
           *    48-bit Address feature set
           *    Device Configuration Overlay feature set
           *    Mandatory FLUSH_CACHE
           *    FLUSH_CACHE_EXT
           *    SMART error logging
           *    SMART self-test
           *    General Purpose Logging feature set
           *    WRITE_{DMA|MULTIPLE}_FUA_EXT
           *    64-bit World wide name
                Write-Read-Verify feature set
           *    WRITE_UNCORRECTABLE_EXT command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
           *    SATA-I signaling speed (1.5Gb/s)
           *    SATA-II signaling speed (3.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Phy event counters
                Device-initiated interface power management
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Long Sector Access (AC1)
           *    SCT LBA Segment Access (AC2)
           *    SCT Error Recovery Control (AC3)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
                unknown 206[12] (vendor specific)
Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        240min for SECURITY ERASE UNIT. 240min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000c50014ec1f60
        NAA             : 5
        IEEE OUI        : c50
        Unique ID       : 014ec1f60
Checksum: correct</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/07/23/linux-finding-the-serial-number-of-a-hard-driv/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>sudo: unable to resolve host hostname</title>
		<link>http://www.f15ijp.com/2010/01/21/sudo-unable-to-resolve-host-hostname/</link>
		<comments>http://www.f15ijp.com/2010/01/21/sudo-unable-to-resolve-host-hostname/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 13:38:15 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[/etc/hostname]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=193</guid>
		<description><![CDATA[If using sudo gives the error message &#8220;unable to resolve host hostname&#8221; then one solution is to add the hostname in /etc/hosts 127.0.0.1 hostname.domain.com hostname localhost]]></description>
			<content:encoded><![CDATA[<p>If using sudo gives the error message &#8220;unable to resolve host hostname&#8221; then one solution is to add the hostname in /etc/hosts</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">127.0.0.1	hostname.domain.com	<span style="color: #c20cb9; font-weight: bold;">hostname</span> localhost</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/01/21/sudo-unable-to-resolve-host-hostname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forcing a fsck at next reboot</title>
		<link>http://www.f15ijp.com/2010/01/16/forcing-a-fsck-at-next-reboot/</link>
		<comments>http://www.f15ijp.com/2010/01/16/forcing-a-fsck-at-next-reboot/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 11:33:36 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[e2fsck]]></category>
		<category><![CDATA[fsck]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=155</guid>
		<description><![CDATA[Sometimes you wish to make fsck run at the next time (after the computer is powered up/rebooted). This can be achieved by Passing F to shutdown By passing the option &#8220;F&#8221; to shutdown it will force a file system check at the next boot up. shutdown -rF now By creating a /forcefsck file If the [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you wish to make fsck run at the next time (after the computer is powered up/rebooted).<br />
This can be achieved by</p>
<h3>Passing F to shutdown</h3>
<p>By passing the option &#8220;F&#8221; to shutdown it will force a file system check at the next boot up.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">shutdown <span style="color: #660033;">-rF</span> now</pre></div></div>

<h3>By creating a /forcefsck file</h3>
<p>If the file &#8220;/forcefsck&#8221; exists then a fsck is forced at boot up.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>forcefsck</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/01/16/forcing-a-fsck-at-next-reboot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turning off auto fsck at boot time</title>
		<link>http://www.f15ijp.com/2010/01/16/turning-off-auto-fsck-at-boot-time/</link>
		<comments>http://www.f15ijp.com/2010/01/16/turning-off-auto-fsck-at-boot-time/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 11:23:43 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[fsck]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=150</guid>
		<description><![CDATA[A Linux machine will auto check the file system if the last shutdown was unclean (the system was powered off before the file system was unmounted) or if it has passed to much time since the last check. This can be turned off in a few ways, here are some. [never check] From /etc/fstab If [...]]]></description>
			<content:encoded><![CDATA[<p>A Linux machine will auto check the file system if the last shutdown was unclean (the system was powered off before the file system was unmounted) or if it has passed to much time since the last check.</p>
<p>This can be turned off in a few ways, here are some.</p>
<h3>[never check] From /etc/fstab</h3>
<p>If the sixth option is not 0 (or missing) then fsck will do automatic checking, so change the sixth option to a 0.<br />
As root edit the /etc/fstab (use your favorite text editor or vi).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sda1		<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>files			ext3	defaults	<span style="color: #000000;">0</span> <span style="color: #000000;">0</span></pre></div></div>

<h3>[never check] By passing arguments via GRUB</h3>
<p>It is possible to pass the option fastboot to the kernel at boot time, this will also prevent fsck from running at boot time.<br />
Edit /boot/grub/menu.lst (use your favorite text editor or vi) [might also be called /etc/grub.conf]<br />
So an example of this would look like</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">title           Debian GNU<span style="color: #000000; font-weight: bold;">/</span>Linux, kernel 2.6.26-<span style="color: #000000;">1</span>-<span style="color: #000000;">686</span>
root            <span style="color: #7a0874; font-weight: bold;">&#40;</span>hd0,<span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
kernel          <span style="color: #000000; font-weight: bold;">/</span>vmlinuz-2.6.26-<span style="color: #000000;">1</span>-<span style="color: #000000;">686</span> <span style="color: #007800;">root</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>mapper<span style="color: #000000; font-weight: bold;">/</span>root-root--volume ro fastboot
initrd          <span style="color: #000000; font-weight: bold;">/</span>initrd.img-2.6.26-<span style="color: #000000;">1</span>-<span style="color: #000000;">686</span></pre></div></div>

<h3>[only skip once] By passing options to shutdown</h3>
<p>If you only wish to bypass the automatic testing of the file system once, but keep the automatic settings saved you can use the shutdown command with the option &#8220;f&#8221;.<br />
For instance to reboot without checking</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">shutdown <span style="color: #660033;">-rf</span> now</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/01/16/turning-off-auto-fsck-at-boot-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

