Skip to content Skip to main navigation Skip to footer

Installation Tips for Linux

  • If the Limit Primaries option in BootIt BM is not enabled, then be sure that the Linux installation does not create any new partitions.  You may need to use the custom option to ensure this.

  • If Limit Primaries is not enabled then be sure you include the Linux Swap partition in the MBR Details of the menu item you create.  If you omit it, Linux will create one and can overwrite other partitions on your hard drive.

  • When using redhat 6.1/7 GUI installation don't get confused.  Indented is selected and filled in (popped up) is not selected.  Double check your installation package by clicking on radio buttons/check boxes to see what the result is.

  • Linux can be completely installed on any hard drive and partition.

  • You'll need to have at least two partitions for Linux. One Linux Swap Partition (82h/130) and one native Linux ext2 partition for the root (83h/131).

  • If you move the location of the Linux native partition in the MBR (including from drive to drive) and are using LILO then you must supply the root partition at the "LILO Boot:" prompt and then update the /etc/lilo.conf (as explained below). 

    For example:

    LILO Boot: linux root=/dev/hdxx

    After booting, you must also update the /etc/fstab on the new partition.  In order to update fstab and lilo.conf you will probably need to remount the partition as read/write.  For example, if you were at the bash# prompt you would type in "mount -o remount,rw -n /dev/hdxx /" where hdxx is the partition where /etc is.  Don't forget to type "lilo" and press enter after updating /etc/lilo.conf.

  • If you are using GRUB and copied or rearranged your Linux partitions then you can do one of the following:

    (Special thanks to Tom P. for providing this information)

    "After doing some experimenting myself, the following 2 examples show what looks to me like the easiest way to handle Grub after copying a bootable Linux partition. There's other sequences that can be used, but these will work:"

    Example 1: /boot directory is on the root partition
    - original root partition = /dev/hda1
    - copy of root partition = /dev/hdb1
    - kernel path = /boot/vmlinuz
    - grub is originally installed in the boot sector of /dev/hda1

    1) After copying, set up the new boot item for /dev/hdb1 in BootIt BM

    2) Boot the new boot item from the BootIt BM Boot Menu

    3) At the Grub menu enter 'c' to go to command mode

    4) At the Grub command prompt, do these commands in order:
       root (hd1,0) 
       setup (hd1,0)
       kernel /boot/vmlinuz root=/dev/hdb1 ro
       boot

    5) Once booted, edit /etc/fstab to change /dev/hda1 reference to
       /dev/hdb1 (also change others if needed)

    6) Do the same in /boot/grub/menu.lst, and also change (hd0,0)
       references to (hd1,0)

    7) Reboot to test, and use 'df' to verify root partition is /dev/hdb1

    Note 1: In Red Hat, menu.lst is a link to grub.conf

    Example 2: /boot is on it's own partition
    - original /boot partition = /dev/hda1
    - copy of /boot partition = /dev/hdb1
    - original root partition = /dev/hda2
    - copy of root partition = /dev/hdb2
    - kernel path = /boot/vmlinuz (but it's /vmlinuz to grub)
    - grub is originally installed in the boot sector of /dev/hda1

    1) After copying, set up the new boot item for /dev/hdb1 in BootIt BM

    2) Boot the new boot item from the BootIt BM Boot Menu

    3) At the Grub menu enter 'c' to go to command mode

    4) At the Grub command prompt, do these commands in order:
       root (hd1,0) 
       setup (hd1,0)
       kernel /vmlinuz root=/dev/hdb2 ro
       boot

    5) Once booted, edit /etc/fstab to change /dev/hda1 and /dev/hda2
       references to /dev/hdb1 and /dev/hdb2 (also change others if needed)

    6) Don't edit /boot/grub/menu.lst at this time since /boot will still be
       /dev/hda1 (but see Note 2 below)
      
    7) Instead, mount /dev/hdb1 at a convenient mount point (/mnt/xxxx), and then edit /mnt/xxxx/grub/menu.lst to change /dev/hda2 to /dev/hdb2 and also hd(0,0) to hd(1,0)

    8) Reboot to test, and use 'df' to verify correct partitions are mounted

    Note 1: In Red Hat, menu.lst is a link to grub.conf

    Note 2: In Step 6, if /etc/fstab is using the "LABEL=xxx" syntax, the
    correct /boot partition may already be mounted. If it is, you should
    get an error message in Step 7 that /dev/hdb1 is already mounted.

  • If you have lost the ability to use LILO to boot your partition then, you can do one of the following:

    (Special thanks to Tom P. for providing this information)

    1) Download a general purpose Linux boot disk like tomsrtbt, mount the root partition, make (any needed) changes to /etc/lilo.conf and run lilo. You may want to use chroot (change root) because lilo (on the boot disk) will complain if a different version of lilo was originally used. chroot allows you to run lilo on the root partition instead the boot disk so there's no version mismatch. It also makes sure that the /etc/lilo.conf on the root partition will be used.

    mount /dev/whatever_root_is /mnt
    chroot /mnt /sbin/lilo

    2) Use Loadlin.exe to boot Linux from DOS (has to be real mode DOS). For that you need loadlin.exe and a kernel. Both can usually be found on the Linux CD. The kernel can be the default kernel from the CD (it's enough to boot and run Lilo). From a DOS prompt:

    loadlin kernel_filename root=/dev/whatever_root_is ro

    The 'ro' is to mount read-only.

     

    If you have Windows running, you could also use Explore2fs to get the actual kernel file from the Linux root partition via Windows, and then run loadlin. It works on 9X and NT for sure, and (probably) ME, although it hasn't been updated in a while. 

    3) You can boot another Linux installation (if you have one) and then do the same steps as number 1 above (using chroot etc...)

    4) Another way might be to boot from the Linux CD, switch to a console, mount the root partition, and then use chroot as above. How (exactly) to get to that console (probably) varies depending on the distribution, but most Linux install CDs should have a way to do it. 

  • An example installation with Limit Primaries enabled:

    Suppose you have one hard drive, BootIt BM installed and working, your BootIt BM boot media, and  the following partition layout:

    • 500MB FAT partition
    • 1.1GB Free Space
    • 9GB NTFS partition
    • 5.6GB  FAT32 partition

    Now let's say you want  to install Linux Red Hat 6.1:

    1. Since your limited to 4 primary partitions and Linux requires at least a Native and Swap partition you'll need to create an extended partition for the Linux installation.
      • Use the partition work dialog in BootIt BM to create an extended partition.   The new partition layout looks like this:
        • 500MB FAT partition
        • 1.1GB Extended partition
        •     Free Space
        • 9GB NTFS partition
        • 5.6GB FAT32 partition
      • Now create two volumes in the extended partition (Free Space indented).  The first one type 131 being 1024 MB's, the second one being type 130.   The new partition layout looks like this:
        • 500MB FAT partition
        • 1.1GB Extended partition
        •     1GB Linux Native
        •     100MB Linux Swap
        • 9GB NTFS partition
        • 5.6GB FAT32 partition
    2. Reset your system to begin the Linux installation.  Either via the boot diskette/CD, or CD. 
    3. Once it boots, Press enter for GUI install
    4. Once installation begins, choose your installation type.  Let's say you just choose the first option instead of custom.
    5. At the point where it asks on how to partition, choose "Manually Partition" (indented) then click next.
    6. Your partitions are listed. Choose your installation points.  For this example just double click on the Linux Native partition and assign it root (/).
    7. After this, just click next and continue with installation (If you choose custom you'll be given a chance to install LILO to the "First sector of boot partition".)
    8. Install is done and your system has just restarted and LILO boots.
      • If BootIt BM boots, then LILO was installed correctly to the "first sector of boot partition".
      • If BootIt BM does not boot but LILO does then LILO ended up in the MBR - See the above help on how to install LILO to the root partition or how to use LILO from the MBR.

Was This Article Helpful?

0