<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4515537268360732058</id><updated>2024-11-05T21:06:13.964-06:00</updated><category term="Partitions"/><category term="Services"/><category term="e2label"/><category term="fdisk"/><category term="mkfs"/><category term="parted"/><title type='text'>A system admin&#39;s blog</title><subtitle type='html'>My personal reference for routine system admin tasks and also helps for RHCSA and RHCE exams.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-7257154470741251865</id><published>2017-09-18T20:14:00.001-05:00</published><updated>2017-09-26T11:16:27.482-05:00</updated><title type='text'>MABM</title><content type='html'>&lt;span style=&quot;background-color: white; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;BBAlpha Sans&amp;quot;, &amp;quot;S60 Sans&amp;quot;, Arial, sans-serif; font-size: 15px; font-weight: 600;&quot;&gt;Demo: Create MBAM 2.5 users and groups in Active Directory Domain Services&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;BBAlpha Sans&amp;quot;, &amp;quot;S60 Sans&amp;quot;, Arial, sans-serif; font-size: 15px; font-weight: 600;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;span style=&quot;background-color: white; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;BBAlpha Sans&amp;quot;, &amp;quot;S60 Sans&amp;quot;, Arial, sans-serif; font-size: 15px; font-weight: 600;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Configure MBAM 2.5 Roles for the instance of SQL Server&lt;br /&gt;
&lt;iframe src=&quot;//videoplayercdn.osi.office.net/hub/?csid=ux-cms-en-us-msoffice&amp;uuid=00e5c3da-d987-4ff8-bd37-77b35b1dba7e&amp;AutoPlayVideo=true&amp;height=550&amp;width=980&quot; frameborder= &quot;0&quot; marginwidth= &quot;0&quot; marginheight= &quot;0&quot; scrolling= &quot;no&quot; allowfullscreen= &quot;&quot; style=&quot;width: 980px; height: 550px;&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Deploy prerequisites for MBAM 2.5 administration and monitoring server&lt;br /&gt;
&lt;iframe src=&quot;//videoplayercdn.osi.office.net/hub/?csid=ux-cms-en-us-msoffice&amp;uuid=64bfa6f3-79f4-4ec3-8e70-d0dcd99ecba8&amp;AutoPlayVideo=true&amp;height=550&amp;width=980&quot; frameborder= &quot;0&quot; marginwidth= &quot;0&quot; marginheight= &quot;0&quot; scrolling= &quot;no&quot; allowfullscreen= &quot;&quot; style=&quot;width: 980px; height: 550px;&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Create MBAM 2.5 users and groups in Active Directory Domain Services&lt;br /&gt;
&lt;iframe src=&quot;//videoplayercdn.osi.office.net/hub/?csid=ux-cms-en-us-msoffice&amp;uuid=c18978bc-5ed5-41f6-8ed9-51409c9096c2&amp;AutoPlayVideo=true&amp;height=550&amp;width=980&quot; frameborder= &quot;0&quot; marginwidth= &quot;0&quot; marginheight= &quot;0&quot; scrolling= &quot;no&quot; allowfullscreen= &quot;&quot; style=&quot;width: 980px; height: 550px;&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Register SPNS for the application pool account and configure constrained delegation&lt;br /&gt;
&lt;iframe src=&quot;//videoplayercdn.osi.office.net/hub/?csid=ux-cms-en-us-msoffice&amp;uuid=7312729a-1680-42a7-b51d-f4f7bb149cd8&amp;AutoPlayVideo=true&amp;height=550&amp;width=980&quot; frameborder= &quot;0&quot; marginwidth= &quot;0&quot; marginheight= &quot;0&quot; scrolling= &quot;no&quot; allowfullscreen= &quot;&quot; style=&quot;width: 980px; height: 550px;&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Install MBAM 2.5 server software&lt;br /&gt;
&lt;iframe src=&quot;//videoplayercdn.osi.office.net/hub/?csid=ux-cms-en-us-msoffice&amp;uuid=c81a52b8-c7e8-4468-bb3d-cf6b38a09457&amp;AutoPlayVideo=true&amp;height=550&amp;width=980&quot; frameborder= &quot;0&quot; marginwidth= &quot;0&quot; marginheight= &quot;0&quot; scrolling= &quot;no&quot; allowfullscreen= &quot;&quot; style=&quot;width: 980px; height: 550px;&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
 Configure MBAM 2.5 database and reports role&lt;br /&gt;
