CentOS 기본 부팅 커널 설정 변경

CentOS 기본 부팅 커널 설정 변경

oracleasm 커널 모듈을 탑재하려고 했으나, 5.x 커널은 지원되지 않는다. 부팅시 커널을 선택하면 되지만, 기본 부팅 커널을 변경해 놓으면 따로 선택하지 않아되 된다.

먼저, 현재 커널 버전을 확인 해 본다.

# uname -a
Linux grid-2 5.15.0-204.147.6.2.el8uek.x86_64 #2 SMP Thu Mar 7 21:48:25 PST 2024 x86_64 x86_64 x86_64 GNU/Linux

grubby 명령어로 현재 설치된 커널을 볼 수 있다.

# grubby --info=ALL | egrep -i "kernel|title"
kernel="/boot/vmlinuz-5.15.0-204.147.6.2.el8uek.x86_64"
args="ro crashkernel=auto rhgb quiet numa=off transparent_hugepage=never $tuned_params"
title="Oracle Linux Server 8 (5.15.0-204.147.6.2.el8uek.x86_64) "
kernel="/boot/vmlinuz-5.15.0-101.103.2.1.el8uek.x86_64"
args="ro crashkernel=auto rhgb quiet numa=off transparent_hugepage=never $tuned_params"
title="Oracle Linux Server 8 (5.15.0-101.103.2.1.el8uek.x86_64) "
kernel="/boot/vmlinuz-4.18.0-513.18.1.el8_9.x86_64"
args="ro crashkernel=auto rhgb quiet numa=off transparent_hugepage=never $tuned_params"
title="Oracle Linux Server (4.18.0-513.18.1.el8_9.x86_64) 8.9"
kernel="/boot/vmlinuz-4.18.0-477.10.1.el8_8.x86_64"
args="ro crashkernel=auto rhgb quiet numa=off transparent_hugepage=never $tuned_params"
title="Oracle Linux Server (4.18.0-477.10.1.el8_8.x86_64) 8.8"
kernel="/boot/vmlinuz-0-rescue-4ec77e3bebc1438890ddbdcb1d97051f"
args="ro crashkernel=auto rhgb quiet numa=off transparent_hugepage=never $tuned_params"
title="Oracle Linux Server 8 (0-rescue-4ec77e3bebc1438890ddbdcb1d97051f) "

이제, 아래 명령으로 부팅 기본값을 변경한다.

# grubby --set-default /boot/vmlinuz-4.18.0-513.18.1.el8_9.x86_64
The default is /boot/loader/entries/4ec77e3bebc1438890ddbdcb1d97051f-4.18.0-513.18.1.el8_9.x86_64.conf with index 2 and kernel /boot/vmlinuz-4.18.0-513.18.1.el8_9.x86_64

변경사항 적용 및 확인을 위해 재부팅한다.

# reboot

재부팅 후 커널 버전 확인해 보면 원하는 커널로 부팅된것을 확인 할 수 있다.

# uname -a
Linux grid-1 4.18.0-513.18.1.el8_9.x86_64 #1 SMP Wed Mar 6 09:34:46 PST 2024 x86_64 x86_64 x86_64 GNU/Linux

참고로, 레드햇 계열 리눅스는 grubby 명령을 사용하지만, 우분투 리눅스처럼 데비안 계열 리눅스는 update-grub2 명령을 사용한다.

시스코 c9200L 스위치 공장초기화 및 OS설치.

시스코 c9200l 스위치 공장초기화 및 복구(OS설치).

설정만 지우려고 했지만, 실수로 공장 초기화를 진행해 버렸다!!!

참고로, factory-reset all 명령은 모든 로그, 사용자정보, 설정, 부팅 이미지를 포함한 모든 IOS 이미지등 모두 지워버려서, 스위치가 부팅되지 않는다.

중간에 취소할 기회가 있었는데, 아래 경고문을 읽어보지 않고 진행을 해 버렸다! ;^^

