Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

20120504

Guideline for New Linux Administrators: Part XIV

Before Linux Installation   

Linux installation (1)

Insert the installation boot diskette into your floppy drive, the RedHat CD to the CDROM, and reboot.  If you can boot from the CD, insert the RedHat CD into your CDROM drive and reboot.
You may also start the installation from DOS (or real DOS mode under MS Windows), by running EZSTART.BAT which is on my RedHat CD from Cheapbytes.
Most installers give you an option between text and graphical install. You need to select "text" if your computer memory is restricted.  On modern computers, I always use the graphical installer.
It was not for me. It seems that for most newbies, it is fairly straight forward and painless. Depending on your hardware and installation choices, it typically takes 0.5 h to 2.0 hours.  [Expect longer or possible problems for slow systems with very restricted memory--it took a whole night to install RH6.0 on my 486-33 MHz with 8 MB memory, the system pausing for 5 minutes at a time appearing to do nothing, yet it installed ok.] Upgrades from previous installations take longer and tend to be more problematic.
However, some newbies reported that the installation was a "total nightmare" to them (hardware problems? lack of experience?).  If you encounter problems, my advice would be to install a plain-vanilla system, without struggling with the highest resolution on your fancy video card or other bleeding-edge hardware peripherials which you might have.  Anything can be added/configured later, after you get more understanding of how things work on your system. Even a re-install is always an option for a newbie (it seems Linux gurus think it is a shame to ever re-install Linux). It seems that many newbies have problems because they specify too high screen resolutions (which may be not supported or supported only with some extra tune-up). Again, it may not be wise to break your whole installation for support of a single device--the support can be added/tuned-up later.
Linux software comes in "packages". For example, my Linux Mandrake 7.0 installation CD contained 1002 packages.  Mandrake 7.2 packs 2 CDs of software--my installation of Mandrake 7.2 put 1123 packages on the hard drive. Mind you, this is not all the software available for Linux--just a selection made by people who put the Mandrake distribution together. Mandrake tends to pack more software than RedHat.  An entire application (“program”) may be contained in one or several packages (libraries and add-ons tend to be in separate packages).
No matter what distribution or version, the CD contains packages that make the base operating system (kernel, libraries, a selection of command-line configuration and maintenance tools, etc) a rich selection of networking "clients" and servers" with appropriate configuration and monitoring tools, some end-user text mode applications, base X-windowing system, at least one GUI desktop (most likely several), and likely a slew of GUI applications.
The installation program (either RedHat or Mandrake) will ask you what type of installation to perform. If you select "workstation installation", then the packages normally found on servers will be omitted from your installation (for example, the Apache web server may be skipped). If you choose "server installation", then typically the end-user desktop applications will not be installed (for example, the GIMP graphical utility may be omitted). You can also choose to install "everything", and this is my favorite option for a home computer installation.  Finally, you may opt to make your own selection of packages to install--read on.
It is definitely a very bad idea to hand-pick packages/programs on the basis of how interesting their names sound--some packages have rather unusual names and I would never guess what they do. You could cripple your system by omitting the installation of an essential package (e.g., a critical library). You might also be disappointed when insisting to run some cool-named, cutting-edge piece of software ("version 0.1") that happened to be included on the distribution CD.  In general, you might be annoyed by the functionality (or lack of it) that your "customized Linux" exhibits.  Being a newbie, it sometimes pays to trust the defaults selected by your distribution creator.
Therefore, for my final "production" installation, I would stay away from the tempting installation option "expert install--select packages manually" unless I wish to install everything anyway. For starters, I like the safe "max default installation", however this installation option is called on your CD. Again, you can run into problems if you start with Linux using a strangely customized system (many installers will let you customize at will).[thanks networkdictionary]

20120418

Guideline for New Linux Administrators: Part XIII

Before Linux Installation  

How do I partition my hard drive before Linux installation? (2)