&lt;br /&gt;
&lt;iframe src=&quot;//videoplayercdn.osi.office.net/hub/?csid=ux-cms-en-us-msoffice&amp;uuid=a62c0a39-a7c1-48f2-b3bb-081b0d0da019&amp;AutoPlayVideo=true&amp;height=550&amp;width=980&quot; frameborder= &quot;0&quot; marginwidth= &quot;0&quot; marginheight= &quot;0&quot; scrolling= &quot;no&quot; allowfullscreen= &quot;&quot; style=&quot;width: 980px; height: 550px;&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Configure MBAM 2.5 Web application role&lt;br /&gt;
&lt;iframe src=&quot;//videoplayercdn.osi.office.net/hub/?csid=ux-cms-en-us-msoffice&amp;uuid=1ba5c547-976d-44b0-b9d4-6739eb27dd60&amp;AutoPlayVideo=true&amp;height=550&amp;width=980&quot; frameborder= &quot;0&quot; marginwidth= &quot;0&quot; marginheight= &quot;0&quot; scrolling= &quot;no&quot; allowfullscreen= &quot;&quot; style=&quot;width: 980px; height: 550px;&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/7257154470741251865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2017/09/mabm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/7257154470741251865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/7257154470741251865'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2017/09/mabm.html' title='MABM'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-3491991630272480848</id><published>2012-01-09T11:13:00.000-06:00</published><updated>2012-01-09T11:45:02.781-06:00</updated><title type='text'>How to Convert VirtualBox to KVM image</title><content type='html'>This task is quite simple.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;First *.vdi hard disk image should be converted to *.raw image&lt;/li&gt;
&lt;li&gt;Then *.raw image need to converted to *.qcow2 image&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;mycode&quot;&gt;[root@virtualhost ~]# VBoxManage clonehd --format RAW image.vdi image.raw&lt;br /&gt;
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%&lt;br /&gt;
Clone hard disk created in format &#39;RAW&#39;. UUID: 5478eb4b-a593-4ef0-b85b-9b3a4a8cc831&lt;br /&gt;
[root@virtualhost ~]# qemu-img convert -f raw -O qcow2 image.raw image.qcow2&lt;/div&gt;Now you can use image.qcow2 with KVM.</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/3491991630272480848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2012/01/how-to-convert-virtualbox-to-kvm-image.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/3491991630272480848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/3491991630272480848'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2012/01/how-to-convert-virtualbox-to-kvm-image.html' title='How to Convert VirtualBox to KVM image'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-4988410403538750099</id><published>2011-08-21T19:40:00.004-05:00</published><updated>2011-08-21T19:46:38.814-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="e2label"/><category scheme="http://www.blogger.com/atom/ns#" term="mkfs"/><title type='text'>Formatting and Labeling a Partition mkfs and e2label</title><content type='html'>Once you have done with partitioning, you need to format the partition for use,. Unless it is a raw partition. The partition still does not have a file system. Create the file system &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;mkfs&lt;/b&gt;&lt;/span&gt; command can be utilized&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;
[root@RHEL01i ~]# mkfs -t ext3 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
262944 inodes, 1050241 blocks
52512 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1077936128
33 block groups
32768 blocks per group, 32768 fragments per group
7968 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@RHEL01i ~]# 
&lt;/div&gt;

If the file system on the new partition is /dev/sda6 and you want to label it /work, use:
&lt;div class=&quot;mycode&quot;&gt;
e2label /dev/sda6 /work
&lt;/div&gt;
By default, the installation program uses the mount point of the partition as the label to make sure the label is unique. You can use any label you want. Afterwards, create a mount point (e.g. /work) as root.

Add to /etc/fstab&lt;br /&gt;
As root, edit the /etc/fstab file to include the new partition using the partition&#39;s UUID. Use the blkid -L label command to retrieve the partition&#39;s UUID. The new line should look similar to the following:
&lt;div class=&quot;mycode&quot;&gt;
UUID=93a0429d-0318-45c0-8320-9676ebf1ca79     /work    ext3    defaults    1 2
&lt;/div&gt;
The first column should contain UUID= followed by the file system&#39;s UUID. The second column should contain the mount point for the new partition, and the next column should be the file system type (for example, ext3 or swap). If you need more information about the format, read the man page with the command man fstab.&lt;br /&gt;
&lt;br /&gt;
If the fourth column is the word defaults, the partition is mounted at boot
time. To mount the partition without rebooting, as root, type the command:
&lt;div class=&quot;mycode&quot;&gt;
mount /work
&lt;/div&gt;


</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/4988410403538750099/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/formatting-and-labeling-partition.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/4988410403538750099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/4988410403538750099'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/formatting-and-labeling-partition.html' title='Formatting and Labeling a Partition &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mkfs&lt;/span&gt; and &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;e2label&lt;/span&gt;'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-1348965093102192638</id><published>2011-08-19T17:46:00.019-05:00</published><updated>2011-08-21T19:40:35.595-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="parted"/><category scheme="http://www.blogger.com/atom/ns#" term="Partitions"/><title type='text'>How to partition a hard disk using parted</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;parted&lt;/span&gt; &lt;/span&gt;command is used for&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;View the existing partition table&lt;/li&gt;
&lt;li&gt;Change the size of existing partitions&lt;/li&gt;
&lt;li&gt;Add partitions from free space or additional hard drives&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Listing Details of the Hard Disks &lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;
[root@RHEL01 ~]# parted -l

Model: SMC Array 0 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      32.3kB  526MB   526MB   primary   ext3         boot 
 2      526MB   105GB   105GB   primary   ext3              
 3      105GB   158GB   52.4GB  primary   linux-swap        
 4      158GB   1000GB  842GB   extended                    
 5      158GB   210GB   52.4GB  logical   ext3              
 6      210GB   1000GB  789GB   logical   ext3              


