顯示具有 Linux 標籤的文章。 顯示所有文章
顯示具有 Linux 標籤的文章。 顯示所有文章

2020年2月6日

After P2V (vmware Converter Standalone), RedHat Linux Server Can not boot. (Kernel panic)

After P2V (vmware Converter Standalone), RedHat Linux Server Can not boot.

error message:

setuproot: moving /dev failed: No such file or directory
mount: could not find filesystem '/dev/root'
setuproot: error mounting /proc: No such file or directory
setuproot: error mount /sys:  No such file or directory
switchroot: mount filed:  No such file or directory
Kernel panic - not syncing: Attempted to kill init!


  1.  Boot from RHEL Installation media.
  2.  F5    -->  linux rescue  
  3. chroot /mnt/sysimage/

recover boot image.

1. backup boot image
    mv /boot/initrd-2.6.18-128.el5xen.img  backup_initrd-2.6.18-128.el5xen.img 

2. build new boot image
    /sibn/mkinitrd 
/boot/initrd-2.6.18-128.el5xen.img 2.6.18-128.el5xen
3. exit

reboot.

2019年5月13日

[Linux] rsh login fails with error "remuser too long"

rsh login fails with error "remuser too long"


Environment
  • Red Hat Enterprise Linux 6
Issue
  • rsh login fails with error "remuser too long"
Resolution
Username should be less than 16 bytes when using rsh.

Root Cause

Username limitation 16bytes can be found in rshd source code:
static void
doit(struct sockaddr_storage *fromp, socklen_t fromlen)
{
        char *cmdbuf;
        long cmdbuflen;
        const char *theshell, *shellname;
        char locuser[16], remuser[16];
...
        getstr(remuser, sizeof(remuser), "remuser");  <=========

2014年12月17日

RedHat Enterprise Linux 4 Network Bonding

1.  Edit /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
IPADDR=xx.xx.xx.xx
NETWORK=xx.xx.xx.xxx
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

2.  Edit /etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
TYPE=Ethernet
MASTER=bond0
SLAVE=yes

3.  Edit /etc/sysconfig/network-scripts/ifcfg-eth1

Device=eth1
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
TYPE=Ethernet
MASTER=bond0
SLAVE=yes

4. Edit /etc/modprobe.conf  ( RHEL 4 only, do not modify on RHEL 5 )

alias bond0 bonding
options bond0 mode=1 miimon=100

5. Module probe.

$ modprobe bonding

6. Restart network 

$ service network restart

7. Check

$ less /proc/net/bonding/bond0

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:19:bb:21:54:c0

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:19:bb:21:54:ae


---
refer:
1.  /usr/share/doc/iputils-20020927/README.bonding
2. for RHEL 5 , refer: Channel Bonding Interface

2013年1月3日

Linux Delete files before 15days


Delete files before 15 days
   find . -mtime +15 -exec rm {} \;  

2013年1月2日

Linux kernel.tainted


kernel.tainted:

Non-zero if the kernel has been tainted.  Numeric values, which can be ORed together:

   1 - A module with a non-GPL license has been loaded, this includes modules with no license.
       Set by modutils >= 2.4.9 and module-init-tools.
   2 - A module was force loaded by insmod -f.
       Set by modutils >= 2.4.9 and module-init-tools.
   4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
   8 - A module was forcibly unloaded from the system by rmmod -f.
  16 - A hardware machine check error occurred on the system.   (mcelog)
  32 - A bad page was discovered on the system.
  64 - The user has asked that the system be marked "tainted".  This could be because they are running software that directly modifies the hardware, or for other reasons.
 128 - The system has died.
 256 - The ACPI DSDT has been overridden with one supplied by the user instead of using the one provided by the hardware.
 512 - A kernel warning has occurred.
1024 - A module from drivers/staging was loaded.
2048 - The system is working around a severe firmware bug.
4096 - An out-of-tree module has been loaded.

2012年2月29日

udev

紀念 四年一次的 229... 來個小點心..

/etc/udev/rules.d/70-persistent-net.rules

nic 異動時, 確認該檔內容及 udev-post service 有否正常啟動..