Rabu, 27 Februari 2013

Update Repository Lokal Ubuntu

Update Repository lokal diperluakan agar list software dalam ubuntu semakin update atau lebih kompleks.
Biasanya kalau kita baru saja install ubuntu akan terasa sekali ubuntunya masih simpel banget.
Nah untuk merubah tampilan ubuntu dan menambah software-software ubuntu kita harus update sources listnya terlebih dahulu..


Langkah Pertama (buka terminal)
  • Pilih Applications - Accessories - Terminal
  • Atau bisa juga menggunakan ctrl+alt+t untuk keyboard shortcuts ubuntu 10.04

Langkah Kedua (konfigurasi list)
  • Masuk ke dalam root terlebih dahulu
$ sudo su

  • Buka file konfigurasi sources.list (silahkan menggunakan editor kesayangan anda, disini saya memakai editor pico)
# pico  /etc/apt/sources.list
Akan terdapat script berikut :

# deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://id.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://id.archive.ubuntu.com/ubuntu/ lucid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://id.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb-src http://id.archive.ubuntu.com/ubuntu/ lucid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://id.archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://id.archive.ubuntu.com/ubuntu/ lucid universe
deb http://id.archive.ubuntu.com/ubuntu/ lucid-updates universe
deb-src http://id.archive.ubuntu.com/ubuntu/ lucid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://id.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://id.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://id.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://id.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://id.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://id.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
deb http://security.ubuntu.com/ubuntu lucid-security universe
deb-src http://security.ubuntu.com/ubuntu lucid-security universe
deb http://security.ubuntu.com/ubuntu lucid-security multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse

  • Nah  Script di atas ganti saja dengan menghapus semua isi file atau menutup dengan tanda # yang berawalan dengan deb dan menggantinya atau menambahkan paling bawah dengan repository lokal. 
contoh :

deb http://kambing.ui.ac.id/ubuntu/ lucid-backports main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ lucid-security main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ lucid-updates main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu/ lucid main restricted universe multiverse

  • Alamat diatas dapat kita ganti dengan alamat reporitory lain yang bisa kita liat di 
Daftar repository lokal ubuntu 10.04 untuk ubuntu 10.04
Daftar repository lokal ubuntu 10.10 untuk ubuntu 10.10
  • Pilih salah satu alamat repository lokal  dan masukkan atau copy ke file sources.list seperti contoh diatas


Langkah Ketiga (simpan konfigurasi)
  • Simpan hasil konfigurasi diatas dengan menekan ctrl+o lalu enter
  • Dan keluar ke menu utama terminal dengan menekan ctrl+z


Langkah Keempat (update repository)
  • Setelah selesai mengganti isi file konfigurasi repository kita bisa lakukan update dengan cara
# apt-get update


 Langkah Kelima (install software)
  • Nah sekarang ubuntu telah memiliki repository yang baru dan lebih kompleks 
  • Sekarang kita bisa install software sesuai dengan selera dan kebutuhan
  • Instal software dengan mengetikkan 
# apt-get install (nama software)



Instalasi selesai, untuk instalasi silahkan install paket sesuai kebutuhan anda, bisa juga proses instalasi dipermudah dengan menggunakan GUI yaitu buka System-Administration-Synaptic Package Manager dan pilih software yang akan di install dengan memberi ceklist atau double click lalu apply

Installing Debian on OpenRD (Base and Client) / Cara Menginstall Debian Di Open RD (Base dan Client)

This page explains how to use the Debian installer to install Debian 6.0 (squeeze) on the OpenRD platform (OpenRD-Base, OpenRD-Client and OpenRD-Ultimate). The OpenRD has 512 MB flash memory and SATA, USB and MMC/SD card interfaces. The Debian installer doesn't currently support installations to MTD flash, but you can use it to install to a SATA disk, USB stick or MMC/SD card. In order to proceed, you will therefore need either a SATA disk (connected internally or via eSATA) or a USB stick (or disk). While USB sticks work fine, the current version of u-boot (the boot loader on the OpenRD) seems to have some trouble with USB hard disks... they will work but you may have to restart the device several times so u-boot will find the disk. There are also problems booting from USB when more than one USB device is connected.

Preparation