Model: SMC Array1 (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      32.3kB  1000GB  1000GB  primary  ext3              

&lt;/div&gt;
&lt;br /&gt;
Once can be compared this with &lt;a href=&quot;http://blogsysadmin.blogspot.com/2011/08/how-to-partitions-in-hard-disk-using.html&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;fdisk -l&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;
First we need to look all option parted carry.&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;
[root@RHEL01i ~]# parted /dev/sdc
GNU Parted 2.1
Using /dev/sdc
Welcome to GNU Parted! Type &#39;help&#39; to view a list of commands.
(parted) help                                                             
  align-check TYPE N                        check partition N for TYPE(min|opt) alignment
  check NUMBER                             do a simple check on the file system
  cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER   copy file system to another partition
  help [COMMAND]                           print general help, or help on COMMAND
  mklabel,mktable LABEL-TYPE               create a new disklabel (partition table)
  mkfs NUMBER FS-TYPE                      make a FS-TYPE file system on partition NUMBER
  mkpart PART-TYPE [FS-TYPE] START END     make a partition
  mkpartfs PART-TYPE FS-TYPE START END     make a partition with a file system
  move NUMBER START END                    move partition NUMBER
  name NUMBER NAME                         name partition NUMBER as NAME
  print [devices|free|list,all|NUMBER]     display the partition table, available devices, free space, all found partitions, or a particular partition
  quit                                     exit program
  rescue START END                         rescue a lost partition near START and END
  resize NUMBER START END                  resize partition NUMBER and its file system
  rm NUMBER                                delete partition NUMBER
  select DEVICE                            choose the device to edit
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER
  toggle [NUMBER [FLAG]]                   toggle the state of FLAG on partition NUMBER
  unit UNIT                                set the default unit to UNIT
  version                                  display the version number and copyright information of GNU Parted
(parted)     
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Creating a Partition&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Here we will make 4 partitions, 2 primary which have 4GB and 512MB, and 2 logical partitions inside an extended partition (3.5 GB). As a default unit in &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;parted&lt;/b&gt;&lt;/span&gt; is megabytes (MB).    
&lt;br /&gt;
&lt;div class=&quot;mycode2&quot;&gt;
[root@RHEL01 ~]# parted /dev/sdc
GNU Parted 2.1
Using /dev/sdc
Welcome to GNU Parted! Type &#39;help&#39; to view a list of commands.
(parted) &lt;b&gt;mkpart&lt;/b&gt;                                                           
Partition type?  primary/extended? &lt;b&gt;primary&lt;/b&gt;                                
File system type?  [ext2]? &lt;b&gt;ext3&lt;/b&gt;
Start? &lt;b&gt;0&lt;/b&gt;                                                                  
End? &lt;b&gt;4096&lt;/b&gt;
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? &lt;b&gt;Ignore&lt;/b&gt;
(parted) &lt;b&gt;p&lt;/b&gt;                                                                
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End     Size    Type     File system  Flags
 1      512B   4096MB  4096MB  primary

(parted) &lt;b&gt;mkpart&lt;/b&gt;
Partition type?  primary/extended? &lt;b&gt;primary&lt;/b&gt;
File system type?  [ext2]? &lt;b&gt;ext3&lt;/b&gt;                                           
Start? &lt;b&gt;4096&lt;/b&gt;                                                               
End? &lt;b&gt;4608&lt;/b&gt;  
(parted) &lt;b&gt;p&lt;/b&gt;                                                                
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      512B    4096MB  4096MB  primary
 2      4097MB  4608MB  512MB   primary

(parted) &lt;b&gt;mkpart&lt;/b&gt;
Partition type?  primary/extended? &lt;b&gt;extended&lt;/b&gt;                               
Start? &lt;b&gt;4608&lt;/b&gt;     
End? &lt;b&gt;8590&lt;/b&gt;
(parted) &lt;b&gt;p&lt;/b&gt;                                                                
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      512B    4096MB  4096MB  primary
 2      4097MB  4608MB  512MB   primary
 3      4608MB  8590MB  3981MB  extended               lba

(parted) &lt;b&gt;mkpart&lt;/b&gt;
Partition type?  primary/logical? &lt;b&gt;logical&lt;/b&gt;  
File system type?  [ext2]? &lt;b&gt;ext3&lt;/b&gt;                                           
Start? &lt;b&gt;4608&lt;/b&gt;  
End? &lt;b&gt;6656&lt;/b&gt;                                                                 
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? &lt;b&gt;Ignore&lt;/b&gt; 
(parted) &lt;b&gt;p&lt;/b&gt; 
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      512B    4096MB  4096MB  primary
 2      4097MB  4608MB  512MB   primary
 3      4608MB  8590MB  3981MB  extended               lba
 5      4608MB  6656MB  2048MB  logical

(parted) &lt;b&gt;mkpart&lt;/b&gt;
Partition type?  primary/logical? &lt;b&gt;logical&lt;/b&gt;
File system type?  [ext2]? &lt;b&gt;ext3&lt;/b&gt; 
Start? &lt;b&gt;6656&lt;/b&gt; 
End? &lt;b&gt;8590&lt;/b&gt; 
(parted) &lt;b&gt;p&lt;/b&gt; 
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdc: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      512B    4096MB  4096MB  primary
 2      4097MB  4608MB  512MB   primary
 3      4608MB  8590MB  3981MB  extended               lba
 5      4608MB  6656MB  2048MB  logical
 6      6656MB  8590MB  1934MB  logical

(parted)
&lt;/div&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/1348965093102192638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/how-to-partitions-in-hard-disk-using_19.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/1348965093102192638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/1348965093102192638'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/how-to-partitions-in-hard-disk-using_19.html' title='How to partition a hard disk using &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;parted&lt;/span&gt;'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-1052801224437960484</id><published>2011-08-18T16:10:00.019-05:00</published><updated>2011-08-19T17:58:40.570-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fdisk"/><category scheme="http://www.blogger.com/atom/ns#" term="Partitions"/><title type='text'>How to partitions in a hard disk using fdisk</title><content type='html'>&lt;b&gt;Listing Details of the Hard Disks
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;
[root@RHEL01 ~]# fdisk -l

Disk /dev/sda: 999.6 GB, 999653638144 bytes
255 heads, 63 sectors/track, 121534 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          64      514048+  83  Linux
/dev/sda2              65       12812   102398310   83  Linux
/dev/sda3           12813       19186    51199155   82  Linux swap / Solaris
/dev/sda4           19187      121534   822110310    5  Extended
/dev/sda5           19187       25560    51199123+  83  Linux
/dev/sda6           25561      121534   770911123+  83  Linux

Disk /dev/sdb: 999.6 GB, 999653638144 bytes
255 heads, 63 sectors/track, 121534 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121534   976221823+  83  Linux
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;Creating a Partition&lt;/b&gt;
&lt;br /&gt;
For this purpose we need to find out which hard disk that we are going to partitioned. keep in mind that IDE hard disks can be seen as &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;hda&lt;/span&gt;&lt;/b&gt;, &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;hdb&lt;/span&gt;&lt;/b&gt;, &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;hdc&lt;/span&gt;&lt;/b&gt;, etc., as well as SATA or&amp;nbsp;SCSI&amp;nbsp;can be seen as &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sda&lt;/span&gt;&lt;/b&gt;, &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sdb&lt;/span&gt;&lt;/b&gt;, &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;sdc&lt;/span&gt;&lt;/b&gt;, etc,. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;List your devices.&lt;/b&gt;
&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;
ll /dev/sd*
brw-rw----. 1 root disk 8,  0 Aug 18 18:40 /dev/sda
brw-rw----. 1 root disk 8,  1 Aug 18 18:40 /dev/sda1
brw-rw----. 1 root disk 8,  2 Aug 18 18:40 /dev/sda2
brw-rw----. 1 root disk 8, 16 Aug 18 18:40 /dev/sdb
brw-rw----. 1 root disk 8, 32 Aug 18 18:40 /dev/sdc
brw-rw----. 1 root disk 8, 48 Aug 18 18:40 /dev/sdd
&lt;/div&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;fdisk &amp;lt;device&amp;gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;
# fdisk /dev/sdb 

WARNING: DOS-compatible mode is deprecated. It&#39;s strongly recommended to
         switch off the mode (command &#39;c&#39;) and change display units to
         sectors (command &#39;u&#39;).

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition&#39;s system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): 
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;The basic fdisk commands you need are:&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;p&lt;/b&gt;&lt;/span&gt; print the partition table&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;n&lt;/b&gt;&lt;/span&gt; create a new partition&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;d&lt;/b&gt;&lt;/span&gt; delete a partition&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;q&lt;/b&gt;&lt;/span&gt; quit without saving changes&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;t&lt;/b&gt;&lt;/span&gt; change a partition&#39;s system id&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;w&lt;/b&gt;&lt;/span&gt; write the new partition table and exit
&lt;br /&gt;
&lt;br /&gt;
Here we are going to make 4GB partition as first partition. Then 512MB swap space. Then&amp;nbsp;extended&amp;nbsp;partition of &amp;nbsp;3.5G which has 2GB and 1.5GB. at last we change the partition type (&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;id&lt;/span&gt;) to 82 which is Linux swap. The write all to disk and exit. &lt;br /&gt;
&lt;br /&gt;
There are some limitations when it comes to working with partitions.&amp;nbsp;You can have&amp;nbsp;only four partitions to a physical disk—with one exception. If you want to make&amp;nbsp;more than the four, you need to create three primary partitions and one extended&amp;nbsp;partition, although the primary partitions aren’t required for extended partition creation.&amp;nbsp;The extended partition can then hold 11 logical partitions (5–16) on it.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mycode2&quot;&gt;
[root@RHEL01 ~]#&amp;nbsp;&lt;b&gt;fdisk /dev/sdb&lt;/b&gt; 

WARNING: DOS-compatible mode is deprecated. It&#39;s strongly recommended to
         switch off the mode (command &#39;c&#39;) and change display units to
         sectors (command &#39;u&#39;).

Command (m for help): &lt;b&gt;p&lt;/b&gt;

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000896f3

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): &lt;b&gt;n&lt;/b&gt;
Command action
   e   extended
   p   primary partition (1-4)
&lt;b&gt;p&lt;/b&gt;
Partition number (1-4): &lt;b&gt;1&lt;/b&gt;
First cylinder (1-1044, default 1): &lt;b&gt;&lt;return&gt;&lt;/return&gt;&lt;/b&gt;
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-1044, default 1044): &lt;b&gt;+4G&lt;/b&gt;

Command (m for help):&lt;b&gt; n&lt;/b&gt;
Command action
   e   extended
   p   primary partition (1-4)
&lt;b&gt;p&lt;/b&gt;
Partition number (1-4): &lt;b&gt;2&lt;/b&gt;
First cylinder (524-1044, default 524): &lt;b&gt;&lt;return&gt;&lt;/return&gt;&lt;/b&gt;
Using default value 524
Last cylinder, +cylinders or +size{K,M,G} (524-1044, default 1044): &lt;b&gt;+512M&lt;/b&gt;

Command (m for help): &lt;b&gt;n&lt;/b&gt;
Command action
   e   extended
   p   primary partition (1-4)
&lt;b&gt;e&lt;/b&gt;
Partition number (1-4): &lt;b&gt;3&lt;/b&gt;
First cylinder (590-1044, default 590): &lt;b&gt;&lt;return&gt;&lt;/return&gt;&lt;/b&gt;
Using default value 590
Last cylinder, +cylinders or +size{K,M,G} (590-1044, default 1044): &lt;b&gt;&lt;return&gt;&lt;/return&gt;&lt;/b&gt;
Using default value 1044

Command (m for help): &lt;b&gt;n&lt;/b&gt;
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
&lt;b&gt;l&lt;/b&gt;
First cylinder (590-1044, default 590): &lt;b&gt;&lt;return&gt;&lt;/return&gt;&lt;/b&gt;
Using default value 590
Last cylinder, +cylinders or +size{K,M,G} (590-1044, default 1044): &lt;b&gt;+2G&lt;/b&gt;

Command (m for help): &lt;b&gt;n&lt;/b&gt;
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
&lt;b&gt;l&lt;/b&gt;
First cylinder (852-1044, default 852): &lt;b&gt;&lt;return&gt;&lt;/return&gt;&lt;/b&gt;
Using default value 852
Last cylinder, +cylinders or +size{K,M,G} (852-1044, default 1044): &lt;b&gt;&lt;return&gt;&lt;/return&gt;&lt;/b&gt;
Using default value 1044

Command (m for help): &lt;b&gt;t&lt;/b&gt;
Partition number (1-6): &lt;b&gt;2&lt;/b&gt;
Hex code (type L to list codes): &lt;b&gt;82&lt;/b&gt;
Changed system type of partition 2 to 82 (Linux swap / Solaris)

Command (m for help): &lt;b&gt;p&lt;/b&gt;

Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000896f3

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         523     4200966   83  Linux
/dev/sdb2             524         589      530145   82  Linux swap / Solaris
/dev/sdb3             590        1044     3654787+   5  Extended
/dev/sdb5             590         851     2104483+  83  Linux
/dev/sdb6             852        1044     1550241   83  Linux

Command (m for help): &lt;b&gt;w&lt;/b&gt;
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@RHEL01i sahan]#
&lt;/div&gt;
&lt;br /&gt;
Now task is&amp;nbsp;completed and it need to be informed to the OS correctly. The Linux command for this is partprobe (inform the OS and kernel of partition table changes).&amp;nbsp;&amp;nbsp;man partprobe will give you more&amp;nbsp;details.&lt;br /&gt;
&amp;nbsp;SYNOPSIS:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;partprobe [-d] [-s] [devices...]&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;
partprobe /dev/hdb

&lt;/div&gt;
You can not found any out put here, it just informed the new partition table to OS.</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/1052801224437960484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/how-to-partitions-in-hard-disk-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/1052801224437960484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/1052801224437960484'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/how-to-partitions-in-hard-disk-using.html' title='How to partitions in a hard disk using &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;fdisk&lt;/span&gt;'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-3410808109801576864</id><published>2011-08-16T16:12:00.005-05:00</published><updated>2011-08-18T17:29:11.672-05:00</updated><title type='text'>Working with GRUB, Recover MBR</title><content type='html'>The GRUB bootloader is broken down into different stages. The code contained on the master boot record (MBR) is considered GRUB stage 1. It loads GRUB stage 1.5, which tries to identify the file system type (optional), or it can call GRUB stage 2 directly. Stage 2 is what calls the kernel and loads it into memory. In stage 1, GRUB needs to search the MBR looking for an active partition from which to boot the kernel.

&lt;b&gt;Grub boot options:&lt;/b&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;e&lt;/b&gt;&lt;/span&gt; Edit the commands before booting
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;a&lt;/b&gt;&lt;/span&gt; Modify or append the kernel arguments before booting
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;c&lt;/b&gt;&lt;/span&gt; Open the GRUB command line

&lt;b&gt;Recover broken MBR in GRUB&lt;/b&gt;
Boot the machine andd wait until the GRUB message appears and hit &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;c&lt;/b&gt;&lt;/span&gt;. 

&lt;div class=&quot;mycode&quot;&gt;
GNU GRUB version 0.97 (639K lower . 392128K upper memory)

[ Minimal BASH-like line editing is supported.  For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ESC at any time exits.]

grub &amp;gt; find /grub/grub.conf
(hd0,0)
grub &amp;gt; root
(hd0,0): Filesystem type is unknown, partition type 0x8e
grub &amp;gt; 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)”... 26 sectors are embedded. succeeded.
Running “install /grub/stage1 (hd0) (hd0)1+26 p(hd0,0)/grub/stage2 /grub/grub.conf”... succeeded
Done.
grub &amp;gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/3410808109801576864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/working-with-grub-recover-mbr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/3410808109801576864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/3410808109801576864'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/working-with-grub-recover-mbr.html' title='Working with GRUB, Recover MBR'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-2859116494147246854</id><published>2011-08-05T17:00:00.003-05:00</published><updated>2011-08-18T17:25:48.043-05:00</updated><title type='text'>top, ps, nice and kill on CentOS/RHEL 6.0</title><content type='html'>Identify CPU/memory intensive processes, adjust process priority with renice, and kill processes

What is a Process?
A process is a set of instructions loaded in to memory. A process usually has a Process ID (PID) . 

For this purpose, we use top, ps, nice and kill command.

1) top - display Linux tasks

