Archive

Archive for September, 2011

how to setup serial console on ubuntu debian fedora centos linux

September 6, 2011 Leave a comment

Practical in Ubuntu: setserial, minicom application requires.

Test my console is it DB9 or USB?

# dmesg | grep tty ;this is for USB
[    0.000000] console [tty0] enabled
[ 4718.771404] usb 3-1: pl2303 converter now attached to ttyUSB0
[ 7828.000574] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[10878.054407] usb 3-1: pl2303 converter now attached to ttyUSB0
$ dmesg | grep tty ; this is for COM1
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.38-11-generic-pae root=UUID=f5afb2f7-bcb2-4c3c-8cd1-0e898e0dc292 ro console=tty0 console=ttyS0,9600n8 quiet splash vt.handoff=7
[    0.000000] console [tty0] enabled
[    0.000000] console [ttyS0] enabled
[    1.155514] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.336144] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    1.513380] 00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.534132] 00:0b: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    1.554757] 0000:00:16.3: ttyS4 at I/O 0xf140 (irq = 19) is a 16550A
# setserial -g /dev/ttyUSB[0123] /dev/ttyS[0123]
/dev/ttyUSB0, UART: 16654, Port: 0x0000, IRQ: 0
/dev/ttyS0, UART: unknown, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3
Server setup
vim /etc/default/grub ; This is for Grub2
GRUB_CMDLINE_LINUX='console=tty0 console=ttyS0,9600n8' 
GRUB_TERMINAL=serial 
GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"
:w
update-grub
vim /etc/inittab ; This is for login 
T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
vim /etc/securetty ; This is to check security ttyS0 or ttyUSB0 open
ttyS0 #showing...
init 6 ; reboot once
Server Connect
# cat /etc/minirc.dfl 
# Machine-generated file - use "minicom -s" to change parameters.
pu port             /dev/ttyUSB0
pu baudrate         9600
pu bits	8
pu parity N
pu stopbits 1
pu rtscts No
# minicom -s -c on

Fedora 16 how to install from VNC, without having trouble?

September 4, 2011 Leave a comment

F16, isolinux.cfg, for working sample.

default vesamenu.c32
#prompt 1
timeout 600

display boot.msg

menu background splash.jpg
menu title Welcome to Fedora 16-Alpha!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000

label linux
  menu label ^Install a new system or upgrade an existing system
  menu default
  kernel vmlinuz
  append initrd=initrd.img quiet ksdevice=em1 ip=192.168.1.125 netmask=255.255.255.0 gateway=192.168.1.1 vnc keymap=us lang=en_US.UTF-8 selinux=0
label vesa
  menu label Install system with ^basic video driver
  kernel vmlinuz
  append initrd=initrd.img xdriver=vesa nomodeset quiet
label rescue
  menu label ^Rescue installed system
  kernel vmlinuz
  append initrd=initrd.img rescue quiet
label local
  menu label Boot from ^local drive
  localboot 0xffff
label memtest86
  menu label ^Memory test
  kernel memtest
  append -

Reference: 
http://fedoraproject.org/wiki/Anaconda_Boot_Options
http://docs.fedoraproject.org/en-US/Fedora/15/html/Installation_Guide/ch-Boot-x86.html#s2-x86-starting-bootopts
http://be.mirror.eurid.eu/fedora/linux/releases/test/16-Alpha/Fedora/i386/iso/
http://www.redhat.com/archives/kickstart-list/2011-February/msg00041.html
http://www.centos.org/docs/5/html/5.2/Installation_Guide/s1-kickstart2-startinginstall.html
Categories: Fedora 12, Unix/Linux

Linux how to make iso file and write to usb as bootable. Or how to make iso to customized iso and then repack to use in cdrom or usb

September 3, 2011 Leave a comment

Download the iso file original one. Extract it to somewhere first. Lets say /tmp/centos

To make USB bootable

1. Modify or Add isolinux/ks.cfg

install

lang en_US.UTF-8

keyboard us

timezone –utc Europe/Brussels

rootpw –iscrypted $6$i5qEWD.

selinux –disabled

authconfig –enableshadow –passalgo=sha512

firewall –service=ssh

bootloader –location=mbr –driveorder=sda –append=”rhgb quiet”

vnc –password=1234

network –bootproto=static –ip=192.168.1.125 –netmask=255.255.255.0 –gateway=192.168.1.1 –nameserver=192.168.1.1

 

2. Make ISO

