Labels

Android (1) bash (2) boost (2) C (34) C++ (2) cheatsheet (2) CLion (6) css (3) Debian (33) DL (17) Docker (2) Dreamweaver (2) Eclipse (3) fail2ban (4) git (5) GitHub (4) Hacking (3) html (8) http (1) iOS (1) iPad (1) IRC (1) Java (31) javascript (3) Linux (167) Mac (19) Machine Learning (1) mySQL (48) Netbeans (4) Networking (1) Nexus (1) OpenVMS (6) Oracle (1) Pandas (3) php (16) Postgresql (8) Python (9) raid (1) RedHat (14) Samba (2) Slackware (47) SQL (14) svn (1) tar (1) ThinkPad (1) Virtualbox (3) Visual Basic (1) Visual Studio (1) Windows (2)

Saturday, 1 October 2016

Boot Loader (need tidy up)

Boot Loader Questions

Error When Installing LILO to the Master Boot Record (MBR)

   
Question:
    The installation went fine, but when I tried to write the LILO     information to the MBR, I got a vague error that said the installation program     could not write this info to the MBR. What should I do?
Answer:
    The MBR may be locked. You need to access your system's BIOS and verify that the MBR is not write-protected. Also, double-check that you do not have a virus scan enabled in the BIOS that may interfere with writing to the MBR. Depending on the system, you may already have another boot loader in the MBR that conflicts with LILO.
    Once you have enabled the ability to write to your MBR, follow these     steps to install LILO there:
  1.     Boot your system into Linux. (If your system cannot boot into Linux     from the hard drive, boot using your boot floppy. Then, at the boot     prompt, type vmlinuz root=/dev/hda5 at the     LILO: prompt or the location of your Linux root     partition.)    
  2.     Once your system is finished booting, login as root and check your     /etc/lilo.conf file to make sure everything is     correct. Here is an example lilo.conf file:    

  1. boot=/dev/hda
  2. map=/boot/map
  3. install=/boot/boot.b
  4. prompt
  5. timeout=50
  6. message=/boot/message
  7. linear
  8. default=linux

  9. image=/boot/vmlinuz-2.2.17-14
  10.     label=linux
  11.     initrd=/boot/initrd-2.2.17-14.img
  12.     read-only
  13.     root=/dev/hda5

  14. image=/boot/vmlinuz-2.2.16-22enterprise
  15.     label=linux-2.2.16-22
  16.     initrd=/boot/initrd-2.2.16-22.img
  17.     read-only
  18.     root=/dev/hda5

  •     Type man lilo.conf for more information about     configuring /etc/lilo.conf.    

  •     These steps should install LILO to your MBR properly and allow you to     boot without using a boot disk.
    ___________________________________________________________

    Problems Booting to Windows After the Installation of Red Hat Linux

        Question:
        I have installed Linux to dual boot with Windows. My first drive,     /dev/hda is Linux, and my second drive is my     Windows drive. Windows worked fine until after I installed Linux. Now,     when I select "dos" from the LILO: prompt to boot to     Windows, all I get is "Starting...." and then my machine locks, up. My     entry for Windows in my /etc/lilo.conf file looks     like this:
    other=/dev/hdb1
          label=dos
          table=/dev/hdb
        Why is this happening and how can I work around it?
    Answer:
        Windows is expecting to be the first disk in your computer and does not     know what to do when you try to boot it as the second drive. In order to     work around this, you must modify your     /etc/lilo.conf file so that the entry for Windows     looks like this:
    other=/dev/hdb1
          label=dos
          table=/dev/hdb
          map-drive = 0x80
          to = 0x81
          map-drive = 0x81
          to = 0x80
        Once you have done this, you must re-run LILO so that your changes take     effect. To do this, type /sbin/lilo -v -v.
        What this does is fool DOS/Windows into believing that it is the first     drive in your system.
    ___________________________________________________________

    What to Do When You Get 'LI' on Boot

        Question:
    When my machine boots, all it says is 'LI' and then it freezes. What is the problem?
        Answer:
    This means that LILO (the Linux bootloader) is having problems bootstrapping itself to the system. There are a couple of possible situations that may be causing this:
    •     You may have installed LILO above the 1024th cylinder on your hard     drive. The kernel needs to reside entirely below the 1023rd cylinder on     the drive. If this is the case, you need to create a     /boot partition that resides in these limits and     reinstall LILO.    
    •     You may also need to go into your system's BIOS and make certain     that LBA mode is enabled. If LBA was off, you will need to     repartition and reinstall.    
    ___________________________________________________________

    When to Use Loadlin

        Question:
        When do I need to use loadlin?
        Answer:
        You will need an alternative to LILO if you can not install the Linux     kernel to where the BIOS can reach it or you do not wish to use it. The     BIOS may not be able to reach it for one of the following reasons:
    •     The kernel is above the 1023 cylinder of the hard drive.    
    •     The kernel is on a drive the BIOS cannot boot to (not on Primary     IDE or SCSI chain).    
    •     Other esoteric kernel/BIOS problems.    
    •     You have hardware that can only be initialized in DOS (Plug     and Play, etc).    
        You will probably need to use the Loadlin boot loader that is provided     on the CD-ROM in \dosutils. You will need to copy     this directory over to your DOS hard drive partition and edit the     autoboot.bat file to point to its new position and     removing the initrd= line. If your system is     a SCSI system, you will need to go into rescue mode and copy the     /mnt/boot/initrd.img from the hard drive over to     the DOS partition, and use it for booting.
    ___________________________________________________________

    Changing the Default OS That Boots with LILO

        Question:
    I installed LILO fine and can boot to either OS. How can I change the default OS that it boots to?
        Answer:
        For newer versions of Red Hat Linux, /etc/lilo.conf     accepts a default= line that specifies     the label of the image section that will be used to boot the machine by     default. So, for example, a /etc/lilo.conf file may     look like this:
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50
    message=/boot/message
    linear
    default=linux

    image=/boot/vmlinuz-2.2.17-14
        label=linux
        initrd=/boot/initrd-2.2.17-14.img
        read-only
        root=/dev/hda5

    image=/boot/vmlinuz-2.2.16-22
        label=linux-old
        initrd=/boot/initrd-2.2.16-22.img
        read-only
        root=/dev/hda5
        The default= line points to the     label=linux as the default image to use     when booting the system.
        To change the default image to use when booting, simply change the     default= line to point to the correct     label value (in this example,     linux-old). Save     /etc/lilo.conf and run the lilo -v     -v command to save the change.
    For older Red Hat Linux systems, you will also need to edit the /etc/lilo.conf file. However, since these versions cannot specify a default= line, you will need to change the order of the operating systems that LILO sees in its configuration file. In other words, you will need to place the lines that point to the operating system you would like to boot by default ahead of the others.
        In the following example we change the order of booting so that DOS gets     booted by default instead of Linux:
    pico /etc/lilo.conf
    Here is the old version:
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50

        image=/boot/vmlinux-2.2.12-20
        label=linux
        root=/dev/hda2
        read-only

        other = /dev/hda1
        label = dos
        table = /dev/hda
    You would then change it to the following:
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50

        other = /dev/hda1
        label = dos
        table = /dev/hda

        image=/boot/vmlinux-2.2.12-20
        label=linux
        root=/dev/hda2
        read-only
    Save your changes to the file. At the shell prompt, run the command /sbin/lilo -v and the updated LILO will be written to the boot device. On reboot, the machine will now boot into DOS by default instead of Linux.
    ___________________________________________________________

    Removing LILO Information from the Master Boot Record (MBR)

        Question:
    How can I remove the LILO information from my Master Boot Record (MBR)?
        Answer:
    There are several methods to removing LILO from the Master Boot Record of the machine. Inside of Linux, you can replace the MBR with an earlier saved version of the MBR using the /sbin/lilo command:
    /sbin/lilo -u
    In DOS, NT, and Windows 95 you can use the fdisk command to create a new MBR with the "undocumented" flag /mbr. This will rewrite the MBR to only boot the primary DOS partition:
    fdisk /mbr

    Boot Loader Questions

    Error When Installing LILO to the Master Boot Record (MBR)

        Question:
        The installation went fine, but when I tried to write the LILO     information to the MBR, I got a vague error that said the installation program     could not write this info to the MBR. What should I do?
    Answer:
        The MBR may be locked. You need to access your system's BIOS and verify that the MBR is not write-protected. Also, double-check that you do not have a virus scan enabled in the BIOS that may interfere with writing to the MBR. Depending on the system, you may already have another boot loader in the MBR that conflicts with LILO.
        Once you have enabled the ability to write to your MBR, follow these     steps to install LILO there:
    1.     Boot your system into Linux. (If your system cannot boot into Linux     from the hard drive, boot using your boot floppy. Then, at the boot     prompt, type vmlinuz root=/dev/hda5 at the     LILO: prompt or the location of your Linux root     partition.)    
    2.     Once your system is finished booting, login as root and check your     /etc/lilo.conf file to make sure everything is     correct. Here is an example lilo.conf file:    

    1. boot=/dev/hda
    2. map=/boot/map
    3. install=/boot/boot.b
    4. prompt
    5. timeout=50
    6. message=/boot/message
    7. linear
    8. default=linux

    9. image=/boot/vmlinuz-2.2.17-14
    10.     label=linux
    11.     initrd=/boot/initrd-2.2.17-14.img
    12.     read-only
    13.     root=/dev/hda5

    14. image=/boot/vmlinuz-2.2.16-22enterprise
    15.     label=linux-2.2.16-22
    16.     initrd=/boot/initrd-2.2.16-22.img
    17.     read-only
    18.     root=/dev/hda5
        These steps should install LILO to your MBR properly and allow you to     boot without using a boot disk.
    ___________________________________________________________

    Problems Booting to Windows After the Installation of Red Hat Linux

        Question:
        I have installed Linux to dual boot with Windows. My first drive,     /dev/hda is Linux, and my second drive is my     Windows drive. Windows worked fine until after I installed Linux. Now,     when I select "dos" from the LILO: prompt to boot to     Windows, all I get is "Starting...." and then my machine locks, up. My     entry for Windows in my /etc/lilo.conf file looks     like this:
    other=/dev/hdb1
          label=dos
          table=/dev/hdb
        Why is this happening and how can I work around it?
    Answer:
        Windows is expecting to be the first disk in your computer and does not     know what to do when you try to boot it as the second drive. In order to     work around this, you must modify your     /etc/lilo.conf file so that the entry for Windows     looks like this:
    other=/dev/hdb1
          label=dos
          table=/dev/hdb
          map-drive = 0x80
          to = 0x81
          map-drive = 0x81
          to = 0x80
        Once you have done this, you must re-run LILO so that your changes take     effect. To do this, type /sbin/lilo -v -v.
        What this does is fool DOS/Windows into believing that it is the first     drive in your system.
    ___________________________________________________________

    What to Do When You Get 'LI' on Boot

        Question:
    When my machine boots, all it says is 'LI' and then it freezes. What is the problem?
        Answer:
    This means that LILO (the Linux bootloader) is having problems bootstrapping itself to the system. There are a couple of possible situations that may be causing this:
    •     You may have installed LILO above the 1024th cylinder on your hard     drive. The kernel needs to reside entirely below the 1023rd cylinder on     the drive. If this is the case, you need to create a     /boot partition that resides in these limits and     reinstall LILO.    
    •     You may also need to go into your system's BIOS and make certain     that LBA mode is enabled. If LBA was off, you will need to     repartition and reinstall.    
    ___________________________________________________________

    When to Use Loadlin

        Question:
        When do I need to use loadlin?
        Answer:
        You will need an alternative to LILO if you can not install the Linux     kernel to where the BIOS can reach it or you do not wish to use it. The     BIOS may not be able to reach it for one of the following reasons:
    •     The kernel is above the 1023 cylinder of the hard drive.    
    •     The kernel is on a drive the BIOS cannot boot to (not on Primary     IDE or SCSI chain).    
    •     Other esoteric kernel/BIOS problems.    
    •     You have hardware that can only be initialized in DOS (Plug     and Play, etc).    
        You will probably need to use the Loadlin boot loader that is provided     on the CD-ROM in \dosutils. You will need to copy     this directory over to your DOS hard drive partition and edit the     autoboot.bat file to point to its new position and     removing the initrd= line. If your system is     a SCSI system, you will need to go into rescue mode and copy the     /mnt/boot/initrd.img from the hard drive over to     the DOS partition, and use it for booting.
    ___________________________________________________________

    Changing the Default OS That Boots with LILO

        Question:
    I installed LILO fine and can boot to either OS. How can I change the default OS that it boots to?
        Answer:
        For newer versions of Red Hat Linux, /etc/lilo.conf     accepts a default= line that specifies     the label of the image section that will be used to boot the machine by     default. So, for example, a /etc/lilo.conf file may     look like this:
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50
    message=/boot/message
    linear
    default=linux

    image=/boot/vmlinuz-2.2.17-14
        label=linux
        initrd=/boot/initrd-2.2.17-14.img
        read-only
        root=/dev/hda5

    image=/boot/vmlinuz-2.2.16-22
        label=linux-old
        initrd=/boot/initrd-2.2.16-22.img
        read-only
        root=/dev/hda5
        The default= line points to the     label=linux as the default image to use     when booting the system.
        To change the default image to use when booting, simply change the     default= line to point to the correct     label value (in this example,     linux-old). Save     /etc/lilo.conf and run the lilo -v     -v command to save the change.
    For older Red Hat Linux systems, you will also need to edit the /etc/lilo.conf file. However, since these versions cannot specify a default= line, you will need to change the order of the operating systems that LILO sees in its configuration file. In other words, you will need to place the lines that point to the operating system you would like to boot by default ahead of the others.
        In the following example we change the order of booting so that DOS gets     booted by default instead of Linux:
    pico /etc/lilo.conf
    Here is the old version:
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50

        image=/boot/vmlinux-2.2.12-20
        label=linux
        root=/dev/hda2
        read-only

        other = /dev/hda1
        label = dos
        table = /dev/hda
    You would then change it to the following:
    boot=/dev/hda
    map=/boot/map
    install=/boot/boot.b
    prompt
    timeout=50

        other = /dev/hda1
        label = dos
        table = /dev/hda

        image=/boot/vmlinux-2.2.12-20
        label=linux
        root=/dev/hda2
        read-only
    Save your changes to the file. At the shell prompt, run the command /sbin/lilo -v and the updated LILO will be written to the boot device. On reboot, the machine will now boot into DOS by default instead of Linux.
    ___________________________________________________________

    Removing LILO Information from the Master Boot Record (MBR)

        Question:
    How can I remove the LILO information from my Master Boot Record (MBR)?
        Answer:
    There are several methods to removing LILO from the Master Boot Record of the machine. Inside of Linux, you can replace the MBR with an earlier saved version of the MBR using the /sbin/lilo command:
    /sbin/lilo -u
    In DOS, NT, and Windows 95 you can use the fdisk command to create a new MBR with the "undocumented" flag /mbr. This will rewrite the MBR to only boot the primary DOS partition:
    fdisk /mbr
  •     Once you are sure that /etc/lilo.conf is     properly configured, run /sbin/lilo -v -v. If you     receive any errors, stop and verify that your     lilo.conf file is correctly configured. If the     lilo command works correctly, type     shutdown -r now to reboot your system.    
  •     Type man lilo.conf for more information about     configuring /etc/lilo.conf.    
  •     Once you are sure that /etc/lilo.conf is     properly configured, run /sbin/lilo -v -v. If you     receive any errors, stop and verify that your     lilo.conf file is correctly configured. If the     lilo command works correctly, type     shutdown -r now to reboot your system.    
  • No comments:

    Post a Comment

    Note: only a member of this blog may post a comment.