Difference between revisions of "Package:Lilo"

From Funtoo
Jump to navigation Jump to search
m
m (add debian sources support)
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:
__TOC__
__TOC__
'''Lilo''' linux loader is a boot loader to load linux, and other operating systems.  Lilo is called by default when running make install in kernel source directories.
'''Lilo''' linux loader is a boot loader to load linux, and other operating systems.  Lilo is called by default when running make install in kernel source directories.
=Installation=
==Installation==
==Emerge==
===Emerge===
<console>###i## emerge lilo</console>
<console>###i## emerge lilo</console>


=Configure=
==Configure==


Lilo's default configuration example has hda references, lets change those to sda recursively using sed.
Lilo's default configuration example has hda references, lets change those to sda recursively using sed.
Line 17: Line 17:
<console>###i## cp /etc/lilo.conf.example /etc/lilo.conf</console>
<console>###i## cp /etc/lilo.conf.example /etc/lilo.conf</console>


==Default OS==
=== Loading Initramfs/Initrd ===
{{file|name=/etc/lilo.conf|desc=initramfs/initrd do not require root=, however they must have real_root appended|body=
image = /boot/bzImage
initrd=/boot/init.bzImage
label = Funtoo-Debsrcs
read-only # read-only for checking
append="quiet real_root=/dev/sda1"}}
 
===Default OS===


To change default booting os.
To change default booting os.
Line 28: Line 36:
}}
}}


==Timeout==
===Timeout===


To have lilo auto start after a set time.
To have lilo auto start after a set time.
Line 36: Line 44:
timeout=150}}
timeout=150}}


==Silence==
===Silence===


For silent kernel decompression at boot:
For silent kernel decompression at boot:
Line 45: Line 53:
append = "quiet"}}
append = "quiet"}}


==alternate init systems==
===alternate init systems===


to load an alternate init system, example systemd instead of openrc:
to load an alternate init system, example systemd instead of openrc:
Line 54: Line 62:
append = "quiet init=/usr/lib/systemd/systemd"}}
append = "quiet init=/usr/lib/systemd/systemd"}}


==Old Configs==
===Old Configs===


It is a good idea to keep an old image around in case problems crop up in new kernel builds.
It is a good idea to keep an old image around in case problems crop up in new kernel builds.
Line 65: Line 73:
         read-only # read-only for checking#}}
         read-only # read-only for checking#}}


=Kernel Linking=
==Kernel Linking==


Using symlinks is a good idea to be able to determine if the loader is loading the correct image, and enable tab auto completion to ensure we are loading what we intend to.  symlinks remove an easy area to fumble when adjusting configurations.
Using symlinks is a good idea to be able to determine if the loader is loading the correct image, and enable tab auto completion to ensure we are loading what we intend to.  symlinks remove an easy area to fumble when adjusting configurations.
First install of debian sources:
{{console|body=###i## ln -s /boot/kernel-debian-sources-* /boot/bzImage}}
{{console|body=###i## ln -s /boot/initramfs-debian-sources-* /boot/init.bzImage}}
If you have multiple debian sources installed, and compiled, change the * to the exact file name.


<console>###i## ln -s /boot/vmlinuz-version /boot/bzImage</console>
<console>###i## ln -s /boot/vmlinuz-version /boot/bzImage</console>
Line 74: Line 87:
{{fancynote|if you do not use make install to copy your kernel to /boot, you must run lilo to load the new kernel images & install lilo to the hard drives mbr}}
{{fancynote|if you do not use make install to copy your kernel to /boot, you must run lilo to load the new kernel images & install lilo to the hard drives mbr}}


==Install==
===Install===
Install lilo to the MBR.
Install lilo to the MBR.
<console>###i## lilo</console>
{{console|body=###i## lilo}}
 
=== Troubleshooting ===
problem: Fatal: First sector of /dev/sda1 doesn't have a valid boot signature
solution: delete or comment out un-used blocks at the bottom of /etc/lilo.conf and just leave in the funtoo statements.


[[Category:Bootloaders]]
[[Category:Bootloaders]]
{{EbuildFooter}}
{{EbuildFooter}}

Latest revision as of 02:38, June 1, 2015

Lilo

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


Lilo linux loader is a boot loader to load linux, and other operating systems. Lilo is called by default when running make install in kernel source directories.

Installation

Emerge

root # emerge lilo

Configure

Lilo's default configuration example has hda references, lets change those to sda recursively using sed.

root # sed -i -e 's/hda/sda/' /etc/lilo.conf.example

Now we copy the example configuration to the running configuration.

root # cp /etc/lilo.conf.example /etc/lilo.conf

Loading Initramfs/Initrd

   /etc/lilo.conf - initramfs/initrd do not require root=, however they must have real_root appended
image = /boot/bzImage
	initrd=/boot/init.bzImage
	label = Funtoo-Debsrcs
	read-only # read-only for checking
	append="quiet real_root=/dev/sda1"

Default OS

To change default booting os.

   /etc/lilo.conf
# MBR to install LILO to:
boot = /dev/sda
map = /boot/.map
default = Funtoo

Timeout

To have lilo auto start after a set time.

   /etc/lilo.conf
# If you always want to see the prompt with a 15 second timeout:
timeout=150

Silence

For silent kernel decompression at boot:

   /etc/lilo.conf
label = Funtoo
	read-only # read-only for checking
	append = "quiet"

alternate init systems

to load an alternate init system, example systemd instead of openrc:

   /etc/lilo.conf
label = Funtoo-systemd
	read-only # read-only for checking
	append = "quiet init=/usr/lib/systemd/systemd"

Old Configs

It is a good idea to keep an old image around in case problems crop up in new kernel builds.

   /etc/lilo.conf
#image = /boot/bzImage.old
        root = /dev/sda3
        #root = /devices/discs/disc0/part3
        label = funtoo.old
        read-only # read-only for checking#

Kernel Linking

Using symlinks is a good idea to be able to determine if the loader is loading the correct image, and enable tab auto completion to ensure we are loading what we intend to. symlinks remove an easy area to fumble when adjusting configurations.

First install of debian sources:

root # ln -s /boot/kernel-debian-sources-* /boot/bzImage
root # ln -s /boot/initramfs-debian-sources-* /boot/init.bzImage

If you have multiple debian sources installed, and compiled, change the * to the exact file name.

root # ln -s /boot/vmlinuz-version /boot/bzImage
root # ln -s /boot/vmlinuz-version.old /boot/bzImage.old
   Note

if you do not use make install to copy your kernel to /boot, you must run lilo to load the new kernel images & install lilo to the hard drives mbr

Install

Install lilo to the MBR.

root # lilo

Troubleshooting

problem: Fatal: First sector of /dev/sda1 doesn't have a valid boot signature solution: delete or comment out un-used blocks at the bottom of /etc/lilo.conf and just leave in the funtoo statements.