# mkisofs -o /tmp/cd.iso /home/sun/Downloads/centos/
I: -input-charset not specified, using utf-8 (detected in locale settings)
Using RPM_G000.;1 for  /RPM-GPG-KEY-CentOS-Security-6 (RPM-GPG-KEY-CentOS-Testing-6)
Using RPM_G001.;1 for  /RPM-GPG-KEY-CentOS-Testing-6 (RPM-GPG-KEY-CentOS-Debug-6)
Using RPM_G002.;1 for  /RPM-GPG-KEY-CentOS-Debug-6 (RPM-GPG-KEY-CentOS-6)
Using KS000.CFG;1 for  /home/sun/Downloads/centos/isolinux/ks.cfg (ks.cfg~)
Using DEVIC000.RPM;1 for  /home/sun/Downloads/centos/Packages/device-mapper-event-1.02.53-8.el6.i686.rpm (device-mapper-multipath-libs-0.4.9-31.el6.i686.rpm)
Using DEVIC001.RPM;1 for  /home/sun/Downloads/centos/Packages/device-mapper-multipath-libs-0.4.9-31.el6.i686.rpm (device-mapper-1.02.53-8.el6.i686.rpm)
Using IPTAB000.RPM;1 for  /home/sun/Downloads/centos/Packages/iptables-1.4.7-3.el6.i686.rpm (iptables-ipv6-1.4.7-3.el6.i686.rpm)
Using SELIN000.RPM;1 for  /home/sun/Downloads/centos/Packages/selinux-policy-targeted-3.7.19-54.el6.noarch.rpm (selinux-policy-3.7.19-54.el6.noarch.rpm)
Using OPENS000.RPM;1 for  /home/sun/Downloads/centos/Packages/openssh-server-5.3p1-20.el6.i686.rpm (openssh-clients-5.3p1-20.el6.i686.rpm)
Using NCURS000.RPM;1 for  /home/sun/Downloads/centos/Packages/ncurses-base-5.7-3.20090208.el6.i686.rpm (ncurses-5.7-3.20090208.el6.i686.rpm)
Using OPENS001.RPM;1 for  /home/sun/Downloads/centos/Packages/openssh-clients-5.3p1-20.el6.i686.rpm (openssh-5.3p1-20.el6.i686.rpm)
Using E2FSP000.RPM;1 for  /home/sun/Downloads/centos/Packages/e2fsprogs-libs-1.41.12-3.el6.i686.rpm (e2fsprogs-1.41.12-3.el6.i686.rpm)
Using CRACK000.RPM;1 for  /home/sun/Downloads/centos/Packages/cracklib-2.8.16-2.el6.i686.rpm (cracklib-dicts-2.8.16-2.el6.i686.rpm)
Using COREU000.RPM;1 for  /home/sun/Downloads/centos/Packages/coreutils-8.4-9.el6.i686.rpm (coreutils-libs-8.4-9.el6.i686.rpm)
Using NCURS001.RPM;1 for  /home/sun/Downloads/centos/Packages/ncurses-5.7-3.20090208.el6.i686.rpm (ncurses-libs-5.7-3.20090208.el6.i686.rpm)
Using NSS_S000.RPM;1 for  /home/sun/Downloads/centos/Packages/nss-softokn-freebl-3.12.7-1.1.el6.i686.rpm (nss-softokn-3.12.7-1.1.el6.i686.rpm)
Using FIPSC000.RPM;1 for  /home/sun/Downloads/centos/Packages/fipscheck-1.2.0-4.1.el6.i686.rpm (fipscheck-lib-1.2.0-4.1.el6.i686.rpm)
Using DEVIC002.RPM;1 for  /home/sun/Downloads/centos/Packages/device-mapper-1.02.53-8.el6.i686.rpm (device-mapper-multipath-0.4.9-31.el6.i686.rpm)
Using NFS_U000.RPM;1 for  /home/sun/Downloads/centos/Packages/nfs-utils-lib-1.1.5-1.el6.i686.rpm (nfs-utils-1.2.2-7.el6.i686.rpm)
Using PLYMO000.RPM;1 for  /home/sun/Downloads/centos/Packages/plymouth-0.8.3-17.el6.centos.i686.rpm (plymouth-scripts-0.8.3-17.el6.centos.i686.rpm)
Using DEVIC003.RPM;1 for  /home/sun/Downloads/centos/Packages/device-mapper-multipath-0.4.9-31.el6.i686.rpm (device-mapper-event-libs-1.02.53-8.el6.i686.rpm)
Using CRYPT000.RPM;1 for  /home/sun/Downloads/centos/Packages/cryptsetup-luks-1.1.2-2.el6.i686.rpm (cryptsetup-luks-libs-1.1.2-2.el6.i686.rpm)
Using LIBSE000.RPM;1 for  /home/sun/Downloads/centos/Packages/libselinux-2.0.94-2.el6.i686.rpm (libselinux-utils-2.0.94-2.el6.i686.rpm)
Using PLYMO001.RPM;1 for  /home/sun/Downloads/centos/Packages/plymouth-scripts-0.8.3-17.el6.centos.i686.rpm (plymouth-core-libs-0.8.3-17.el6.centos.i686.rpm)
Using DEVIC004.RPM;1 for  /home/sun/Downloads/centos/Packages/device-mapper-event-libs-1.02.53-8.el6.i686.rpm (device-mapper-libs-1.02.53-8.el6.i686.rpm)
  3.80% done, estimate finish Sun Sep  4 00:47:49 2011
  7.60% done, estimate finish Sun Sep  4 00:47:49 2011
 11.40% done, estimate finish Sun Sep  4 00:47:57 2011
 15.19% done, estimate finish Sun Sep  4 00:47:55 2011
 18.98% done, estimate finish Sun Sep  4 00:47:59 2011
 22.78% done, estimate finish Sun Sep  4 00:47:57 2011
 26.58% done, estimate finish Sun Sep  4 00:47:56 2011
 30.37% done, estimate finish Sun Sep  4 00:47:58 2011
 34.17% done, estimate finish Sun Sep  4 00:47:57 2011
 37.96% done, estimate finish Sun Sep  4 00:47:56 2011
 41.76% done, estimate finish Sun Sep  4 00:48:00 2011
 45.56% done, estimate finish Sun Sep  4 00:48:02 2011
 49.36% done, estimate finish Sun Sep  4 00:48:03 2011
 53.15% done, estimate finish Sun Sep  4 00:48:02 2011
 56.94% done, estimate finish Sun Sep  4 00:48:03 2011
 60.74% done, estimate finish Sun Sep  4 00:48:05 2011
 64.53% done, estimate finish Sun Sep  4 00:48:04 2011
 68.34% done, estimate finish Sun Sep  4 00:48:05 2011
 72.13% done, estimate finish Sun Sep  4 00:48:04 2011
 75.93% done, estimate finish Sun Sep  4 00:48:04 2011
 79.72% done, estimate finish Sun Sep  4 00:48:04 2011
 83.52% done, estimate finish Sun Sep  4 00:48:04 2011
 87.31% done, estimate finish Sun Sep  4 00:48:03 2011
 91.11% done, estimate finish Sun Sep  4 00:48:04 2011
 94.90% done, estimate finish Sun Sep  4 00:48:04 2011
 98.70% done, estimate finish Sun Sep  4 00:48:05 2011
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 18432
Path table size(bytes): 86
Max brk space used 22000
131714 extents written (257 MB)

