linux tutorial

Linux Tutorials and FAQ

 
Linux Tutorial and FAQ's

Homepage

The Linux tutorial section. More than 150 free linux tutorial and linux book for you to download here

Linux tutorial Info page

free Linux Tutorials Guides and FAQ's
The Linux FAQ
Linux Administration Guide 1
Linux Administration Guide 2

 

The Linux FAQ page 8 Booting the OS

<previous Page 8 of 18 next>

This is the list of Frequently Asked Questions for Linux, the Free/Open Source UNIX-like operating system kernel that runs on many modern computer systems..

Table of Contents

2. General Information 8. Booting the OS. 14. Solutions to Common Problems.
3. The Linux Kernel 9. Application Software Management 15. Tips And Tricks
4. Disk Drives 10. Directory And File Management. 16. The X Window System
5. Partitions And Filesystem 11. Connecting To A Network 17. Frequently Encountered Error Messages
6. System Libraries 12. Troubleshooting 18. Online Resources

8. Booting the OS

Q: Can Linux Boot from MS-DOS?
Q: How Can Linux Boot from OS/2's Boot Manager?
Q: How Do I Set the Boot-Time Configuration?
Q: How Do I Get LILO to Boot the Kernel Image?
Q: Can I Remove LILO So the System Boots DOS Again?
Q: Why Does the System Check the Ext2fs Partitions Each Reboot?
Q: How Do I Make Sure the System Boots after Re-Installing the Operating System?
Q: How To Make a Rescue Floppy
Q: Can Linux Boot from MS-DOS?

Q: Can Linux Boot from MS-DOS?

A: If LILO doesn't work, and if the machine has MS-DOS or Microsoft Windows, you may be left with acomputer that won't boot. This can also happen on an upgrade to your Linux distribution. Re-installing LILOis the last thing that the installation does.It is vitally important when installing or upgrading Linux on a dual boot machine, to have a MS-DOS or
Windows rescue disk nearby so you can FDISK -MBR. Then you can go about using LOADLIN.EXE
instead of LILO.
This config.sys file is one possible way to invoke LOADLIN.EXE and boot MS-DOS or Linux.
[menu] menuitem=DOS, Dos Boot menuitem=LINUX, Linux Boot[LINUX] shell=c: edhatloadlin.exe c: edhatautobootvmlinuz vga=5 root=/dev
[DOS] STACKS = 0,0 rem all the other DOS drivers get loaded here.
This creates a menu where you can directly jump to LOADLIN.EXE before all of the MS-DOS drivers get
loaded.The paths and options are peculiar to one machine and should be intuitively obvious to the most casual
observer. See the LOADLIN.EXE docs for options. They are the same as LILO, and options are just passed to
the kernel, anyhow.
[Jim Harvey]

Q: How Can Linux Boot from OS/2's Boot Manager?

A: #Create a partition using OS/2's FDISK.EXE (Not Linux's fdisk).
Format the partition under OS/2, either with FAT or HPFS. This is so that OS/2 knows about thepartition being formatted. (This step is not necessary with OS/2 Warp 3.0.)1.Add the partition to the Boot Manager. 2.
Boot Linux, and create a file system on the partition using mkfs -t ext2 or mke2fs. At this point you
may, if you like, use Linux's fdisk to change the code of the new partition to type 83 (Linux
Native)this may help some automated installation scripts find the right partition to use.3.Install Linux on the partition.4.Install LILO on the Linux partition NOT on the master boot record of the hard drive. This installsLILO as a second-stage boot loader on the Linux partition itself, to start up the kernel specified in the
5.
8. Booting the OS 29.LILO configuration file. To do this, you should put
boot = /dev/hda2
(where /dev/hda2 is the partition you want to boot from) in your /etc/lilo/config or
/etc/lilo.config file.
Make sure that it is the Boot Manager partition that is marked active, so that you can use BootManager to choose what to boot.6.
There is a set of HOWTO's on the subject of multi-boot systems at the LDP Home Page, http://tldp.org .
Q: How Do I Set the Boot-Time Configuration?
A: You can configure Linux at the lilo: prompt either by typing the kernel arguments at the BOOT lilo:
prompt, or by adding an append= directive to the /etc/lilo.conf file; for example, at the LILO prompt
(example only):
BOOT lilo: parport=0x3bc,7
parport=0x3bc,none serial=0x3f8,4 serial=0x2f8,3
Example statement for /etc/lilo.conf:
append="parport=0x3bc,none serial=0x3f8,4 serial=0x2f8,3"
If you modify the /etc/lilo.conf file, be sure to run the lilo command to install the new configuration.
Configuration notes for specific hardware devices are in the documentation of the kernel source distribution,
/usr/src/linux/Documentation in most distributions.
Refer to the lilo and /etc/lilo.conf manual pages, as well as the LDP BootPrompt-HowTo, see Where
Is the Documentation?, and the documentation in /usr/doc/lilo.

