Monthly Archives: November 2017

How to mount and unmount encrypted disk using LUKS

  1. get disk ID
    # fdisk -l
    OUTPUT: /dev/sdc
    # blkid – get partition name i.e. /dev/sdc1
  2. Open the volume and map it
    cryptsetup luksOpen /dev/sdc1 cryptData

    1. Mount the volume
      # mount /dev/mapper/cryptData /mnt/encrypted
  3. dsf
Advertisements

How to exclude packages from update Red Hat/Centos

Sometimes you only want to update packages without upgrading kernel, there are two ways of doing this:

1. Temporarily
# yum update –exclude=<package_name>
# yum update –exclude=kernel*

2. To make it more permanent edit /etc/yum.conf file and append “exclude” keyword
[main]
cachedir=/var/cache/yum/$basesearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exclude=kernel* redhat-release*