Switch_5F#factory-reset all 
The factory reset operation is irreversible for all operations. Are you sure? [confirm]
 The following will be deleted as a part of factory reset:
 1: Crash info and logs
 2: User data, startup and running configuration
 3: All IOS images, including the current boot image
 4: User added rommon variables
 5: OBFL logs
 6: Data on Field Replaceable Units(USB/SSD/SATA)
 The system will reload to perform factory reset.
 It will take some time to complete and bring it to rommon.
 You will need to load IOS image using USB/TFTP from rommon after
 this operation is completed.
 DO NOT UNPLUG THE POWER OR INTERRUPT THE OPERATION
 Are you sure you want to continue? [confirm]
Chassis 1 reloading, reason - Factory Reset

 Protection key not found
Switch_5F#Platform Info Send - Switch Config Message LIPC Message Send failed: Broken pipe 
Feb 20 08:57:43.920: %PMAN-5-EXITACTION: F0/0: pvp: Process manager is exiting: reload fp action requested
Feb 20 08:57:44.366: %PMAN-5-EXITACTION: C0/0: pvp: Process manager is exiting: reload cc action requested
Feb 20 08:57:48.568: %PMAN-5-EXITACTION: R0/0: pvp: Process manager is exiting: rp processes exit with reload switch code


Enabling factory reset for this reload cycle
 Switch booted with flash:packages.conf 
 Switch booted via packages.conf 
% FACTORYRESET - Started Cleaning Up...
 
% FACTORYRESET - Unmounting sd1
% FACTORYRESET - Cleaning Up sd1 [0]
% FACTORYRESET - erase In progress.. please wait for completion...
% FACTORYRESET - write zero...
% FACTORYRESET - finish erase
 
% FACTORYRESET - Making File System sd1 [0]
mke2fs 1.43-WIP (18-May-2015)
Discarding device blocks:   4096/204800             done                            
Creating filesystem with 204800 4k blocks and 51296 inodes
Filesystem UUID: 97abf68b-5e65-4b4d-bcad-4397e3367531
Superblock backups stored on blocks: 
32768, 98304, 163840

Allocating group tables: 0/7   done                            
Writing inode tables: 0/7   done                            
Writing superblocks and filesystem accounting information: 0/7   done
% FACTORYRESET - Mounting Back sd1 [0]
% FACTORYRESET - Factory Reset Done for sd1
 
% FACTORYRESET - Unmounting sd3
% FACTORYRESET - Cleaning Up sd3 [0]
% FACTORYRESET - erase In progress.. please wait for completion...
% FACTORYRESET - write zero...
% FACTORYRESET - finish erase
 
% FACTORYRESET - Making File System sd3 [0]
mke2fs 1.43-WIP (18-May-2015)
Discarding device blocks:   4096/485376             done                            
Creating filesystem with 485376 4k blocks and 121440 inodes
Filesystem UUID: 132f9efb-4852-46af-86bd-9ee7c420f8e5
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912

Allocating group tables:  0/15     done                            
Writing inode tables:  0/15     done                            
Writing superblocks and filesystem accounting information:  0/15     done
% FACTORYRESET - Mounting Back sd3 [0]
% FACTORYRESET - Factory Reset Done for sd3
 
% FACTORYRESET - Unmounting sd6
% FACTORYRESET - Cleaning Up sd6 [0]
% FACTORYRESET - erase In progress.. please wait for completion...
% FACTORYRESET - write zero...
% FACTORYRESET - finish erase
 
% FACTORYRESET - Making File System sd6 [0]
mke2fs 1.43-WIP (18-May-2015)
Discarding device blocks:   1024/131072             done                            
Creating filesystem with 131072 1k blocks and 32768 inodes
Filesystem UUID: b378204e-35c9-45e9-8fd1-cb36874f91bf
Superblock backups stored on blocks: 
8193, 24577, 40961, 57345, 73729

Allocating group tables:  0/16     done                            
Writing inode tables:  0/16     done                            
Writing superblocks and filesystem accounting information:  0/16     done
% FACTORYRESET - Mounting Back sd6 [0]
% FACTORYRESET - Factory Reset Done for sd6
% FACTORYRESET - Lic Clean UP
% FACTORYRESET - Lic Clean Successful...
% FACTORYRESET - Clean Up Successful...
% FACTORYRESET - Check for usbflash/sdflash devices...
ReloadReason=Factory Reset
Factory reset successful. Rebooting...

