Archive for September, 2007

Chapter 7 (Web site templates) . Installing Linux 269 You can

Thursday, September 6th, 2007

Chapter 7 . Installing Linux 269 You can change the message that appears before the LILO prompt by adding that message to a file and changing the message line. For example, you could create a /boot/boot.message file and add the following words to that file: Choose linux, new, or dos. To have that message appear before the boot prompt, add the following line to /etc/lilo.conf: message=/boot/boot.message All per-image options begin with either an image= line (indicating a Linux kernel) or other= (indicating some other kind of operating system, such as Windows XP). The per-image options apply to particular boot images rather than to all images (as global options do). Along with the image or other line is a label= line, which gives a name to that image. The name is what you would select at boot time to boot that image. Here are some of the options that you can add to each of those image definitions: . lock This enables automatic recording of boot command lines as the defaults for different boot options. . alias=name You can replace name with any name. That name becomes an alias for the image name defined in the label option. . password=password You can password-protect all images by adding a password option line and replacing password with your own password. The password would have to be entered to boot any of the images. . restricted This option is used with the password option. It indicates that a password should be used only if command-line options are given when trying to boot the image. For Linux kernel images, there are specific options that you can use. These options let you deal with hardware issues that can t be autodetected, or provide information such as how the root file system is mounted. Here are some of kernel image-specific options: . append Add a string of letters and numbers to this option that need to be passed to the kernel. In particular, these can be parameters that need to be passed to better define the hard disk when some aspect of that disk can t be autodetected. For example: append= hd=64,32,202 . ramdisk Add the size of the RAM disk that you want to use so as to override the size of the RAM disk built into the kernel. . read-only Indicates to mount the root file system read-only. It is typically remounted read/write after the disk is checked. . read-write Indicates to mount the root file system read/write.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

268 Part III . Choosing and Installing a (Web hosting domain)

Wednesday, September 5th, 2007

268 Part III . Choosing and Installing a Linux Distribution After you change lilo.conf, you then must run the lilo command for the changes to take effect. You may have different boot images for kernels that include different features. Here is the procedure for modifying the lilo.conf file: 1. Copy the new image from the directory in which it was created (such as /usr/src/linux-2.6/arch/i386/boot) to the /boot directory. Name the file something that reflects its contents, such as zImage-2.6.5-1. 2. Add several lines to the /etc/lilo.conf file so that the image can be started at boot time if it is selected. For example: image=/boot/zImage-2.6.5-1 label=new 3. Type the lilo -t command (as root user) to test that the changes were okay. 4. Type the lilo command (with no options) for the changes to be installed. To boot from this new image, either select new from the graphical boot screen or type new and press Enter at the LILO boot prompt. If 5 seconds is too quick, increase the timeout value (such as 100 for 10 seconds). Options that you can use in the /etc/lilo.conf file are divided into global options, per-image options, and kernel options. There is a lot of documentation available for LILO. For more details on any of the options described here or for other options, you can see the lilo.conf manual page (type man lilo.conf) or any of the documents in /usr/share/doc/lilo*/doc. A few examples follow of global options that you can add to /etc/lilo.conf. Global options apply to LILO as a whole, instead of just to a particular boot image. You can use the default=label option, where label is replaced by an image s label name, to indicate that a particular image be used as the default boot image. If that option is excluded, the first image listed in the /etc/lilo.conf file is used as the default. For example, to start the image labeled new by default, add the following line to lilo.conf: default=new Change the delay from 5 seconds to something greater if you want LILO to wait longer before starting the default image. This gives you more time to boot a different image. To change the value from 5 seconds (50) to 15 seconds (150), add the following line: delay=150
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Chapter 7 . Installing Linux 267 prompt timeout=50 (Web hosting)

Tuesday, September 4th, 2007

Chapter 7 . Installing Linux 267 prompt timeout=50 default=linux boot=/dev/hda map=/boot/map install=/boot/boot.b message=/boot/message linear image=/boot/vmlinuz-2.6.5-1.327 label=linux initrd=/boot/initrd-2.6.5-1.327.img read-only root=/dev/hda6 append= root=LABEL=/ other=/dev/hda1 optional label=dos With prompt on, the boot prompt appears when the system is booted without requiring that any keys are pressed. The timeout value, in this case 50 tenths of a second (5 seconds), defines how long to wait for keyboard input before booting the default boot image. The boot line indicates that the bootable partition is on the hard disk represented by /dev/hda (the first IDE hard disk). The map line indicates the location of the map file (/boot/map, by default). The map file contains the name and locations of bootable kernel images. The install line indicates that the /boot/boot.b file is used as the new boot sector. The message line tells LILO to display the contents of the /boot/message file when booting (that contains the graphical Fedora boot screen that appears). The linear line causes linear sector addresses to be generated (instead of sector/head/cylinder addresses). In the sample file, there are two bootable partitions. The first (image=/boot/ vmlinuz-2.6.5-1.327) shows an image labeled linux. The root file system (/) for that image is on partition /dev/hda6. Read-only indicates that the file system is first mounted read-only, though it is probably mounted as read/write after a file system check. The inidrd line indicates the location of the initial RAM disk image used to start the system. The second bootable partition, which is indicated by the word other in this example, is on the /dev/hda1 partition. Because it is a Windows XP system, it is labeled a DOS file system. The table line indicates the device that contains the partition. Other bootable images are listed in this file, and you can add another boot image yourself (like one you create from reconfiguring your kernel as discussed in the next section) by installing the new image and changing lilo.conf.
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.

