Play with Linux
my notes in my life, notes for my knowledge which is i get from www, especiali about linux and computer, for share to all my friend in outside
Monday, July 20, 2009
PCLinuxOS Installation Guide
If you logged in as guest it will ask for the root password to start
the installation wizard. The password for root is of course root.
Type in the root password and press ok. This will start the
installation program. Click Next to continue.
Please note if you attempted to install software while running
the livecd you may encounter problems installing to the hard drive.
Please reboot, do the install and then add software to your system.
Select the type of hard drive install and press Next.
Now you need to partition and format your hard drive. Please be
very careful with your selection. If you select Use existing partitions
or Erase and use entire disk it will auto select and FORMAT your
partitions. All data on those partitions will be lost forever. In addition
if you have Windows installed an additional option will be presented
allowing you to resize the windows partition to make room for Linux.
This is an experimental feature and should be used with caution.
Please make sure you have your Windows partition backed up before
attempting to resize it.
If you wish you can use Custom disk partitioning.
Lets start by partitioning the hard drive.
You need to set up 3 partitions. A swap partition, a /home partition
and a / partition. The swap partition is a temporary storage area
in the event you run out of memory. Linux can swap memory to
and from the swap partition as needed. As a general rule your
swap partition should be double your memory.
Now we have our swap partition created.
Next we need to set up a /home partition. This is where you can
store your personal data. The size of the home partition depends
on your personal needs. Since I am using a small hard drive I
selected about 2.0 gig (2000 mb). On large hard drives I would
recommend at least 10 gigs (10,000mb) or larger.
Now we have our /home partition created.
Finally we need a / partition. This is where all your data and programs
are stored. I selected to use the remaining space for my / partition. You
can either select the rest of the hard drive or set a size. A minimum
of approx 4 gigs (4,000 mb) is required though you probably want
to make it at least 10 (10,000 mb) if you wish to install additional
programs from our repository. Please note the default file system
type is ext3. You cannot install Linux to a fat32 or ntfs formatted
partition.
In some situations where you have deleted and re-created partitions
the installer will identify a partition as native ext2. In the event this
happens please press the Toggle to expert mode and select Type
and change it to Journalised FS: ext3.
Now we have our hard drive set up with a swap partition, a /home
partition and a / partition.
We are now ready to format the hard drive partitions. This is
your last chance to cancel out in the event you think you might
have made a mistake.
The install is now formatting your partitions.
We are ready to copy the system files from the livecd to your
hard drive. This process takes between 10-20 minutes depending
on the speed of your computer.
Once the files have been transferred to your hard drive we need to
set up the bootloader so that your new install can be booted from
the hard drive. The system defaults to Grub Graphical as the default bootloader
however you also can use Lilo. If this is your only Linux install you
can select to install to the MBR or Master Boot Record. If you already
have previous Linux installs on other partitions you can select to install
the bootloader to the partition for chain loading.
The Master Boot Record (MBR) will always be identified without a
partition number such as /dev/hda, /dev/sda or /dev/sdb.
As an example, if your /home partition and / partition is on /dev/hda5
and /dev/hda6 etc, you would install your bootloader to /dev/hda.
If your /home partition and / partition is on /dev/sdb5 and /dev/sdb6
etc, you would install your bootloader to /dev/sdb.
These are the default entries. If you have other Linux installs, you
can add them here.
You must set up a new root password. This is your administrator access
password. Normally you run Linux as a user and elevate yourself to
root access only when you need to perform various system functions.
This keeps Linux safe and secure. Write your root password down and
keep it in a safe and secure place. If you forget your root password
you wont be able to perform system tasks such as adding software or
configuring your system.
Enter the user name and password you will be using to log into
the system. If you have more than one user you can enter additional
users here. Once you are finished click the Done button.
The installer has finished installing PCLinuxOS to your computer and
you are ready to shut down and reboot.
Make internet connection with modem on your mobile
2. run shell in your linux desktop, in PCLinuxOS just double click Shell icon in desktop
3. type wvdialconf telkomsel (telkomsel is file configuration name which is created in Home folder of PCLinuxOS)
****
[root@localhost root]# wvdialconf telkomsel
Scanning your serial ports for a modem.
Port Scan<*1>: Scanning ttyS0 first, /dev/modem is a link to it.
Port Scan<*1>: S0 S1 S2 S3
WvModem<*1>: Cannot get information for serial port.
ttyACM0<*1>: ATQ0 V1 E1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 Z -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyACM0<*1>: Modem Identifier: ATI -- Nokia
ttyACM0<*1>: Speed 4800: AT -- OK
ttyACM0<*1>: Speed 9600: AT -- OK
ttyACM0<*1>: Speed 19200: AT -- OK
ttyACM0<*1>: Speed 38400: AT -- OK
ttyACM0<*1>: Speed 57600: AT -- OK
ttyACM0<*1>: Speed 115200: AT -- OK
ttyACM0<*1>: Speed 230400: AT -- OK
ttyACM0<*1>: Speed 460800: AT -- OK
ttyACM0<*1>: Max speed is 460800; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
Found an USB modem on /dev/ttyACM0.
Modem configuration written to telkomsel.
ttyACM0
****
4. and than, type kwrite telkomsel for editing your configuration file with text editor. in this example we use kwrite to edit this file. this is sample of plain configuration
****
[root@localhost root]# kwrite telkomsel
[Dialer Defaults]
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = USB Modem
; Phone =
; Username =
; Password =
****
5. for example, we use mobile gsm provider telkomsel, then the configuration is
****
[Dialer Defaults]
Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init3 = AT+CGDCONT=1,"IP","TELKOMSEL"
ISDN = 0
Modem Type = USB Modem
Phone = *99***1#
Username = wap
Password = wap123
****
6. save in /etc folder with file name wvdial.conf
7. for start your connection, just type wvdial on your Shell
8. having fun for surving on the net
9. for disconnection, just press ctrl+c
Friday, July 17, 2009
Before Installing Ubuntu
This section will walk you through pre-installation hardware setup, if any, that you will need to do prior to installing Ubuntu. Generally, this involves checking and possibly changing firmware settings for your system. The "firmware" is the core software used by the hardware; it is most critically invoked during the bootstrap process (after power-up). Known hardware issues affecting the reliability of Ubuntu on your system are also highlighted.
1. Invoking the BIOS Set-Up Menu
BIOS provides the basic functions needed to boot your machine to allow your operating system to access your hardware. Your system probably provides a BIOS set-up menu, which is used to configure the BIOS. Before installing, you must ensure that your BIOS is setup correctly; not doing so can lead to intermittent crashes or an inability to install Ubuntu.
"How do I enter the CMOS configuration menu?". How you access the BIOS (or "CMOS") configuration menu depends on who wrote your BIOS software:
AMI BIOS
Delete key during the POST (power on self test)
Award BIOS
Ctrl+Alt+Esc, or Delete key during the POST
DTK BIOS
Esc key during the POST
IBM PS/2 BIOS
Ctrl+Alt+Insert after Ctrl+Alt+Delete
Phoenix BIOS
Ctrl+Alt+Esc or Ctrl+Alt+S or F1
Some Intel x86 machines don't have a CMOS configuration menu in the BIOS. They require a software CMOS setup program. If you don't have the Installation and/or Diagnostics diskette for your machine, you can try using a shareware/freeware program.
2. Boot Device Selection
Many BIOS set-up menus allow you to select the devices that will be used to bootstrap the system. Set this to look for a bootable operating system on A: (the first floppy disk), then optionally the first CD-ROM device (possibly appearing as D: or E:), and then from C: (the first hard disk). This setting enables you to boot from either a floppy disk or a CD-ROM, which are the two most common boot devices used to install Ubuntu.
If you have a newer SCSI controller and you have a CD-ROM device attached to it, you are usually able to boot from the CD-ROM. All you have to do is enable booting from a CD-ROM in the SCSI-BIOS of your controller.
Another popular option is to boot from a USB storage device (also called a USB memory stick or USB key). Some BIOSes can boot directly from a USB storage device, but some cannot. You may need to configure your BIOS to boot from a "Removable drive" or even from "USB-ZIP" to get it to boot from the USB device.
Here are some details about how to set the boot order. Remember to reset the boot order after Linux is installed, so that you restart your machine from the hard drive.
2.1. Changing the Boot Order on IDE Computers
1. As your computer starts, press the keys to enter the BIOS utility. Often, it is the Delete key. However, consult the hardware documentation for the exact keystrokes.
2. Find the boot sequence in the setup utility. Its location depends on your BIOS, but you are looking for a field that lists drives.
Common entries on IDE machines are C, A, cdrom or A, C, cdrom.
C is the hard drive, and A is the floppy drive.
3. Change the boot sequence setting so that the CD-ROM or the floppy is first. Usually, the Page Up or Page Down keys cycle through the possible choices.
4. Save your changes. Instructions on the screen tell you how to save the changes on your computer.
2.2. Changing the Boot Order on SCSI Computers
1. As your computer starts, press the keys to enter the SCSI setup utility.
You can start the SCSI setup utility after the memory check and the message about how to start the BIOS utility displays when you start your computer.
The keystrokes you need depend on the utility. Often, it is Ctrl+F2. However, consult your hardware documentation for the exact keystrokes.
2. Find the utility for changing the boot order.
3. Set the utility so that the SCSI ID of the CD drive is first on the list.
4. Save your changes. Instructions on the screen tell you how to save the changes on your computer. Often, you must press F10.
3. Miscellaneous BIOS Settings
3.1. CD-ROM Settings
Some BIOS systems (such as Award BIOS) allow you to automatically set the CD speed. You should avoid that, and instead set it to, say, the lowest speed. If you get seek failed error messages, this may be your problem.
3.2. Extended vs. Expanded Memory
If your system provides both extended and expanded memory, set it so that there is as much extended and as little expanded memory as possible. Linux requires extended memory and cannot use expanded memory.
3.3. Virus Protection
Disable any virus-warning features your BIOS may provide. If you have a virus-protection board or other special hardware, make sure it is disabled or physically removed while running GNU/Linux. These aren't compatible with GNU/Linux; moreover, due to the file system permissions and protected memory of the Linux kernel, viruses are almost unheard of (After installation you can enable Boot Sector protection if you want. This offers no additional security in Linux but if you also run Windows it may prevent a catastrophe. There is no need to tamper with the Master Boot Record (MBR) after the boot manager has been set up).
3.4. Shadow RAM
Your motherboard may provide shadow RAM or BIOS caching. You may see settings for "Video BIOS Shadow", "C800-CBFF Shadow", etc. Disable all shadow RAM. Shadow RAM is used to accelerate access to the ROMs on your motherboard and on some of the controller cards. Linux does not use these ROMs once it has booted because it provides its own faster 32-bit software in place of the 16-bit programs in the ROMs. Disabling the shadow RAM may make some of it available for programs to use as normal memory. Leaving the shadow RAM enabled may interfere with Linux access to hardware devices.
3.5. Memory Hole
If your BIOS offers something like "15–16 MB Memory Hole", please disable that. Linux expects to find memory there if you have that much RAM.
We have a report of an Intel Endeavor motherboard on which there is an option called "LFB" or "Linear Frame Buffer". This had two settings: "Disabled" and "1 Megabyte". Set it to "1 Megabyte". When disabled, the installation floppy was not read correctly, and the system eventually crashed. At this writing we don't understand what's going on with this particular device — it just worked with that setting and not without it.
3.6. Advanced Power Management
If your motherboard provides Advanced Power Management (APM), configure it so that power management is controlled by APM. Disable the doze, standby, suspend, nap, and sleep modes, and disable the hard disk's power-down timer. Linux can take over control of these modes, and can do a better job of power-management than the BIOS.
4. Hardware Issues to Watch Out For
USB BIOS support and keyboards. If you have no AT-style keyboard and only a USB model, you may need to enable legacy AT keyboard emulation in your BIOS setup. Only do this if the installation system fails to use your keyboard in USB mode. Conversely, for some systems (especially laptops) you may need to disable legacy USB support if your keyboard does not respond. Consult your main board manual and look in the BIOS for "Legacy keyboard emulation" or "USB keyboard support" option
Pre-Partitioning for Multi-Boot Systems
If you already have an operating system on your system (Windows 9x, Windows NT/2000/XP, OS/2, MacOS, Solaris, FreeBSD, …) and want to stick Linux on the same disk, you will need to repartition the disk. Ubuntu requires its own hard disk partitions. It cannot be installed on Windows or MacOS partitions. It may be able to share some partitions with other Linux systems, but that's not covered here. At the very least you will need a dedicated partition for the Ubuntu root. You can find information about your current partition setup by using a partitioning tool for your current operating system, such as fdisk or PartitionMagic. Partitioning tools always provide a way to show existing partitions without making changes. If your computer has more than one hard disk, you may want to dedicate one of the hard disks completely to Ubuntu. If so, you don't need to partition that disk before booting the installation system; the installer's included partitioning program can handle the job nicely. If your machine has only one hard disk, and you would like to completely replace the current operating system with Ubuntu, you also can wait to partition as part of the installation process, after you have booted the installation system. However this only works if you plan to boot the installer system from tapes, CD-ROM or files on a connected machine. Consider: if you boot from files placed on the hard disk, and then partition that same hard disk within the installation system, thus erasing the boot files, you'd better hope the installation is successful the first time around. At the least in this case, you should have some alternate means of reviving your machine like the original system's installation tapes or CDs. If your machine already has multiple partitions, and enough space can be provided by deleting and replacing one or more of them, then you too can wait and use the Ubuntu installer's partitioning program. You should still read through the material below, because there may be special circumstances like the order of the existing partitions within the partition map, that force you to partition before installing anyway. If your machine has a FAT or NTFS filesystem, as used by DOS and Windows, you can wait and use Ubuntu installer's partitioning program to resize the filesystem. If none of the above apply, you'll need to partition your hard disk before starting the installation to create partition-able space for Ubuntu. If some of the partitions will be owned by other operating systems, you should create those partitions using native operating system partitioning programs. We recommend that you do not attempt to create partitions for Ubuntu using another operating system's tools. Instead, you should just create the native operating system's partitions you will want to retain. If you are going to install more than one operating system on the same machine, you should install all other system(s) before proceeding with Linux installation. Windows and other OS installations may destroy your ability to start Linux, or encourage you to reformat non-native partitions. You can recover from these actions or avoid them, but installing the native system first saves you trouble. If you currently have one hard disk with one partition (a common setup for desktop computers), and you want to multi-boot the native operating system and Ubuntu, you will need to: 1. Back up everything on the computer. 1. Partitioning From DOS or Windows If you are manipulating existing FAT or NTFS partitions, it is recommended that you either use the scheme below or native Windows or DOS tools. Otherwise, it is not really necessary to partition from DOS or Windows; the Linux partitioning tools will generally do a better job. But if you have a large IDE disk, and are not using LBA addressing, overlay drivers (sometimes provided by hard disk manufacturers), or a new (post 1998) BIOS that supports large disk access extensions, then you must locate your Ubuntu boot partition carefully. In this case, you will have to put the boot partition into the first 1024 cylinders of your hard disk (usually around 524 megabytes, without BIOS translation). This may require that you move an existing FAT or NTFS partition. 1.1. Lossless Repartitioning When Starting From DOS, Win-32 or OS/2 Before going any further, you should have decided how you will be dividing up the disk. The method in this section will only split a partition into two pieces. One will contain the original OS and the other will be used for Ubuntu. During the installation of Ubuntu, you will be given the opportunity to use the Ubuntu portion of the disk as you see fit, i.e., as swap or as a file system. The idea is to move all the data on the partition to the beginning, before changing the partition information, so that nothing will be lost. It is important that you do as little as possible between the data movement and repartitioning to minimize the chance of a file being written near the end of the partition as this will decrease the amount of space you can take from the partition. The next thing needed is to move all the data to the beginning of the partition. defrag, which comes standard with DOS 6.0 and later, can easily do the job. See the fips documentation for a list of other software that may do the trick. Note that if you have Windows 9x, you must run defrag from there, since DOS doesn't understand VFAT, which is used to support for long filenames, used in Windows 95 and higher. After running the defragmenter (which can take a while on a large disk), reboot with the fips disk you created in the floppy drive. Simply type a:\fips and follow the directions. Note that there are many other partition managers out there, in case fips doesn't do the trick for you. 1.2. Partitioning for DOS Apparently, whenever you create or resize a partition for DOS use, it's a good idea to fill the first few sectors with zeros. You should do this prior to running DOS's format command by executing the following command from Linux:
In general, changing a partition with a file system already on it will destroy any information there. Thus you should always make backups before doing any repartitioning. Using the analogy of the house, you would probably want to move all the furniture out of the way before moving a wall or you risk destroying it.
2. Boot from the native operating system installer media such as CD-ROM or tapes.
3. Use the native partitioning tools to create native system partition(s). Leave either a place holder partition or free space for Ubuntu.
4. Install the native operating system on its new partition.
5. Boot back into the native system to verify everything's OK, and to download the Ubuntu installer boot files.
6. Boot the Ubuntu installer to continue installing Ubuntu.
One of the most common installations is onto a system that already contains DOS (including Windows 3.1), Win32 (such as Windows 95, 98, Me, NT, 2000, XP), or OS/2, and it is desired to put Ubuntu onto the same disk without destroying the previous system. Note that the installer supports resizing of FAT and NTFS filesystems as used by DOS and Windows. Simply start the installer and when you get to the partitioning step, select the option for Manual partitioning, select the partition to resize, and specify its new size. So in most cases you should not need to use the method described below.
The first thing needed is a copy of fips which is available in the tools/ directory on your nearest Ubuntu mirror. Unzip the archive and copy the files RESTORRB.EXE, FIPS.EXE and ERRORS.TXT to a bootable floppy. A bootable floppy can be created using the command sys a: under DOS. fips comes with very good documentation which you may want to read. You will definitely need to read the documentation if you use a disk compression driver or a disk manager. Create the disk and read the documentation before you defragment the disk.
If you are partitioning for DOS drives, or changing the size of DOS partitions, using Linux tools, many people experience problems working with the resulting FAT partitions. For instance, some have reported slow performance, consistent problems with scandisk, or other weird errors in DOS or Windows.
# dd if=/dev/zero of=/dev/hdXX bs=512 count=4
Wednesday, July 15, 2009
Directory Tree
bin : Essential command binaries
boot : Static files of the boot loader
dev : Devices files
etc : Host-specific system configuration
home : User home directories
lib : Essential shared libraries and kernel modules
media : Contains mount points for replaceable media
mnt : Mount point for mounting a file system temporarily
proc : Virtual directory for system information (2.4 & 2.6 kernels)
root : Home directory for the root user
sbin : Essential system binaries
sys : Virtual directory for system information (2.6 kernels)
tmp : Temporary files
usr : Secondary hierarchy
var : Variable data
srv : Data for services provided by the system
opt : Add-on application software packages