วันศุกร์ที่ 2 มกราคม พ.ศ. 2558

รำลึกความหลังกับ RedHat ด้วย CentOS

        Linux ตัวแรกที่ผมใช้คือ Slackware ตามมาด้วยเจ้าหมวกแดง RedHat หลัง ๆ มา
เจ้าหมวกแดงไม่ได้เป็น Opensource software เสียแล้วเลยห่างหายจากการจัดการไฟล์
และเซิร์ฟเวอร์ด้วย RPM Package ไปนานทั้งที่รู้ว่าค่ายหมวกแดงได้พัฒนาลินุกซ์ดิสทริบิวชั่น
ใหม่ เช่น Fedora และ CentOS มาให้ดาวน์โหลดใช้ฟรีอยู่ก็ตาม  อีกทั้งระยะหลังผมไปหลง
เสน่ห์ลินุกซ์ตระกูล Debian และเครือข่ายไม่ว่าจะเป็น Debian, Ubuntu และ Linuxmint อยู่กว่า
สิบปี


        วันนี้ลองดาวน์โหลด CentOS 6.6 ตัวสุดท้ายที่ใช้กับคอมพิวเตอร์สถาปัตยกรรม i386
ที่ตกรุ่นไปนับสิบปี  ผลการทดลองใช้เป็นที่น่าพอใจเลยทีเดียว  การจัดการแพคเกจก็ง่าย
CentOS ใช้แพคเกจ RPM ของ RedHat บนเท็กซ์โหมดใช้คำสั่ง yum ตัวเดียวก็ติดตั้งแพคเกจ
ทั้งหลายได้ดั่งใจ เช่นเดียวกับ Debian และบริวารมีคำสั่ง apt-get และ aptitude หรือ OpenSUSE
มี yast เป็นของตัวเอง
        ลองดูหน้าตาของ CentOS 6.6 รันบน Acer Aspire NetBook รุ่นโบราณ ๆ Cent OS ได้ดึง
เอาสมรรถนะของ NetBook เก่า ๆ มาใช้ได้เต็มที่เลยทีเดียว ลองดูหน้าเดสค์ทอปครับ





        ส่วนสองภาพข้างล่างนี้เป็นข้อมูลเกี่ยวกับระบบปฏิบัติการ และการใช้ทรัพยากรของระบบ



วันพุธที่ 28 พฤษภาคม พ.ศ. 2557