2)ps - report a snapshot of the current processes 

&lt;div class=&quot;mycode&quot;&gt;
********* simple selection *********  ********* selection by list *********
-A all processes                      -C by command name
-N negate selection                   -G by real group ID (supports names)
-a all w/ tty except session leaders  -U by real user ID (supports names)
-d all except session leaders         -g by session OR by effective group name
-e all processes                      -p by process ID
T  all processes on this terminal     -s processes in the sessions given
a  all w/ tty, including other users  -t by tty
g  OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)
r  only running processes             U  processes for specified users
x  processes w/o controlling ttys     t  by tty

*********** output format **********  *********** long options ***********
-o,o user-defined  -f full            --Group --User --pid --cols --ppid
-j,j job control   s  signal          --group --user --sid --rows --info
-O,O preloaded -o  v  virtual memory  --cumulative --format --deselect
-l,l long          u  user-oriented   --sort --tty --forest --version
-F   extra full    X  registers       --heading --no-heading --context

********* misc options *********
-V,V  show version      L  list format codes  f  ASCII art forest
-m,m,-L,-T,H  threads   S  children in sum    -y change -l format
-M,Z  security data     c  true command name  -c scheduling class
-w,w  wide output       n  numeric WCHAN,UID  -H process hierarchy&lt;/div&gt;

