Showing posts with label Booting. Show all posts
Showing posts with label Booting. Show all posts

Clean reboot of hung Linux server : Quick HOWTO

In day to day system administration job, you may come across the situation that your Linux server is hung or freeze and your system is not responding even  for Ctrl+Alt+Del in console itself and you must need to do a hard reboot by pressing reset button. As everyone know, the hard reboots is not good and can crash the File systems. so what to do now?

There is a way in Linux,

Hold down the Right Alt and SysRq keys and press this sequence:

  R E I S U B

This will cleanly unmount the drives, terminate the processes and nicely reboot your machine.

of course, To get this worked, you need to “enable” this feature on the running kernel first !

On 2.6 kernel

echo 1 > /proc/sys/kernel/sysrq

This will do the trick.

In Some distributions, you may have a way to enable this feature at boot time. 

On Fedora and RHEL, edit the file /etc/sysctl.conf, and change the line kernel.sysrq = 0 to kernel.sysrq = 1

Hope this helps to some one..!

Automatic reboot after Kernel Panic in Linux

In Linux, By default after kernel panic, Linux waits for a system admin to restart or power cycle server.. We can change this behavior and set to reboot automatically when a kernel panic occurs.. For that, we have to change the value set on "kernel.panic" kernel parameter.


Now we have to check the current value on this kernel parameter in Linux server:

[root@myserver ~]# cat /proc/sys/kernel/panic
0
[root@myserver ~]# sysctl -a | grep kernel.panic
kernel.panic = 0

Recreate BOOT LOGICAL VOLUME (BLV) in AIX

If a Boot Logical volume (BLV) is corrupted, a machine will not boot.
(Eg:bad block in a disk might cause a corrupted BLV)

To fix this situation, You must boot your machine in maintenancemode, from a CD or Tape. If a NIM has been setup for a machine, you can also boot the machine from a NIM master in maintenance mode.

The bootlists are set using the bootlist command or through theSystem Management Services Progam (SMS). pressing F1 will go to SMS Mode.

then change the bootlist for service(maintenance) mode as 1st device to CD ROM.

Preparing reboot HPUX Server

Another nice article which I found on web

System administrators will often reboot their boxes because of certain need like patch installation and kernel parameter change. Below is a guide to properly shutdown and reboot the system.

THE PRE-WORK

1. Get important system information:

Common Information needed
# hostname
# date
# model
# uname -a
# uptime
# who -r

2. Gather filesystem information

CREATING A BOOT DISK – ROOT VOLUME in HP-UX

CREATING A BOOT DISK – ROOT VOLUME in HP-UX SERVER 


1. First create a bootable logical volume disk. 
#pvcreate –B /dev/rdsk/c0t1d0  


2. Add the PV to vg00. 
#vgextend /dev/vg00 /dev/dsk/c0t1d0
 

3. Place Boot Utilities on disk:   
#mkboot /dev/rdsk/c0t1d0 


4. Add the AUTO File to the LIF area:  
#mkboot –a “hpux –lq (;0)/stand/vmunix” /dev/rdsk/devicefile