Initializing Hardware...
NOTICE: Please reset the device for the new MAC_ADDR value to take effect.


System Bootstrap, Version 17.9.1r [FC13], RELEASE SOFTWARE (P) 
Compiled Thu 06/08/2023 20:36:25 by rel

Current ROMMON image : Primary
C9200L-48P-4X platform with 2097152 Kbytes of main memory

WARNING: Bootable URL's in BOOT variable not found or exhausted.
         Please check the ROMMON configuration or boot command usage.

switch:

Continue reading

익스트림 스위치 dhcp 서버 설정.

Extreme switch에 dhcp servcer 설정하기

사용한 스위치는 x430-48t 이며, 현재 VLAN은 아래와 같다.

* X430-48t.13 # show vlan
-----------------------------------------------------------------------------------------------
Name            VID  Protocol Addr       Flags                         Proto  Ports  Virtual   
                                                                              Active router
                                                                              /Total
-----------------------------------------------------------------------------------------------
Default         1    ------------------------------------------------- ANY    0 /0   VR-Default 
dhcp_test       100  172.16.100.1   /24  ----------------------------- ANY    0 /12  VR-Default 
Mgmt            4095 ------------------------------------------------- ANY    0 /1   VR-Mgmt    
-----------------------------------------------------------------------------------------------
Flags : (B) BFD Enabled, (c) 802.1ad customer VLAN, (C) EAPS Control VLAN,
        (d) Dynamically created VLAN, (D) VLAN Admin Disabled,
        (e) CES Configured, (E) ESRP Enabled, (f) IP Forwarding Enabled,
        (F) Learning Disabled, (h) TRILL Enabled, (i) ISIS Enabled,
        (I) Inter-Switch Connection VLAN for MLAG, (k) PTP Configured,
        (l) MPLS Enabled, (L) Loopback Enabled, (m) IPmc Forwarding Enabled,
        (M) Translation Member VLAN or Subscriber VLAN, (n) IP Multinetting Enabled,
        (N) Network Login VLAN, (o) OSPF Enabled, (O) Flooding Disabled,
        (p) PIM Enabled, (P) EAPS protected VLAN, (r) RIP Enabled,
        (R) Sub-VLAN IP Range Configured, (s) Sub-VLAN, (S) Super-VLAN,
        (t) Translation VLAN or Network VLAN, (T) Member of STP Domain,
        (v) VRRP Enabled, (V) VPLS Enabled, (W) VPWS Enabled, (Z) OpenFlow Enabled

Total number of VLAN(s) : 3 

dhcp_test vlan에 dhcp 서버를 설정한다.

주의 사항: VLAN 이름을 사용하지 않고 VLAN ID를 사용하면 dhcp 설정을 할 수 없다.

1. DHCP를 적용할 포트, VLAN을 설정한다.

* X430-48t.14 # enable dhcp ports 1-12 vlan "dhcp_test" 

Continue reading

아루바 AP-134 UI 플래그

Aruba AP-134 프로비저닝후 작동안함! – UI flag.

AP-134를 설정하여 campus 네트워크에 추가 설치하였으나, 아래처럼 컨트롤러에서 인식하는 상태이나, UI 플래그가 보이며 사용할 수 없는 상태가 되었다.
참고로, AP-134는 안테나를 장착해야 하는 모델이다.

( Controller_1) [mynode] #show ap database group Area

Area-1F-07      Area  134      172.16.10.106  Up 44m:41s           UI     172.16.100.131  172.16.100.132


Flags: 1 = 802.1x authenticated AP use EAP-PEAP; 1+ = 802.1x use EST; 1- = 802.1x use factory cert; 2 = Using IKE version 2
       B = Built-in AP; C = Cellular RAP; D = Dirty or no config
       E = Regulatory Domain Mismatch; F = AP failed 802.1x authentication
       G = No such group; I = Inactive; J = USB cert at AP; L = Unlicensed
       M = Mesh node
       N = Duplicate name; P = PPPoe AP; R = Remote AP; R- = Remote AP requires Auth;
       S = Standby-mode AP; U = Unprovisioned; X = Maintenance Mode
       Y = Mesh Recovery
       c = CERT-based RAP; e = Custom EST cert; f = No Spectrum FFT support
       i = Indoor; o = Outdoor; s = LACP striping; u = Custom-Cert RAP; z = Datazone AP
       p = In deep-sleep status
       4 = WiFi Uplink
       r = Power Restricted; T = Thermal ShutDown