Web hosting companies - 266 Part III . Choosing and Installing a

Monday, September 3rd, 2007

266 Part III . Choosing and Installing a Linux Distribution If LILO is being used on your computer, it is installed in either the master boot record or the first sector of the root partition. The master boot record is read directly by the computer s BIOS. In general, if LILO is the only loader on your computer, install it in the master boot record. If there is another boot loader already in the master boot record, put LILO in the root partition. Using LILO When your computer boots with the Fedora version of LILO installed in the master boot record, a graphical Fedora screen appears, displaying the bootable partitions on the computer. Use the up and down arrow keys on your keyboard to select the one you want and press Enter. Otherwise, the default partition that you set at installation will boot after a few seconds. If you want to add any special options when you boot, press Ctrl+X. You will see a text-based boot prompt that appears as follows: boot: LILO pauses for a few seconds and then automatically boots the first image from the default bootable partition. To see the bootable partitions again, quickly press Tab. You may see something similar to the following: LILO boot: linux linux-up dos boot: This example shows that three bootable partitions are on your computer, called linux, linux-up, and dos. The first two refer to two different boot images that can boot the Linux partition. The third refers to a bootable DOS partition (presumably containing a Windows operating system). The first bootable partition is loaded if you don t type anything after a few seconds. Or you could type the name of the other partition to have that boot instead. If you have multiple boot images, press Shift, and LILO will ask you which image you want to boot. Available boot images and other options are defined in the /etc/lilo.conf file. Setting Up the /etc/lilo.conf File The /etc/lilo.conf file is where LILO gets the information it needs to find and start bootable partitions and images. By adding options to the /etc/lilo.conf file, you can change the behavior of the boot process. The following is an example of some of the contents of the /etc/lilo.conf file: Because LILO is not used by default in Fedora Core and some other Linux systems, there may be no /etc/lilo.conf file. However, the Fedora installation program creates an /etc/lilo.conf.anaconda file to suit your installation. If you change from GRUB to LILO, you can copy that file to /etc/lilo.conf. Note
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Chapter 7 . Installing Linux 265 passing options

Sunday, September 2nd, 2007

Chapter 7 . Installing Linux 265 passing options to the new operating system, the chainloader +1 indicates to hand control the booting of the operating system to another boot loader. The +1 indicates that the first sector of the partition is used as the boot loader. Microsoft operating systems require that you use the chainloader to boot them from GRUB. This is because GRUB doesn t offer native support for WIndows operating sytems. If you make any changes to the /boot/grub/grub.conf file, you do not need to load those changes. GRUB automatically picks up those changes when you reboot your computer. If you are accustomed to using the LILO boot loader, this may confuse you at first, as LILO requires you to rerun the lilo command for the changes to take effect. Adding a New GRUB Boot Image You may have different boot images for kernels that include different features. Here is the procedure for modifying the grub.conf file: 1. Copy the new image from the directory in which it was created (such as /usr/src/linux-2.4/arch/i386/boot) to the /boot directory. Name the file something that reflects its contents, such as bz-2.4.21. For example: # cp /usr/src/linux-2.6.5/arch/i386/boot/bzImage /boot/bz-2.6.5 2. Add several lines to the /boot/grub/grub.conf file so that the image can be started at boot time if it is selected. For example: title Fedora Linux (IPV6 build) root (hd0,4) kernel /bz-2.6.5 ro root=/dev/hda6 initrd /initrd-2.6.5.img 3. Reboot your computer. When the GRUB boot screen appears, move your cursor to the title representing the new kernel and press Enter. The advantage to this approach, as opposed to copying the new boot image over the old one, is that if the kernel fails to boot, you can always go back and restart the old kernel. When you feel confident that the new kernel is working properly, you can use it to replace the old kernel or perhaps just make the new kernel the default boot definition. Booting Your Computer with LILO LILO stands for LInux LOader. Like other boot loaders, LILO is a program that can stand outside the operating systems installed on the computer so you can choose which system to boot. It also lets you give special options that modify how the operating system is booted. On Slackware and other Linux systems, LILO is used instead of GRUB as the default boot loader. Note
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Bulletproof web design - 264 Part III . Choosing and Installing a