3. yum -y install unetbootin.i686
4. unetbootin load
5. load your /tmp/cd.iso and burn it to your USB stick

Done.
Categories: centOS, Fedora 12

How to make anaconda and kickstart?

September 3, 2011 Leave a comment

I do not have keyboard and mouse. And i need to install OS. So that from my laptop i can apply keyboard and mouse signal.

1. http://docs.fedoraproject.org/en-US/Fedora/13/html/Installation_Guide/VNC_Whitepaper-vnc-modes-in-anaconda.html

2. make a file like following called ks.cfg

vnc

Allows the graphical installation to be viewed remotely via VNC. This method is usually preferred over text mode, as there are some size and language limitations in text installs. With no options, this command will start a VNC server on the machine with no password and will print out the command that needs to be run to connect a remote machine.

vnc [--host=<hostname>] [--port=<port>] [--password=<password>]

--host=

Instead of starting a VNC server on the install machine, connect to the VNC viewer process listening on the given hostname.

--port=

Provide a port that the remote VNC viewer process is listening on. If not provided, anaconda will use the VNC default.

--password=

Set a password which must be provided to connect to the VNC session. This is optional, but recommended.
# Kickstart file automatically generated by anaconda.
install
lang en_US.UTF-8
keyboard us
timezone –utc Europe/Brussels
rootpw –iscrypted $6.VRqMr <<<< i changed it anyone can decode and find my password 🙂
selinux –enforcing
authconfig –enableshadow –passalgo=sha512
firewall –service=ssh
bootloader –location=mbr –driveorder=sda –append=”rhgb quiet”
vnc –password=1234

Creating a Kickstart Boot CD-ROM

To perform a CD-ROM-based kickstart installation, the kickstart file must be named ks.cfg and must be located in the boot CD-ROM’s top-level directory. Since a CD-ROM is read-only, the file must be added to the directory used to create the image that is written to the CD-ROM. Refer to the Making an Installation Boot CD-ROM section in the Red Hat Enterprise Linux Installation Guide for instruction on creating a boot CD-ROM; however, before making the file.iso image file, copy the ks.cfg kickstart file to the isolinux/ directory.

 

done.

 

Note: if you want to have fix ip, check out this http://fedoraproject.org/wiki/Anaconda/Kickstart#network

 

Categories: Fedora 12, Unix/Linux