bss-table을 확인해 보면, 전파를 방사하지 못하는 상태이다.

( Controller_1) [mynode] #show ap bss-table ap-name Nocken-1F-07

fm (forward mode): T-Tunnel, S-Split, D-Decrypt Tunnel, B-Bridge (s-standard, p-persistent, b-backup, a-always), n-anyspot

cluster (cluster role): U-UAC, A-AAC, sU-Standby UAC, sA-Standby AAC

Aruba AP BSS Table
------------------
bss  ess  port  ip  phy  type  ch/EIRP/max-EIRP  cur-cl  ap name  in-t(s)  tot-t  mtu  acl-state  acl  fm  flags  cluster  datazone
---  ---  ----  --  ---  ----  ----------------  ------  -------  -------  -----  ---  ---------  ---  --  -----  -------  --------

Channel followed by "*" indicates channel selected due to unsupported configured channel.
"Spectrum" followed by "^" indicates Local Spectrum Override in effect.

Num APs:0
Num Associations:0

Flags:       K = 802.11K Enabled; W = 802.11W Enabled; 3 = WPA3 BSS; O = Enhanced-open BSS with transition mode; o = Enhanced-open transition mode open BSS; M = WPA3-SAE mixed mode BSS; E = Enhanced-open BSS without transition mode; m = Agile Multiband (MBO) BSS; c = MBO Cellular Data Capable BSS; I = Imminent VAP Down; T = Individual TWT Enabled; t = Broadcast TWT Enabled; D = VLAN Discovered; 

Continue reading

오라클 19c 설치 – 오라클 리눅스8에.

Oracle Linux 8에 Oracle 19c 설치

* 설치 환경
Memory: 16GB
SWAP : 16GB

OS: Oracle Linux 8.8 최소설치 버전(서버)
IP 주소: 172.30.124.212/24

* 사전작업
selinux를 사용하지 않도록 설정한다.

[root@localhost etc]# getenforce
Enforcing
[root@localhost etc]# setenforce 0
[root@localhost etc]# getenforce
Permissive

오라클 설치 파일 LINUX.X64_193000_db_home.zip 을 다운로드 받아둔다.

1. 오라클 preinstall 패키지 설치
예전 버전설치 할 때 사용자 계정 만들기, 커널 파라메터 수정, 필요 패키지 설치등을 해결해 주는 패키지.
dnf 명령으로 설치가능한 패키지를 확인하면 아래처럼 19c, 21c 두 버전이 보인다. oracle 19c를 설치할 것이므로 19c 패키지를 설치한다.

[root@localhost ~]# dnf list oracle-database-preinstall*
Last metadata expiration check: 0:26:46 ago on Wed 25 Oct 2023 08:54:53 PM EDT.
Available Packages
oracle-database-preinstall-19c.src                       1.0-2.el8                    ol8_appstream
oracle-database-preinstall-19c.x86_64                    1.0-2.el8                    ol8_appstream
oracle-database-preinstall-21c.src                       1.0-1.el8                    ol8_appstream
oracle-database-preinstall-21c.x86_64                    1.0-1.el8                    ol8_appstream

oracle-database-preinstall-19c.x86_64 패키지를 설치한다.

[root@localhost ~]# dnf install oracle-database-preinstall-19c

Continue reading

Cisco Nexus 7000 수퍼바이저 모듈 파워다운

Cisco Nexus 7000 수퍼바이저 모듈 powered down.

Active supervisor 상태가 powered-dn 으로 바뀌고 standby 모듈이 active 상태가 되었으며, 경고등이 점등된 상태.

vdc-2 에서는 아래와 같은 로그를 확인 할 수 있었다.

