Thursday, August 10, 2017

Linux Notes


#ps -ef | grep init
#rpm -qa |grep -i system-config-kickstart
#which init
Power on -> BIOS (RAM,kb,mouse,storage,etc)-> bootable media (MBR 512 bytes --bootcode stage1 grub)-->grub stage 1.5 -> menu -> select OS
#ls -ltr

stage 2 init process
#ps -ef |grep -i mingetty
power on -> bios ->mbr -grub(stage1)->grub (stage1.5)-> grub(stage2)->init->/etc/inittab->sets up the appropriate runlevel
#cd /etc/rc.d
#ls -ltr
bios -> grub -> init ->

Rescue environment

hda,sda = hd0, hda1,sda1 = hd0,0 first hard drive, first partition
linux partitions won't be found in the case of /etc/fstab is deleted
mkdir /mnt/sysimage
mount /dev/sda2  /mnt/sysimage/ #/dev/sda2 should be /
cd /mnt/sysimage

echo $? 0 means the previous command is executed correctly

seq 5 5 20  # start number increment and limitation