Q: How Do I Get LILO to Boot the Kernel Image?

A: From kernel versions 1.1.80 on, the compressed kernel image, which is what LILO needs to find, is in
arch/i386/boot/zImage, or arch/i386/boot/bzImage when it is built, and is normally stored in
the /boot/ directory. The /etc/lilo.conf file should refer to the vmlinuz symbolic link, not the
actual kernel image.This was changed to make it easier to build kernel versions for several different processors from one source
tree.

Q: Can I Remove LILO So the System Boots DOS Again?

A: The lilo program (not the complete LILO package), uses the command line option -u to uninstall the LILO
boot loader. You have to supply the device name of the device you installed LILO on, for example:
lilo -u /dev/hda
This rewrites the original, pre-LILO master boot record back to the first hard drive, from the boot record
saved in /boot/boot.0300. If you installed LILO to a partition as a secondary boot loader, for example,
The Linux FAQ
8. Booting the OS 30./dev/hda1, lilo re-installs the original boot sector from the save file /boot/boot.0301. Refer to the
lilo manual page for details. Thanks to Villy Kruse for reminding me to update this answer.
If you have an earlier version of LILO, you will have to use the DOS (MS-DOS 5.0 or later, or OS/2) FDISK
/MBR (which is not documented). This will overwrite the lilo boot loader with a standard MS-DOS Master
Boot Record. If you have DR-DOS 6.0, go into FDISK.EXE in the normal way and then select the
Re-write Master Boot Record option.
If you create a boot floppy during the Windows installation process, make sure that it contains the programsFDISK.EXE, FORMAT.COM, and SYS.COM, and use that to re-install MS-DOS on the hard disk.If you don't have MS-DOS or DR-DOS, you need to have the boot sector that LILO saved when you first
installed it. You did keep that file, didn't you? It's probably called boot.0301 or some such. Type:
dd if=boot.0301 of=/dev/hda bs=445 count=1
(or /dev/sda if you're using a SCSI disk). This may also wipe out your partition table, so beware! If you're
desperate, you could use
dd if=/dev/zero of=/dev/hda bs=512 count=1
This will erase your partition table and boot sector completely: you can then reformat the disk using yourfavorite software. But this will render the contents of your disk inaccessible you'll lose it all unless you're anexpert.
Note that the DOS MBR boots whichever (single!) partition is flagged as "active." You may need to use fdisk
to set and clear the active flags on partitions appropriately.

Q: Why Does the System Check the Ext2fs Partitions Each Reboot?

A: Refer to EXT2-fs: warning: mounting unchecked file system.

Q: How Do I Make Sure the System Boots after Re-Installing the Operating System?

A: This should work whether you're re-installing Linux or some other, commercial, operating system:Insert a blank, formatted floppy in drive A:
·
Save a copy of the boot hard drive's Master Boot Record to the floppy, by executing the command:
#dd if=/dev/hda of=/dev/fd0 count=1
dd is a standard program on Linux systems. A MS-Windows compatible version is available from
ftp://ftp.gnu.org/, as well as many MS software archives.
·
Test that the floppy boots the system by rebooting with the floppy in the A: drive. ·
Then you should be able to install the other operating system (on a different hard drive and/or
partition, if you don't want to uninstall Linux).
·
After installation, boot Linux again from the floppy, and re-install the MBR with the command:
/sbin/lilo.
·
[Jacques Guy]

The Linux FAQ 8. Booting the OS 31.

 

Q: How To Make a Rescue Floppy

A: Make a file system on it with bin, etc, lib and dev directorieseverything you need. Install a kernel on it and
arrange to have LILO boot it from the floppy (see the LILO documentation, in lilo.u.*.ps).
If you build the kernel (or tell LILO to tell the kernel) to have a RAM disk the same size as the floppy theRAM disk will be loaded at boot time and mounted as root in place of the floppy.
See the Bootdisk HOWTO.

<previous Page 8 of 18 next>

 
© Copyright 2002 [Aroms LTD] Linux tutorial