2023 Aug 21 13:30:24 Backbone_2-Main %PLATFORM-2-MOD_PWRDN: Module 5 powered down (Serial number )
2023 Aug 21 13:30:24 Backbone_2-Main %PLATFORM-5-MOD_STATUS: Module 5 current-status is MOD_STATUS_CONFIGPOWERED_DOWN
2023 Aug 21 13:30:24 Backbone_2-Main %PLATFORM-5-MOD_STATUS: Module 5 current-status is MOD_STATUS_POWERED_DOWN
2023 Aug 21 13:30:25 Backbone_2-Main %PLATFORM-2-MOD_REMOVE: Module 5 removed (Serial number )

Continue reading

Nexus 7K module, Online Diag Status Fail.

시스코 Nexus7K, Online Diag Status Fail.

1. show module 명령어 실행 결과 에서 module 10의 diagnostic 상태 Fail을 확인함.

SWITCH# show module

...

Mod  Online Diag Status
---  ------------------
1    Pass
3    Pass
5    Pass
6    Pass
8    Pass
10   Fail

...

Continue reading

vmware esxi 공유 디스크 설정.

VMware esxi shared VMDK(vmware disk file)

공유디스크는 오라클 RAC나 마이크로소프트 MSCS 등의 클러스터링 소프트웨어를 사용하려면 필요하게 된다.
Vmware VM 상에서 이것을 구현하려면 Multi-writer VMDK 를 만들어 사용하면 된다.

* multi-writer 디스크의 제약 조건

  • 실행중인 vm을 다른 호스트나 데이터 저장소로 온라이 마이그레이션 할 수 없다.
  • 디스크를 온라인 확장할 수 없다.
  • 공유디스크를 사용하는 VM을 일시정지 할 수 없다.

이 외 다수의 제약조건이 존재한다.

* 양쪽 vm(vm1, vm2)에 scsi 컨트롤러 추가

설정편집 – > 새 디바이스 추가 -> SCSI 컨트롤러 선택

Continue reading

nexus 9000 비밀번호 초기화

모델: cisco Nexus9000 C93108TC-FX3P

설정한 비밀 번호를 알 수 없는 경우, 아래와 같은 과정을 거쳐 새로 설정한다.

1. 스위치와 콘솔케이블을 연결한다. 속도는 9600bps

2. 부팅이 시작될 때 Ctrl+C 키를 눌러서 ‘loader > ‘프롬프트로 진입한다.

CISCO MODULE
BIOS Ver: 5.47
Switch G5
RC Revision:  02.03.00

Memory Information:
...

Board Type: N9K-C93108TC-FX3P

Bootable Disk is detected. Device Name: INTEL SSDSCKKB240G8K
Version 2.18.1260. Copyright (C) 2022 American Megatrends, Inc.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
Xilinx FPGA
FPGA SPI Flash Micron(Numonyx) N25Q128
Board type  4
IOFPGA @ 0xd8000000
SLOT_ID @ 0xf
Set fan speed to 60%
Initializing fan controller...
Aborting config file read and autoboot
No autoboot or failed autoboot. falling to loader



                Loader Version 5.47

loader > 

Continue reading

리눅스 파일시스템 늘이기 – vmware guest os.

리눅스 파일시스템 늘이기 – vmware guest os.

vmware나 kvm등 가상머신을 사용하다 보면, guest vm의 디스크가 모자랄 때가 생긴다.
이때, 가상 디스크를 추가하고 mount해서 사용해도 되지만 디스크를 증가시키고 파일시트템을 증가시켜야 할 때도 생긴다.

아래는 vsphere를 사용하여 guest 디스크를 늘인 다음, 파일시스템(여기서는 xfs로 포맷함)을 늘이는 방법이다.

1. Guest OS(ubuntu 22.04)에서 하드 디스크 확인.

parted 명령으로 디스크 크기를 확인해 보면 26.8GB인 것을 볼 수 있다.

snowfox@foo:~$ sudo parted -l
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 26.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  1128MB  1127MB  fat32              boot, esp
 2      1128MB  26.8GB  25.7GB  xfs

파일 시스템은 아래처럼 /sd1, /sda2로 나눠져 있다.

snowfox@foo:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           393M  736K  392M   1% /run
/dev/sda2        24G  9.0G   15G  38% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda1       1.1G  6.1M  1.1G   1% /boot/efi
tmpfs           393M  8.0K  393M   1% /run/user/1000

Continue reading