The listing of partitions that your Linux setup program presents to you during installation will include any MS Windows partitions which you have. For example, I have the following MS Windows partition:
mount pointtypesizecomment
[no mount]vfat1200 MB["Win C drive, hda1]
/mnt/dos_hdd2vfat1600 MB["Win D drive, hdd2]
Don't erase these MS Windows partitions during your Linux installation if you want a dual boot. If you erase the MS Windows partition, MS Windows is gone from your system! If not sure, backup your data from your MS Windows partitions before Linux installation. "msdos", "fat" and "vfat" and "ntfs" are typical filesystems used by DOS and MS Windows 3.x/95/98/NT.
As a quick reference, here is a brief summary of the standard Linux partition types ("filesystems") with a short description. I copied the info from the Linux manual pages: man fs and man mount (with some additions after I had a look at the source code files at /usr/src/linux/fs). The underlined filesystems are the ones that you are more likely to use. Other filesystems (not listed below) are available as add-ons (for example journaling filesystems, compressed, encrypted, ...).
  • minix is the filesystem used in the Minix operating system, the first to run under Linux. It has a number of shortcomings: a 64MB partition size limit, short filenames, a single time stamp, etc. It remains useful for floppies and RAM disks.
  • ext is an elaborate extension of the minix filesystem. It has been completely superseded by the second version of the extended filesystem (ext2) and will eventually be removed from the kernel.
  • ext2 is the high performance disk filesystem used by Linux for fixed disks as well as removable media. The second extended filesystem was designed as an extension of the extended file system (ext). ext2 offers the best performance (in terms of speed and CPU usage) of the filesystems supported under Linux. In short, ext2 is the main (default, typical) Linux filesystem.
  • ext3 is an extension of the ext2 filesystem with journaling. It is backwards and forward compatibile with ext2. It means that ext2 can be converted into ext3 without reformatting or data loss (just re-mounting the partion is required). ext3 can be changed back to ext2, also without data loss. I use ext3 extensively since Oct.2001--it is simple and trouble-free. It is included as an installation "option" since RedHat 7.2 and Mandrake 8.0. It is highly recommended that you use this filesystem.
  • xiafs was designed and implemented to be a stable, safe filesystem by extending the Minix filesystem code. It provides the basic most requested features without undue complexity. The xia filesystem is no longer actively developed or maintained. It is used infrequently.
  • msdos is the filesystem used by DOS, Windows, and some OS/2 computers. msdos filenames can be no longer than 8 characters followed by an optional period and 3 character extension.
  • umsdos is an extended DOS filesystem used by Linux. It adds capability for long filenames, UID/GID, POSIX permissions, and special files (devices, named pipes, etc.) under the DOS filesystem, without sacrificing compatibility with DOS.
  • vfat is an extended DOS filesystem used by Microsoft Windows95 and Windows NT. VFAT adds capability for long filenames under the MSDOS filesystem.
  • proc is a pseudo-filesystem which is used as an interface to kernel data structures rather than reading and interpreting /dev/kmem. In particular, its files do not take up disk space. See man 5 proc.
  • iso9660 is a CD-ROM filesystem type conforming to the ISO 9660 standard. Two extensions (listed below) are automatically supported.
  • High Sierra -- Linux supports High Sierra, the precursor to the ISO 9660 standard for CD-ROM filesystems. It is automatically recognized within the iso9660 filesystem support under Linux.
  • Rock Ridge -- Linux also supports the System Use Sharing Protocol records specified by the Rock Ridge Interchange Protocol. They are used to further describe the files in the iso9660 filesystem to a UNIX host, and provide information such as long filenames, UID/GID, POSIX permissions, and devices. It is automatically recognized within the iso9660 filesystem support under Linux.
  • hpfs is the High Performance Filesystem, used in OS/2. This filesystem is read-only under Linux due to the lack of available documentation.
  • sysv is an implementation of the SystemV/Coherent filesystem for Linux. It implements all of Xenix FS, SystemV/386 FS, and Coherent FS.
  • nfs is the network filesystem used to access disks located on remote computers.
  • smb is a network filesystem that supports the SMB protocol, used by MS Windows for Workgroups, Windows NT, and Lan Manager. To use smb fs, you need a special mount program, which can be found in the ksmbfs package, found at ftp://sunsite.unc.edu/pub/Linux/system/Filesystems/smbfs. [Standard linux command "smbmount" will also do.]
  • ncpfs is a network filesystem that supports the NCP protocol, used by Novell NetWare.
  • devpts -- is a pseudo file system, traditionally mounted on /dev/pts. In order to acquire a pseudo terminal, a process opens /dev/ptmx; the number of the pseudo terminal is then made available to the process and the pseudo terminal slave can be accessed as /dev/pts/.
  • fat -- is not a separate filesystem, but a common part of the msdos, umsdos and vfat filesystems.
  • UFS -- is a file system widely used in different operating systems.
  • swap -- is a special partition type used for swapping data from memory to hard drive.
  • raiserfs -- is a brand new journaling filesystem available as standard with Linux kernel version 2.4.1 up (January 2001).
  • hfs (=hierarchical files system) -- MacIntosh filesystem. It is a late beta version., i.e., not recommended for use with critical data, unless read-only.
  • ntfs -- MS Windows NT filesytem. It is still "experimental" under Linux, i.e. not recommeded for production machines, unless read-only (Aug.2001).
some one asks:”The MS Windows partition occupies my whole harddrive. Can I shrink/split it without a re-install?”Possibly. There is a utility called FIPS.EXE on my RedHat CD that does just that. Check the directory \dosutils\fipsdocs\ on your RedHat CD for documentation. If I were you, I would back-up my essential data before doing anything to my partitions. There are also commercial utilities to change the partition size without destroying its contents.
My personal preference is to do a clean re-install of MS Windows on a single, dedicated partition. I leave some space on the hard drive unpartitioned so I can use it for Linux after MS Windows is installed. My fair division of hard drive space between MS Windows and Linux is 50%-50%. Linux programs tend to be smaller, yet Linux includes (as standard) components that MS Windows offers only with many thousand of dollars of add-ons: e.g., servers (not just clients) for ssh, telnet, ftp, http, and mail, several databases, many programming languages, word prcessors, spreadsheets, graphics programs, sound editing applications, statistical analysis programs, a typing tutor, .... I am getting even a small planetarium.[thanks networkdictionary]
You might like also:-       Guideline for New Linux Administrators: Part VIII

                                                 Guideline for New Linux Administrators: Part I

20120402

Guideline for New Linux Administrators: Part XII

Before Linux Installation 


How do I partition my hard drive before Linux installation? (1)


Before Linux installation, you might really want to know what a hard drive partition is. The concern is that you may delete your MS Windows partition when you really don't mean to--you want two separate partitions to dual boot. This means: MS Windows is on one partition, Linux is on a separate partition. You do not normally install Linux on free space on your MS Windows-allocated partition(s). It is possible to install Linux on a MS Windows partition, but we do not recommend it. If you delete a partition from hard drive, all the content on that partition is gone.

If you plan a dual boot (Linux and MS Windows on the same computer), first use your DOS/Win utility FDISK to make the MS Windows partition(s).  Leave part (half?) of the hard drive(s) unpartitioned for Linux. You will create and format the Linux partitions during your RedHat (or Mandrake or whatever else) installation. Linux will recognize the free (unpartitioned) space on the hard drive and use it to create partition(s) in a non-Microsoft format.
Make the MS Windows partition "primary" and "bootable". Install, configure, and test your MS Windows before Linux installation. If  you plan to run Linux only (no dual boot), you need just a clean hard drive (no partitions) to start with.
It is possible to have only one Linux partition (plus one for MS Windows if you dual-boot). But it is better to have more partitions so that you can keep users' data separate from the rest of the operating system. This way, if something ever goes wrong, or if you have to reformat or re-install the operating system, you don't lose the users' data. (You can perform a complete Linux re-install without losing the contents of the /home directory that contains all user data if you skip the "re-format" option given to you during installation. But for that, the /home directory must be on its own partition.)
During the Linux setup, you will be asked to partition the available space on your hard drive(s). There are many possible ways to partition, depending on your hard drive space, requirements, and taste.  I like Linux hard drive partitions like this (for a modest total of 2 GB of hardrive space which I give to Linux in this example):
mount pointtypesize
ext2 300 MB
/usrext21200 MB
/homeext2380 MB
swapswap 120 MB
In the above example, I dedicate 300 MB for the root partition that holds the base of the Linux operating system.  I allocate 1200 MB to the mount point that will be visible on my filesystem as the /usr directory and will contain the user's programs (the programs that don't come with the base operating system and I install later, for example StarOffice).  I dedicate 380 MB for the partition that will be visible as the directory /home and will contain the setting and data of all users on the machine.  And I allocate 120 MB to a "raw" partition for the operating system to use as the virtual memory (extension of the physical, silicon memory on the hard drive, so-called swap).  (If your Linux is ancient, kernel version lower than 2.2 as in RH5.2 and earlier, your swap partition cannot be larger than approximately 127 MB.) The rule of thumb is that the swap should be about twice the amount of the physical memory (RAM).  If you need more (e.g. if you have lots of physical memory, or you expect to run custom programs with really large data structures) you might want to create a larger swap partition during the installation (or several smaller swap partitions) or add a swap file(s) later.
2 GB is a respectable amount of disk space and should be sufficient for users who like having many applications. (This is because Linux applications tend to be slimmer than their MS Windows equivalents). However, if you try to install everything that's available on the modern distribution CDs, you will surely run out of disk space. My experience is that however large the hard drive space, it will get filled and I regret I don't have more.
If my space on the hard drive is really restricted, I may consider a two-partition setup like this (for a lean 650 MB total dedicated to Linux):
mount pointtypesize
ext2 600 MB
swapswap50 MB
In this example, I dedicate 600 MB to the base of the operating system, applications, and user documents/data, and allow 50 MB for the swap partition (for the operating system to use as the virtual memory). The 50-MB swap should be quite sufficient for medium duty operations. The limitation of 600 MB for the operating system, applications and user data means that you will have to be very selective as to which applications you install or else you risk running out of hard drive space. Try pressing when installing the optional software that comes on the Red Hat CD--it will give you a short description of what the software does so you could perhaps decide if you really need it. (Don't worry too much if you miss something you need, you can install the missing parts later). You can easily finish the RedHat installation with 200 MB free on your Linux partition (out of 600 MB used in this example) if you make reasonable choices. Please note that "bundling together" the root partition "/"  and the /home directory will likely save you some disk space, but it is not the safest solution.
It is possible to install Linux on even less disk space than in the example above, but you will have to be really picky as to what you install.
For a larger available hard drive space, I nowadays (year 2002) consider the following setup (for a comfortable total of 15 GB dedicated to Linux):
mount pointtypesize
ext2800 MB
/usrext25000 MB
/usr/localext23000 MB
/homeext2 5200 MB
swapswap1000 MB
Please note that the the mount points can reside on different physical hard drives. Linux agglomarates all the hard drive space into a single directory tree.
Another consideration when setting up the partitions on older computers (486?). Many older BIOSes have the restriction that the boot partition cannot extend beyond the 1024th cylinder on your first physical hard drive.  To overcome this limitation, simply make the first (bootable) partition so that it ends before the cylinder number 1023 (this makes this partition max approximately 512 MB in size, which is plenty for the "/" root partition). Once Linux boots, the BIOS restriction does not matter any more because Linux takes over the hardware management and it can access the partition(s) beyond the cylinder number 1023.
When installing and using Linux, your drives appear as devices with the following names:  hda--first IDE drive (stands for "hard drive a",  i.e. the master drive on the first IDE interface), hdb--second IDE drive (i.e., the slave drive on the first IDE interface), hdc--third IDE drive (i.e. the master drive on the second IDE interface), hdd--fourth IDE drive (i.e. the slave drive on the second IDE interface).  The numbers mean the partitions on the physical drives: "hda1" means the first IDE hard drive (hd a), first partition (1);  "hda2" is the first IDE hard drive, second partition; "hda3"--the first IDE hard drive, third partition; (and so on if you have more than 3 partitions on the first IDE hard drive);  "hdb1"--second IDE hard drive,  first partition (or just "hdb" if it is the CDROM installed as a slave on your first IDE interface). "hdc1"--third IDE hard drive, first partition, etc.  SCSI drives have analogous names but start with the letters "sd" (="SCSI drive"), followed by the letter indicating the SCSI interface and by the number indicating the SCSI device id.  For example, "sda4" means "first SCSI interface, id number 4". If you have an external zip drive attached to your parallel port, it will appear as SCSI device "sda4" (zip drives work in a SCSI-emulation mode).[thanks networkdictionary]
You might like also:-


                                                 Guideline for New Linux Administrators: Part I


20120321

Guideline for New Linux Administrators: Part XI

Before Linux Installation 

Linux Installation problem

If your computer can boot from the CD drive (older computers cannot), you don't need a boot diskette to install Linux. Have a look at your BIOS setup; the boot sequence can often be set up there (the default is often floppy followed by hard drive).  My computer has the CD drive specified as the first boot device in the BIOS yet still cannot boot from the CD drive. So the BIOS setup does not necessary reflect the capability of your machine.  If you can boot from the CD drive, just insert the RedHat CD into the CD drive and reboot the computer to enter the RedHat Linux installation program.
If you don't know how to access your BIOS setup, read this paragraph. The BIOS setup can typically be entered at boot time by pressing the proper key at the right moment (often when a prompt is briefly displayed).  Most often, it is the
key.  Here is a list of key combinations used by popular BIOSes:  Acer notebooks: during Power-On Self-Test (POST). American Megatrends (AMI):
during Power-On Self-Test. Award:
, or . Compaq: after the square appears in the top right corner of the screen during boot-up. Dell: . DTK: during Power-On Self-Test.  IBM Aptiva 535: while the square with the wavy lines is displayed in the upper right corner during power-on. IBM PS/2:
, then
when the cursor is in the top right corner  Mr. BIOS: during Power-On Self-Test. Packard Bell: For some models, or during Power-On Self-Test. Phoenix: or , or .




If your computer cannot boot from the CD drive, make an install boot diskette from under DOS or the MS Windows DOS mode. (You have go to to "Shutdown" and "Restart in MS-DOS mode", not just run a DOS window).
It is important that you have a perfectly good floppy (without even one bad cluster). The program that makes the diskette does not check if the floppy was written properly. Also, don't count on the DOS FORMAT utility finding a faulty floppy--it probably won't.  If I were you, I would make two or three boot floppies at once--you may be surprised how many diskettes have problems. For me, the third floppy worked!  If your install diskette does not boot, make another one--it definitely should boot.
Here are the commands. To make the boot floppy run:
F:\dosutils\rawrite.exe -f F:\images\boot.img -d a: -n
To make the supplemental (optional) diskette run:
F:\dosutils\rawrite.exe -f F:\images\supp.img -d a: -n
This assumes your CDROM is the DOS "F:" drive, and your floppy is "A:", adjust the commands if the drive letters are different on your system.
The commands above run the utility "rawrite" and specify the input file  ("disk image", after the option "-f") and the destination drive (after the option "-d"), and suppresses the prompt to insert a floppy (option "-n"). You may find it easier to run rawrite without any argument--it will interactively prompt you for the input image (pick the file name as in the commands above) and the destination drive letter.
From under Linux, you can make a boot floppy as follows.
If the floppy needs low-level formatting, you can format it under Linux using:
fdformat /dev/fd0H1440

Mount the RedHat CDROM:
mount /mnt/cdrom
cd /mnt/cdrom/images/
Write the floppy image to the floppy:
dd if=boot.img of=/dev/fd0
[The ``dd'' command copies files. The above command specifies that the input file ("if") is ``boot.img'' and the output file ("of") is /dev/fd0, which is the first floppy drive, i.e. the floppy drive number zero (if you want to write to your second floppy drive, use  /dev/fd1). ]

To verify that the disk image was written to the floppy correctly, you can use one of the following four ways:
[1st way]
cmp boot.img  /dev/fd0
[2nd way]
diff boot.img  /dev/fd0
[3rd way]
md5sum boot.img
md5sum /dev/fd0
[compare if the two returned md5 checksums are identical]
[4th way]
sum boot.img
sum /dev/fd0
[compare if the two returned sums are identical]

In addition, some one asks: "Can I have MS Windows and Linux installed on the same computer?"
Yes, you can. Many Linuxers use a dual boot. This is typically achieved by installing MS Windows on one hard-drive partition and Linux on another partition.  Linux comes with a boot manager called GRUB (some, particularly older distributions may contain another boot manager called LILO).  The boot manager will let you select, at boot time, the operating system you boot.  Install MS Windows first and Linux only afterwards or else the MS Windows installation program will disable your access to Linux.  Have a Linux boot floppy ready if you need to re-install MS Windows--MS Windows will surely disable your access to Linux and you will have to boot Linux from the floppy and then re-run the command lilo to be back in business.  The best is to use MS Windows 95 because it interference with Linux is unsophisticated and workarounds are well known.  Installation of the latest MS Windows offering is sure to introduce trouble into your dual booting system (obviously on purpose), e.g., insist on its own boot manager that will surely refuse to run Linux.  Although it is amazing that a convicted monopolist (Microsoft) can keep interferring with another operating system, one may need to learn to live with it.
From under Linux, you will be able to read from and write to your MS Windows drive partitions so that the data exchange between MS Windows- and the Linux-based program is seamless.  You will also be able to use your existing MS Windows-based resources:  sound files, backgrounds, pictures, fonts, etc. (First check if it does not violate your license agreement though, smile. For products that are on rent to you from Microsoft, it probably does. With my Linux computers, I can be proud to have no pirated software on my system whatsoever.)
[thanks networkdictionary]
MS Windows will have no notion that Linux exists on your computer--it will just see that
  • a boot manager is present,
  • a non-Microsoft partition(s) is present on the hard drive.
MS Windows does not interfere with neither of them during normal operations (but mendles badly during installation, hard-drive re-partitioning, etc.)
                             Guideline for New Linux Administrators: Part I