view · edit · history · print

Installation & Troubleshooting notes

  
file -s /dev/hda6 #=> type partition
fdisk -l /dev/hda6 #=> partition dimensions
fdisk -l /dev/hda #=> disk partitions
#fdisk type x82 = Linux swap
#fdisk type x83 = Linux

mkswap /dev/<hd> [nr_of_1024-byte_blocks]
swapon /dev/<hd>
dd if=/dev/zero of=/swapfile1.swp bs=1024 count=1024k ###> 1GiB
mkswap /swapfile1.swp
swapon /swapfile1.swp

mke2fs /dev/fd0 1440
e2fsck -b 8193 /dev/hda1 #=> restore Superblock
...elaborate on Superblocks...
mkfs -n /dev/hda1 to list filesystem info including alternate superblocks!

reiserfsck --check
echo $?
if 0 it should be OK
if 1 run reiserfsck --fix-fixable
if 2 run reiserfsck --rebuild-tree
"can't find reiserfs" use reiserfsck --rebuild-sb (SuperBlock)

dd if=/dev/hda of=/archive/hda.mbr_backup bs=512 count=1
fdisk /mbr #under DOS
dd if=/dev/zero of=/dev/hda bs=512 count=1

# classic lilo changes
vi /etc/lilo.conf
lilo
# Alternative locations
/boot/lilo.conf
/boot/silo.conf


# classic grub changes
vi /boot/grub/grub.conf
grub-install /dev/hda
# remove fd0 - entry from devices.map file if grub-install takes too long

/boot/grub/menu.lst ->  => Debian
/boot/grub/grub.conf => Red Hat
# Don't touch the file, use YAST!!! => SUSE

# Boot Linux with GRUB CLI
grub> root (hd0,[tab]
      => grub now lists partitions
grub> root (hd0,0)
grub> kernel /boot/[tab]
      => grub now lists files
grub> kernel /boot/vmlinuz root=/dev/hda1 ro
grub> boot

Boot Windows with GRUB CLI
grub> rootnoverify (hd0,0)
grub> makeactive => optional
grub> chainloader +1
grub> boot

# Serial connector:
/etc/inittab
s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100

# Keymap:
$ loadkeys -d => shows and load default keymap
go to keymap path (shown by the prev. command) and 
browse for the azerty map or search:
$ locate azerty*map
$ find / -name "azerty*map"
Then copy the map to the default value or load it now, like this:
$ loadkeys /usr/share/kbd/keymaps/i386/azerty/azerty.kmap.gz
$ loadkeys be-latin1.map
Search google for a file => azerty intitle:"index of"
$ system-config-keyboard # config in Centos

# Setup scripts and tools:
SUSE: yast, yast2, Sax
RedHat: Xconfigurator
Slackware: pkgtool
XFree86: xf86config, XF86Config

# Config file locations:
/etc/(X11/)XF86Config

rpm query parameters to get more info:
  -q     = query installed rpm
  -qp    = query on uninstalled rpm files
  -q[p]i = package description
  -q[p]R = requirements to install this package
  -q[p]l = list of files belonging to this package
  -qa    = list all installed packages (query rpm DB)
  -qf <fullpath_and_filename> = to which package belongs this file?
Install/uninstall parameters:
  -Uvh   = install (-U (upgrade) as alternative to -i)
  -e     = uninstall (erase)

tcpdump quickref (memorise these)
  -n No resolving (numeric) of internet adresses.
  -nn Don’t convert protocol and port numbers etc. to names either.
  -i Interface, name as shown in ifconfig (interface argument of ‘‘any’’ can be used).
  -l Make  stdout  line  buffered
  -p don't use promiscuous mode, use it if not needed.
  -q quiet, less output.
examples
[root@serv ~]# tcpdump -n -nn -i any -p port 3299
host helios and \( hot or ace \)
host segotl0243 and not port 2049
tcp port 22 and not host 131.97.222.113
not host \(segotl0225 or segotl0243 or segotl0244 or segotl0367 or duvel-cache-got2 or vg390\) and not port 2049
not host \(segotl0225 or segotl0243 or segotl0244 or segotl0367 or vg390 or r3rtr\) and not port \(2049 or 22\) and not arp
and not ; ip ; not arp ; host 127.0.0.1 ; net 10.66.192


# SMTP troubleshooting
telnet <host> 25 enter
helo <domain> enter 
mail from: <email> enter 
rcpt to: <email> enter 
data enter 
To: <displayname> enter (optional) 
From: <displayname> enter (optional) 
Subject: <title> enter (optional) 
<bodytext> enter enter 
. enter 
quit enter

cp -Rfh /var/root/* /root/
tar -cvf - . | (cd /root; tar -xvf -)
find . | cpio -pvdm /root
find . -type d -exec mkdir /root/{} \; find . -type f -exec cp -fhp {} /root/ \;

# set proxy for wget and apt-get
http_proxy=http://prox.company.com:8080
ftp_proxy=http://prox.company.com:8080

# for rsync
RSYNC_PROXY=http://prox.company.com:8080

# dhcp client
/sbin/dhclient

# disable beep ; dont beep ; nobeep
setterm -blength 0
xset b off



GRUB hint:

A good idea would be to investigate the option and put the config somewhere off your Liux partition(s) and read it out if nessesary with "grub> configfile (fd0)/menu.lst". And update the MBR with "grub> setup (hd0)" somewhere after the "grub> root ...".

admin · attr · attach · edit · history · print
Page last modified on April 28, 2014, at 05:09 AM