GRUB MAC-OSX

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod reiserfs
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root 755649ae-4335-4aea-bec7-ee436ef3e037
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod reiserfs
  set root='(hd0,msdos5)'
  search --no-floppy --fs-uuid --set=root 755649ae-4335-4aea-bec7-ee436ef3e037
  set locale_dir=($root)/boot/grub/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
        set vt_handoff=vt.handoff=7
    else
        set vt_handoff=
    fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.2.0-29-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod reiserfs
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 755649ae-4335-4aea-bec7-ee436ef3e037
    linux    /boot/vmlinuz-3.2.0-29-generic-pae root=UUID=755649ae-4335-4aea-bec7-ee436ef3e037 ro   quiet splash $vt_handoff
    initrd    /boot/initrd.img-3.2.0-29-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-29-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod gzio
    insmod part_msdos
    insmod reiserfs
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 755649ae-4335-4aea-bec7-ee436ef3e037
    echo    'Loading Linux 3.2.0-29-generic-pae ...'
    linux    /boot/vmlinuz-3.2.0-29-generic-pae root=UUID=755649ae-4335-4aea-bec7-ee436ef3e037 ro recovery nomodeset
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-3.2.0-29-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod reiserfs
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 755649ae-4335-4aea-bec7-ee436ef3e037
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod reiserfs
    set root='(hd0,msdos5)'
    search --no-floppy --fs-uuid --set=root 755649ae-4335-4aea-bec7-ee436ef3e037
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root F42C1DEA2C1DA89E
    chainloader +1
}
menuentry "Mac OS X (32-bit) (on /dev/sda3)" --class osx --class darwin --class os {
    insmod hfsplus
    set root='(hd0,msdos3)'
        multiboot /boot  
}
menuentry "Mac OS X (64-bit) (on /dev/sda3)" --class osx --class darwin --class os {
    insmod part_msdos
    insmod hfsplus
    set root='(hd0,msdos3)'
    search --no-floppy --fs-uuid --set=root 749244a503c856fe
        load_video
        set do_resume=0
        if [ /var/vm/sleepimage -nt10 / ]; then
           if xnu_resume /var/vm/sleepimage; then
             set do_resume=1
           fi
        fi
        if [ $do_resume = 0 ]; then
           xnu_uuid 749244a503c856fe uuid
           if [ -f /Extra/DSDT.aml ]; then
              acpi -e /Extra/DSDT.aml
           fi
           xnu_kernel64 /mach_kernel boot-uuid=${uuid} rd=*uuid
           if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
              xnu_mkext /System/Library/Extensions.mkext
           else
              xnu_kextdir /System/Library/Extensions
           fi
           if [ -f /Extra/Extensions.mkext ]; then
              xnu_mkext /Extra/Extensions.mkext
           fi
           if [ -d /Extra/Extensions ]; then
              xnu_kextdir /Extra/Extensions
           fi
           if [ -f /Extra/devprop.bin ]; then
              xnu_devprop_load /Extra/devprop.bin
           fi
           if [ -f /Extra/splash.jpg ]; then
              insmod jpeg
              xnu_splash /Extra/splash.jpg
           fi
           if [ -f /Extra/splash.png ]; then
              insmod png
              xnu_splash /Extra/splash.png
           fi
           if [ -f /Extra/splash.tga ]; then
              insmod tga
              xnu_splash /Extra/splash.tga
           fi
        fi
}
menuentry "Linux Mint 14 Cinnamon 32-bit, 3.5.0-17-generic (/dev/sda7) (on /dev/sda7)" --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod reiserfs
    set root='(hd0,msdos7)'
    search --no-floppy --fs-uuid --set=root 21b287c8-9595-493e-a0de-fefeaba94d29
    linux /boot/vmlinuz-3.5.0-17-generic root=UUID=21b287c8-9595-493e-a0de-fefeaba94d29 ro quiet splash $vt_handoff
    initrd /boot/initrd.img-3.5.0-17-generic
}
menuentry "Linux Mint 14 Cinnamon 32-bit, 3.5.0-17-generic (/dev/sda7) -- recovery mode (on /dev/sda7)" --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod reiserfs
    set root='(hd0,msdos7)'
    search --no-floppy --fs-uuid --set=root 21b287c8-9595-493e-a0de-fefeaba94d29
    linux /boot/vmlinuz-3.5.0-17-generic root=UUID=21b287c8-9595-493e-a0de-fefeaba94d29 ro recovery nomodeset
    initrd /boot/initrd.img-3.5.0-17-generic
}
menuentry "Debian GNU/Linux, with Linux 3.2.0-4-686-pae (on /dev/sda8)" --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos8)'
    search --no-floppy --fs-uuid --set=root 72a14c6d-3552-4bbd-b937-aa88c5405e6a
    linux /boot/vmlinuz-3.2.0-4-686-pae root=UUID=72a14c6d-3552-4bbd-b937-aa88c5405e6a ro quiet
    initrd /boot/initrd.img-3.2.0-4-686-pae
}
menuentry "Debian GNU/Linux, with Linux 3.2.0-4-686-pae (recovery mode) (on /dev/sda8)" --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos8)'
    search --no-floppy --fs-uuid --set=root 72a14c6d-3552-4bbd-b937-aa88c5405e6a
    linux /boot/vmlinuz-3.2.0-4-686-pae root=UUID=72a14c6d-3552-4bbd-b937-aa88c5405e6a ro single
    initrd /boot/initrd.img-3.2.0-4-686-pae
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###