Make sure to connect an Ethernet cable to the GbE 0 port of your OpenRD (if you haven't already) because the installer will download files from the Internet for the installation.

Starting the Installer

First of all, you have to download the installer. Download the uImage and uInitrd and store them either on a USB stick or an TFTP server.
Now connect a mini-USB connector to System Debug in order to access the serial console. If you're running the Linux kernel 2.6.30.5 or higher or Debian's 2.6.26-20 kernel (or higher), the serial device will be recognized automatically. If you're using an older kernel, you have to pass some parameters when loading the ftdi_sio module:
rmmod ftdi_sio
modprobe ftdi_sio vendor=0x0403 product=0x9e90
Start your OpenRD and a few seconds later you should be able to connect to /dev/ttyUSB1 with 115200 baud. If you need help accessing the serial console, see the guides for Linux, Windows or MacOS X.
When you get serial output, press a key to interrupt the boot process. First of all, you have to change a setting so the device will boot the kernel which is used by Debian.
If you have an OpenRD-Base, please issue the following commands:
setenv mainlineLinux yes
setenv arcNumber 2325
saveenv
reset
If you have an OpenRD-Client, please issue the following commands:
setenv mainlineLinux yes
setenv arcNumber 2361
saveenv
reset
If you have an OpenRD-Ultimate, please issue the following commands:
setenv mainlineLinux yes
setenv arcNumber 2884
saveenv
reset

These commands will put in the correct settings and then restart the device so the changes will take effect.
Now you can load the installer. The instructions will depend on where you want to load the installer from. Also note that you may have to replace fatload with ext2load in case you used the ext2 or ext3 filesystem on your USB stick.
  • USB: If you stored the installer on a USB stick, please use:
    usb start
    fatload usb 0:1 0x01100000 /uInitrd
    fatload usb 0:1 0x00800000 /uImage
    
  • TFTP: if you want to load the installer via the network from a TFTP server, use this:
    setenv serverip 192.168.1.2
    setenv ipaddr 192.168.1.147
    tftpboot 0x01100000 uInitrd
    tftpboot 0x00800000 uImage
    
    Of course, you have to replace 192.168.1.2 with the IP address of your TFTP server.
Finally, start the installer:
setenv bootargs console=ttyS0,115200n8 base-installer/initramfs-tools/driver-policy=most
bootm 0x00800000 0x01100000

The Installation

The installation itself should be pretty standard and you can follow the installation guide. The installer knows about the OpenRD and will create a bootable kernel and ramdisk at the end of the installation. The installer will also offer a partition layout that is known to work. If you want to choose a different layout, make sure that you create a small (ca. 150 MB) /boot partition with the ext2 filesystem.
When the installation is done, you have to configure u-boot so it will automatically boot Debian. Interrupt the boot process of u-boot and enter the following commands.
If you're using a SATA disk, use these commands:
setenv bootargs_console console=ttyS0,115200
setenv bootcmd_sata 'ide reset; ext2load ide 0:1 0x01100000 /uInitrd; ext2load ide 0:1 0x00800000 /uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_sata; bootm 0x00800000 0x01100000'
saveenv
For USB, use this:
setenv bootargs_console console=ttyS0,115200
setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x01100000 /uInitrd; ext2load usb 0:1 0x00800000 /uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_usb; bootm 0x00800000 0x01100000'
saveenv
USB support in u-boot is quite flaky, so if there are problems booting from your USB device you can add ; reset at the end of bootcmd. This will cause the OpenRD to reboot when it fails to load the image and try again, until it finally manages to load it.
For MMC/SD, use this:
setenv bootargs_console console=ttyS0,115200
setenv bootcmd_mmc 'mmcinit; ext2load mmc 0:1 0x01100000 /uInitrd; ext2load mmc 0:1 0x00800000 /uImage'
setenv bootcmd 'setenv bootargs $(bootargs_console); run bootcmd_mmc; bootm 0x00800000 0x01100000'
saveenv
Please note that you may have to replace /uInitrd and /uImage with /boot/uInitrd and /boot/uImage depending on the way you installed Debian. By default, Debian will create a separate boot partition, so the full path to the kernel is /uImage. However, if you choose to put everything on the same partition, you have to use /boot/uImage.
Your OpenRD is now ready to boot Debian from the USB stick, MMC/SD card or SATA disk and it will automatically do so whenever you turn on your device. You can now type the following command to boot:
run bootcmd

Success

You should now have a complete Debian system running on your OpenRD. You can use apt-get and other tools to install additional software. The OpenRD is an ARM based device and the armel architecture is fully supported by Debian.
Finally, make sure to read the tips and tricks about running Debian on the OpenRD.
Go back to my Debian on OpenRD page.

Akses Port Console dengan Minicom

Labels: Port console merupakan sebuah port yang disediakan oleh sebuah device untuk konfigurasi device tersebut. Nah disini saya akan menjelaskan cara mengakses port console menggunakan aplikasi minicom dengan asumsi sistem operasi yang digunakan adalah Ubuntu.

Minicom merupakan sebuah aplikasi berbasis open source yang dapat diterapkan pada platform Linux. Aplikasi ini sangat mudah digunakan pada komunikasi serial.

Langkah Instalasi
Langkah instalasi pastikan source list repository telah terupdate yang bisa dilihat di sini untuk update source list.
Kemudian jalankan terminal dan masukkan perintah berikut
$ sudo apt-get install minicom

Langkah Konfigurasi
Dalam konfigurasi minicom gunakan perintah minicom -s
$ sudo minicom -s
Pilih "Serial port setup"

Untuk Serial Device, tekan A. dan sesuaikan dengan device yang ada.

Untuk mengetahui serial device yang digunakan ketikkan perintah dmesg
$ dmesg
Terlihat dari gambar di atas device menggunakan port ttyUSB0

  • Dan untuk konfigurasi clock rate tekan E, masukkan value dengan 9600.
  • Setelah konfigurasi selesai tekan "esc" dan simpan konfigurasi dengan pilih menu "Save setup as dfl".
  • Kemudian pilih "Exit".
  • Tunngu beberapa saat untuk inisialisasi device.
Konfigurasi switch sudah siap untuk digunakan