3)nice - run a program with modified scheduling priority

4)kill - terminate a process</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/2859116494147246854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/top-ps-nice-and-kill-on-centosrhel-60.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/2859116494147246854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/2859116494147246854'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/top-ps-nice-and-kill-on-centosrhel-60.html' title='top, ps, nice and kill on CentOS/RHEL 6.0'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-2359173049287457891</id><published>2011-08-05T15:38:00.005-05:00</published><updated>2011-08-18T17:31:19.555-05:00</updated><title type='text'>Use single-user mode to gain access to a system</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Log in to single-user mode&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Boot the machine and wait until the GRUB message appears and hit any key.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Select current kernel version that you wish to boot and type &lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;a&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; to append the line.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Then type &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;single&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; or &lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;1&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; at the end of the line (there should be a space between single and the last parameter). Then Enter to proceed.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_4G3_Kz_NVjAASE_gQGYi9h4eB4vYHZmR6SdpI8PE17UwEiLg8mxJQ8gZ7j7FDUxROrj0NDzJLAldEAjPnrBfVZ4kIhNqZn7NMhFKhb0WzCCyLbPMrN5Mbx2_4eXsFoPEY4fUd6PcZwI/s1600/singleuser1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_4G3_Kz_NVjAASE_gQGYi9h4eB4vYHZmR6SdpI8PE17UwEiLg8mxJQ8gZ7j7FDUxROrj0NDzJLAldEAjPnrBfVZ4kIhNqZn7NMhFKhb0WzCCyLbPMrN5Mbx2_4eXsFoPEY4fUd6PcZwI/s320/singleuser1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/2359173049287457891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/use-single-user-mode-to-gain-access-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/2359173049287457891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/2359173049287457891'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/use-single-user-mode-to-gain-access-to.html' title='Use single-user mode to gain access to a system'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_4G3_Kz_NVjAASE_gQGYi9h4eB4vYHZmR6SdpI8PE17UwEiLg8mxJQ8gZ7j7FDUxROrj0NDzJLAldEAjPnrBfVZ4kIhNqZn7NMhFKhb0WzCCyLbPMrN5Mbx2_4eXsFoPEY4fUd6PcZwI/s72-c/singleuser1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-5805522572373703795</id><published>2011-08-01T17:28:00.022-05:00</published><updated>2011-08-18T17:40:44.745-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Services"/><title type='text'>Manage System Services</title><content type='html'>For steady and reliable system you need to know how to manage services efficiently.
In Linux we call them daemons. You need to know how to turn on/off, and restrict for certain run-levels. If a name of a system process that ends d, it is a daemon. e.g. SSH service is sshd and Apache web service is httpd.&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;1) chkconfig&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Here we exploit chkconfig command. it basically updates and queries runlevel information for system services. Syntax and synopsis for the service management command as follows.
&lt;div class=&quot;mycode15&quot;&gt;
chkconfig [options] service_name&lt;/div&gt;
usual Options are:
&lt;div class=&quot;mycode15&quot;&gt;
chkconfig [--list] [--type type][name]
chkconfig --add name
chkconfig --del name
chkconfig --override name
chkconfig [--level &amp;lt;levels&amp;gt;] [--type type] name  &lt;on|off|reset|reset‐priorities&gt;&lt;/on|off|reset|reset‐priorities&gt;&lt;/div&gt;
Check the sshd service status/on/off for particular runlevel:
&lt;div class=&quot;mycode1&quot;&gt;
# chkconfig --list sshd
sshd       0:off   1:off   2:on   3:on    4:on   5:on   6:off
# chkconfig sshd off
# chkconfig --list sshd
sshd       0:off   1:off   2:off   3:off    4:off   5:off   6:off
# chkconfig sshd on
# chkconfig --list sshd
sshd       0:off   1:off   2:on   3:on    4:on   5:on   6:off
# chkconfig --level 5 sshd off
# chkconfig --list sshd
sshd       0:off   1:off   2:on   3:on    4:on   5:off   6:off&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;2) ntsysv &lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;netsysv&lt;/b&gt;&lt;/span&gt; is a simple interface for configuring runlevel services which are also configurable through chkconfig. By default, it configures the current runlevel. if the user would like to configure other runlevels, those levels can be specified on the command line by listing the kevels after &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--leve&lt;/span&gt;&lt;/b&gt;l, without any spaces. For example, the option &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--level 235&lt;/span&gt;&lt;/b&gt; edits runlevels 2, 3, and 6.
&lt;br /&gt;
A service is considers to be started in the runlevel set if it is started in any of the runlevels which are being edited.&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;ntsysv&lt;/b&gt;&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;window normally contains a Cancel button.&lt;/span&gt; If &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;--back&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;is specified, a Back button appears instead.&lt;/span&gt;
&lt;br /&gt;
SYNOPSIS 
&lt;div class=&quot;mycode&quot;&gt;
# ntsysv [--back]&amp;nbsp;[--level &amp;lt;levels&amp;gt;]&lt;/div&gt;
&lt;div class=&quot;mycode&quot;&gt;
# ntsysv --levels 235&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTn2dj7SSqaaqo_M0-3A_Jsk0dwBqI9UdwPSBhLnrAaKbhtYyb1h8kq170OSU4y-to14RcHZUdw3DG5i7VFFUTFGxGgBD-bj1KHk9KfH8aBn7oxrwRwPd5hcx0rdNvHjiyrazaMRUNBDQ/s1600/nysysv1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;221&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTn2dj7SSqaaqo_M0-3A_Jsk0dwBqI9UdwPSBhLnrAaKbhtYyb1h8kq170OSU4y-to14RcHZUdw3DG5i7VFFUTFGxGgBD-bj1KHk9KfH8aBn7oxrwRwPd5hcx0rdNvHjiyrazaMRUNBDQ/s400/nysysv1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;3) Service&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;Service&lt;/b&gt;&lt;/span&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;also can be utilize for start, stop, and check the status of services on the system after it has already up. service  runs  a System V init script in as predictable environment as possible, removing most environment variables and  with  current working directory set to /. &lt;/span&gt;
&lt;br /&gt;
SYNOPSIS 
&lt;div class=&quot;mycode1&quot;&gt;
service [--status-all]
service service_name &amp;lt;{start|stop|status|restart|force-reload}&amp;gt;]&lt;/div&gt;
Here, normally service_name located in directory /etc/init.d/ . 
&lt;div class=&quot;mycode1&quot;&gt;
# service sshd status
openssh-daemon (pid  1880) is running...
# service sshd stop
Stopping sshd:                                             [  OK  ]
# service sshd status
openssh-daemon is stopped
# service sshd start
Starting sshd:                                             [  OK  ]&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;b&gt;4) initctl&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;initctl &lt;/b&gt;&lt;/span&gt;allows a system administrator to communicate and interact with the Upstart init daemon. &lt;/span&gt;
&lt;br /&gt;
Syntex: initctl {start|stop|restart|reload|status|list|emit}
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;Options:&lt;/span&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cols=&quot;2&quot; frame=&quot;VOID&quot; rules=&quot;NONE&quot;&gt;&lt;colgroup&gt;&lt;col width=&quot;86&quot;&gt;&lt;/col&gt;&lt;col width=&quot;269&quot;&gt;&lt;/col&gt;&lt;/colgroup&gt;  &lt;tbody&gt;
&lt;tr&gt;    &lt;td align=&quot;LEFT&quot; height=&quot;19&quot; width=&quot;86&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;start   &lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;td align=&quot;LEFT&quot; width=&quot;269&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Starts a job&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td align=&quot;LEFT&quot; height=&quot;19&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;stop    &lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;td align=&quot;LEFT&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Stops a job&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td align=&quot;LEFT&quot; height=&quot;19&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;restart &lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;td align=&quot;LEFT&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Restarts a job&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td align=&quot;LEFT&quot; height=&quot;19&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;reload  &lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;td align=&quot;LEFT&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Sends a HUP signal to a job&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td align=&quot;LEFT&quot; height=&quot;19&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;status  &lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;td align=&quot;LEFT&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Queries the status of a job&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td align=&quot;LEFT&quot; height=&quot;19&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;list    &lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;td align=&quot;LEFT&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Lists known jobs&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr&gt;    &lt;td align=&quot;LEFT&quot; height=&quot;19&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small;&quot;&gt;&lt;b&gt;emit    &lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;td align=&quot;LEFT&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Emits an event&lt;/span&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;
&lt;div class=&quot;mycode&quot;&gt;
# initctl list
rc stop/waiting
tty (/dev/tty3) start/running, process 2673
tty (/dev/tty2) start/running, process 2671
tty (/dev/tty6) start/running, process 2679
tty (/dev/tty5) start/running, process 2677
tty (/dev/tty4) start/running, process 2675
plymouth-shutdown stop/waiting
control-alt-delete stop/waiting
system-setup-keyboard start/running, process 1259
readahead-collector stop/waiting
vpnc-cleanup stop/waiting
quit-plymouth stop/waiting
rcS stop/waiting
prefdm start/running, process 2666
init-system-dbus stop/waiting
ck-log-system-restart stop/waiting
readahead stop/waiting
ck-log-system-start stop/waiting
splash-manager stop/waiting
start-ttys stop/waiting
readahead-disable-services stop/waiting
ck-log-system-stop stop/waiting
rcS-sulogin stop/waiting
serial stop/waiting&lt;/div&gt;
Please find more about UPSTART in CentOS/RHEL 5.6/6</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/5805522572373703795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/manage-system-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/5805522572373703795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/5805522572373703795'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/manage-system-services.html' title='Manage System Services'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTn2dj7SSqaaqo_M0-3A_Jsk0dwBqI9UdwPSBhLnrAaKbhtYyb1h8kq170OSU4y-to14RcHZUdw3DG5i7VFFUTFGxGgBD-bj1KHk9KfH8aBn7oxrwRwPd5hcx0rdNvHjiyrazaMRUNBDQ/s72-c/nysysv1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-7904019957180234324</id><published>2011-08-01T16:39:00.002-05:00</published><updated>2014-10-09T09:00:00.278-05:00</updated><title type='text'>Recover Root Password in CentOS/RHEL 5.6/6</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: 16px; line-height: 17px;&quot;&gt;You can log in using single-user mode or rescue-mode to reset the root password.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: 16px; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: 16px; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: 16px; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: 16px; line-height: 17px;&quot;&gt;&lt;b&gt;1) Log in to single-user mode&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt;Boot the machine andd wait until the GRUB message appears and hit any key.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt;Select current kernel version that you wish to boot and type &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;a&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt; to append the line.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt;Then type &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;single&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt; or &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;1&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt; at the end of the line (there should be a space between single and the last parameter). Then &lt;b&gt;Enter&lt;/b&gt; to proceed.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;&lt;/ol&gt;
&lt;/ol&gt;
&lt;div class=&quot;mycode15&quot;&gt;
[root@hostname /]# passwd&lt;br /&gt;
Changing password for user root.&lt;br /&gt;
New password:&lt;br /&gt;
Retype new password:&lt;br /&gt;
passwd: all authentication tokens updated successfully.&lt;br /&gt;
[root@hostname /]#&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: 16px; line-height: 17px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: sans-serif; font-size: 13px; font-weight: normal; line-height: 19px;&quot;&gt;RHEL 6.0 has a bug that will prevent you from changing your root password in single user mode.You may temporarily disable SELinux. &amp;nbsp;()&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;
# setenforce 0&lt;/div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; font-size: 16px; line-height: 17px;&quot;&gt;&lt;b&gt;2) Boot in to rescue mode&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt;Boot the machine&amp;nbsp;using a CentOS/RHEL installation DVD or CD#1&amp;nbsp;and wait until the Welcome Screen appears.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt;You can find three options,&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 17px;&quot;&gt;&lt;b&gt;Install or upgrade an existing system&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 17px;&quot;&gt;&lt;b&gt;Install system with basic video driver&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 17px;&quot;&gt;&lt;b&gt;Rescue installed system&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 17px;&quot;&gt;&lt;b&gt;Boot from local drive&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;&lt;/ol&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt;Select the&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;Rescue installed system&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt;&amp;nbsp;and Enter to proceed.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 17px;&quot;&gt;Then it will ask you to &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 17px;&quot;&gt;&lt;b&gt;Choose a Language&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px;&quot;&gt; and &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Keyboard Type&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 17px;&quot;&gt; Choose appropriately. &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 17px;&quot;&gt;Then you will find a dialog whether you need&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: helvetica, arial, sans-serif; line-height: 17px;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 17px;&quot;&gt;&lt;b&gt;network setup&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; line-height: 17px;&quot;&gt;. you can choos yes or no it want mater.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Then you will find&lt;/span&gt; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Rescue&lt;/span&gt;&lt;/b&gt; &lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;dialog box. Choose &lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Continue&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; option and hit&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b&gt;OK&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;twice and&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 17px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-weight: bold;&quot;&gt;Start shell&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;. Then you will be in the shell.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;mycode15&quot;&gt;
Starting shell...&lt;br /&gt;
bash-4.1# chroot /mnt/sysimage&lt;br /&gt;
sh-4.1# passwd&lt;br /&gt;
Changing password for user root.&lt;br /&gt;
New password:&lt;br /&gt;
Retype new password:&lt;br /&gt;
passwd: all authentication tokens updated successfully.&lt;br /&gt;
sh-4.1# exit&lt;br /&gt;
exit&lt;br /&gt;
bash-4.1# reboot&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;b&gt;3) Using recovery mode&lt;/b&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Chose &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;root Drop to root shell prompt.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mount -o remount,rw /&lt;/span&gt; this will mount your root diectory with read/write permission.&lt;/li&gt;
&lt;li&gt;Type &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;passwd&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/7904019957180234324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/07/recover-root-password-in-centosrhel-566.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/7904019957180234324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/7904019957180234324'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/07/recover-root-password-in-centosrhel-566.html' title='Recover Root Password in CentOS/RHEL 5.6/6'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-5605179443970616743</id><published>2011-08-01T14:30:00.002-05:00</published><updated>2011-08-04T12:51:32.265-05:00</updated><title type='text'>Boot, reboot, and shut down a system normally</title><content type='html'>Some examples:&lt;br /&gt;
1) Shutdown the system immediately.   &lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# shutdown -h now&lt;/div&gt;&lt;br /&gt;
2) Reboot the system now&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# shutdown -r now&lt;/div&gt;&lt;br /&gt;
3) or you can use reboot command &lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# reboot&lt;/div&gt;&lt;br /&gt;
4) Delayed shutdown by 2 minutes&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# shutdown -h 120&lt;/div&gt;&lt;br /&gt;
5) Shutdown at 10:00PM &lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# shutdown -h 22:00&lt;/div&gt;&lt;br /&gt;
6) Requests that the system  be  powered  off explicitly. &lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# shutdown -P now&lt;/div&gt;&lt;br /&gt;
7) Force the filesystem check during reboot&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# shutdown -Fr now&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In CentOS/RHEL 6, with new Upstart utility both poweroff and halt commands pointed to reboot command. These  programs  allow  a  system  administrator to reboot, halt or poweroff the system.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# shutdown -P now&lt;/div&gt;is quite equal to&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# poweroff&lt;/div&gt;&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# shutdown -r now&lt;/div&gt;is quite equal to &lt;br /&gt;
&lt;div class=&quot;mycode&quot;&gt;# reboot&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/5605179443970616743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/07/boot-reboot-and-shut-down-system.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/5605179443970616743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/5605179443970616743'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/07/boot-reboot-and-shut-down-system.html' title='Boot, reboot, and shut down a system normally'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4515537268360732058.post-1636568246941328910</id><published>2011-08-01T14:00:00.001-05:00</published><updated>2011-08-16T17:25:40.233-05:00</updated><title type='text'>Boot systems into different runlevels manually</title><content type='html'>To change the runlevel of a single boot session, use the following instructions:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;When the GRUB menu bypass screen appears at boot time, press any key to enter the GRUB menu (within the first three seconds).&lt;/li&gt;
&lt;li&gt;Press the &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;a&lt;/span&gt;&lt;/b&gt; key to append to the kernel command.&lt;/li&gt;
&lt;li&gt;Add&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold; line-height: 15px; white-space: nowrap;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;space&amp;gt;&lt;/span&gt;&lt;/i&gt;&lt;em class=&quot;replaceable&quot;&gt;&lt;code style=&quot;font-weight: bold; white-space: nowrap;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;lt;runlevel&amp;gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;liberation mono&#39;, &#39;bitstream vera mono&#39;, &#39;dejavu mono&#39;, monospace; font-size: 12px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/em&gt;&lt;/span&gt;at the end of the boot options line to boot to the desired runlevel. For example, the following entry would initiate a boot process into runlevel 3&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;mycode&quot;&gt;[ Minimal BASH-like line editing is supported.  For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ESC at any time cancels. ENTER at any time accepts your changes.]&lt;br /&gt;
&lt;br /&gt;
grub append&amp;gt; ro root=/dev/mapper/vg_ ......... rhgb quiet 3 &lt;/div&gt;&lt;br /&gt;
# runlevel 0 is System halt (Do not use this for initdefault!)&lt;br /&gt;
# runlevel 1 is Single user mode&lt;br /&gt;
# runlevel 2 is Local multiuser without remote network (e.g. NFS)&lt;br /&gt;
# runlevel 3 is Full multiuser with network&lt;br /&gt;
# runlevel 4 is Not used&lt;br /&gt;
# runlevel 5 is Full multiuser with network and graphic&lt;br /&gt;
# runlevel 6 is System reboot (Do not use this for initdefault!)</content><link rel='replies' type='application/atom+xml' href='http://blogsysadmin.blogspot.com/feeds/1636568246941328910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/boot-systems-into-different-runlevels.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/1636568246941328910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4515537268360732058/posts/default/1636568246941328910'/><link rel='alternate' type='text/html' href='http://blogsysadmin.blogspot.com/2011/08/boot-systems-into-different-runlevels.html' title='Boot systems into different runlevels manually'/><author><name>Sahan</name><uri>http://www.blogger.com/profile/15012183754701791970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>