Sunday, September 2nd, 2007

264 Part III . Choosing and Installing a Linux Distribution # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making # changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/hda6 # initrd /initrd-version.img #boot=/dev/hda default=0 timeout=10 splashimage=(hd0,4)/grub/splash.xpm.gz title Fedora Linux (2.6.5-1.350) root (hd0,4) kernel /vmlinuz-2.6.5-1.350 ro root=LABEL=/ initrd /initrd-2.6.5-1.350.img title Windows XP rootnoverify (hd0,0) chainloader +1 The default=0 line indicates that the first partition in this list (in this case Fedora Linux) will be the one that is booted by default. The line timeout=10 causes GRUB to pause for 10 seconds before booting the default partition. (That s how much time you have to press E if you want to edit the boot line, or to press arrow keys to select a different operating system to boot.) The splashimage line looks in the fifth partition on the first disk (hd0,4) for the boot partition (in this case /dev/hda5, which is the /boot partition). GRUB loads splash.xpm.gz as the image on the splash screen (/boot/grub/splash.xpm.gz). The splash screen appears as the background of the boot screen. GRUB indicates disk partitions using the following notation: (hd0,0). The first number represents the disk, and the second is the partition on that disk. So, (hd0,1) is the second partition (1) on the first disk (0). The two bootable partitions in this example are Fedora and Windows XP. The title lines for each of those partitions are followed by the name that appears on the boot screen to represent each partition. For the Fedora Linux system, the root line indicates the location of the boot partition as the second partition on the first disk. So, to find the bootable kernel (vmlinuz-2.6.5-1.350) and the initrd initial RAM disk boot image that is loaded (initrd-2.6.5-1.350.img), GRUB looks in the root of hd0,4 (which is represented by /dev/hda5 and is eventually mounted as /boot). Other options on the kernel line set the partition as read-only initially (ro) and set the root file system to /dev/hda6. For the Windows XP partition, the rootnoverify line indicates that GRUB should not try to mount the partition. In this case, Windows ME is on the first partition of the first hard disk (hd0,0) or /dev/hda1. Instead of mounting the partition and Note
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Web site hosting - Chapter 7 . Installing Linux 263 There are

Saturday, September 1st, 2007

Chapter 7 . Installing Linux 263 There are three lines in the example of the GRUB editing screen that identify the boot process for the operating system you chose. The first line (beginning with root) shows that the entry for the GRUB boot loader is on the first partition of the first hard disk (hd0,0). GRUB represents the hard disk as hd, regardless of whether it is a SCSI, IDE, or other type of disk. You just count the drive number and partition number, starting from zero. The second line of the example (beginning with kernel) identifies the boot image (/boot/vmlinuz-2.6.5-1.350) and several options. The options identify the partition as initially being loaded ro (read-only) and the location of the root file system on a partition with the label LABEL=/. The third line (starting with initrd) identifies the location of the initial RAM disk, which contains the minimum files and directories needed during the boot process. If you are going to change any of the lines related to the boot process, you would probably change only the second line to add or remove boot options. Here is how you do that: 1. Position the cursor on the kernel line and type e. 2. Either add or remove options after the name of the boot image. You can use a minimal set of bash shell command-line editing features to edit the line. You can even use command completion (type part of a filename and press Tab to complete it). Here are a few options you may want to add or delete: Boot to a shell. If you forgot your root password or if your boot process hangs, you can boot directly to a shell by adding init=/bin/sh to the boot line. (The file system is mounted read-only, so you can copy files out. You need to remount the file system with read/write permission to be able to change files.) Select a run level. If you want to boot to a particular run level, you can add the word linux, followed by the number of the run level you want. For example, to have Fedora Linux boot to run level 3 (multiuser plus networking mode), add linux 3 to the end of the boot line. You can also boot to single-user mode (1), multiuser mode (2), or X GUI mode (5). Level 3 is a good choice if your GUI is temporarily broken. 3. Press Enter to return to the editing screen. 4. Type b to boot the computer with the new options. The next time you boot your computer, the new options will not be saved. To add options so they are saved permanently, see the next section. Permanently Changing Boot Options You can change the options that take effect each time you boot your computer by changing the GRUB configuration file. In Fedora and other Linux systems, GRUB configuration centers around the /boot/grub/grub.conf file. The /boot/grub/grub.conf file is created when you install Linux. Here s an example of that file for Fedora Core:
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.