neocytrix Posted September 18, 2006 Report Share Posted September 18, 2006 Hello Again, When installing Debian, grub for some reason failed, and I was forced to install Lilo. However, now I can only boot into Linux(I have a dual boot system with Windows XP) Where could I edit lilo to reconize and give me the option to boot windows? Neocytrix Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted September 18, 2006 Report Share Posted September 18, 2006 You need to edit /etc/lilo.conf. Here is my lilo.conf, so you can see how my system is booting: default="linux-i686-up-4GB" boot=/dev/hda prompt nowarn timeout=50 message=/boot/message image=/boot/vmlinuz-i686-up-4GB label="linux-i686-up-4GB" root=/dev/hda2 initrd=/boot/initrd-i686-up-4GB.img append="resume=/dev/hda3 splash=silent" vga=788 image=/boot/vmlinuz-2.6.12-25mdk-i686-up-4GB label="2612i686up4G-25" root=/dev/hda2 initrd=/boot/initrd-2.6.12-25mdk-i686-up-4GB.img append="resume=/dev/hda3 splash=silent" vga=788 other=/dev/hda1 label="windows" of course, I'm using Mandriva, but it doesn't matter what distro, the config should be more or less the same. The bit you are interested in is the bottom part. Quote Link to comment Share on other sites More sharing options...
arctic Posted September 18, 2006 Report Share Posted September 18, 2006 Other alternative: Apt-get the grub package and set up grub as explained in my etch (p)review. Quote Link to comment Share on other sites More sharing options...
neocytrix Posted September 18, 2006 Author Report Share Posted September 18, 2006 Okay I think I changed it but it still just boots linux without giving me the option to boot windows. Here is a copy of my /etc/lilo.conf # /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)', # --------------- `install-mbr(8)', `/usr/share/doc/lilo/', # and `/usr/share/doc/mbr/'. # +---------------------------------------------------------------+ # | !! Reminder !! | # | | # | Don't forget to run `lilo' after you make changes to this | # | conffile, `/boot/bootmess.txt' (if you have created it), or | # | install a new kernel. The computer will most likely fail to | # | boot if a kernel-image post-install script or you don't | # | remember to run `lilo'. | # | | # +---------------------------------------------------------------+ # Specifies the boot device. This is where Lilo installs its boot # block. It can be either a partition, or the raw device, in which # case it installs in the MBR, and will overwrite the current MBR. # boot=/dev/hda # Specifies the device that should be mounted as root. (`/') # root=/dev/hda6 # This option may be needed for some software RAID installs. # # raid-extra-boot=mbr-only # Enable map compaction: # Tries to merge read requests for adjacent sectors into a single # read request. This drastically reduces load time and keeps the # map smaller. Using `compact' is especially recommended when # booting from a floppy disk. It is disabled here by default # because it doesn't always work. # # compact # Installs the specified file as the new boot sector # You have the choice between: text, bmp, and menu # Look in lilo.conf(5) manpage for details # #install=menu # Specifies the location of the map file # map=/boot/map # You can set a password here, and uncomment the `restricted' lines # in the image definitions below to make it so that a password must # be typed to boot anything but a default configuration. If a # command line is given, other than one specified by an `append' # statement in `lilo.conf', the password will be required, but a # standard default boot will not require one. # # This will, for instance, prevent anyone with access to the # console from booting with something like `Linux init=/bin/sh', # and thus becoming `root' without proper authorization. # # Note that if you really need this type of security, you will # likely also want to use `install-mbr' to reconfigure the MBR # program, as well as set up your BIOS to disallow booting from # removable disk or CD-ROM, then put a password on getting into the # BIOS configuration as well. Please RTFM `install-mbr(8)'. # # password=tatercounter2000 # Specifies the number of deciseconds (0.1 seconds) LILO should # wait before booting the first image. # delay=20 # You can put a customized boot message up if you like. If you use # `prompt', and this computer may need to reboot unattended, you # must specify a `timeout', or it will sit there forever waiting # for a keypress. `single-key' goes with the `alias' lines in the # `image' configurations below. eg: You can press `1' to boot # `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'. # # message=/boot/bootmess.txt # prompt # delay=100 # timeout=100 # Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>) # # vga=ask # vga=9 # # Kernel command line options that apply to all installed images go # here. See: The `boot-prompt-HOWTO' and `kernel-parameters.txt' in # the Linux kernel `Documentation' directory. # # append="" # If you used a serial console to install Debian, this option should be # enabled by default. # serial= # # Boot up Linux by default. # #default=Linux image=/vmlinuz label=Linux read-only # restricted # alias=1 initrd=/initrd.img image=/vmlinuz.old label=LinuxOLD read-only optional # restricted # alias=2 initrd=/initrd.img.old image=/dev/hda1 label=Windows restricted alias=4 # If you have another OS on this machine to boot, you can uncomment the # following lines, changing the device name on the `other' line to # where your other OS' partition is. # # other=/dev/hda4 # label=HURD # restricted # alias=3 other=/dev/hda1 label=Windows restricted alias=2 Thanks Quote Link to comment Share on other sites More sharing options...
arctic Posted September 18, 2006 Report Share Posted September 18, 2006 Uncomment the restricted and alias entries for Windows with a "#" and run lilo again. And make sure you dont have two entries that kill off each other: initrd=/initrd.img.old image=/dev/hda1 label=Windows restricted alias=4 ... other=/dev/hda1 label=Windows restricted alias=2 Quote Link to comment Share on other sites More sharing options...
neddie Posted September 18, 2006 Report Share Posted September 18, 2006 This might be a daft question, but would it be possible to add an entry in lilo to boot from the cd drive? At the moment I get a very short time at power on in which to press F12 where I can select to boot from CD, otherwise it boots from the hd and offers the lilo menu for Mandriva / the other one. It would be nice if there was a cd option in lilo too, if that's possible, but I don't know how it would look? It wouldn't just be the same as the windows one but with /dev/cdrom would it? Quote Link to comment Share on other sites More sharing options...
neocytrix Posted September 18, 2006 Author Report Share Posted September 18, 2006 Still no Luck. Here is my present lilo.conf # /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)', # --------------- `install-mbr(8)', `/usr/share/doc/lilo/', # and `/usr/share/doc/mbr/'. # +---------------------------------------------------------------+ # | !! Reminder !! | # | | # | Don't forget to run `lilo' after you make changes to this | # | conffile, `/boot/bootmess.txt' (if you have created it), or | # | install a new kernel. The computer will most likely fail to | # | boot if a kernel-image post-install script or you don't | # | remember to run `lilo'. | # | | # +---------------------------------------------------------------+ # Specifies the boot device. This is where Lilo installs its boot # block. It can be either a partition, or the raw device, in which # case it installs in the MBR, and will overwrite the current MBR. # boot=/dev/hda # Specifies the device that should be mounted as root. (`/') # root=/dev/hda6 # This option may be needed for some software RAID installs. # # raid-extra-boot=mbr-only # Enable map compaction: # Tries to merge read requests for adjacent sectors into a single # read request. This drastically reduces load time and keeps the # map smaller. Using `compact' is especially recommended when # booting from a floppy disk. It is disabled here by default # because it doesn't always work. # # compact # Installs the specified file as the new boot sector # You have the choice between: text, bmp, and menu # Look in lilo.conf(5) manpage for details # #install=menu # Specifies the location of the map file # map=/boot/map # You can set a password here, and uncomment the `restricted' lines # in the image definitions below to make it so that a password must # be typed to boot anything but a default configuration. If a # command line is given, other than one specified by an `append' # statement in `lilo.conf', the password will be required, but a # standard default boot will not require one. # # This will, for instance, prevent anyone with access to the # console from booting with something like `Linux init=/bin/sh', # and thus becoming `root' without proper authorization. # # Note that if you really need this type of security, you will # likely also want to use `install-mbr' to reconfigure the MBR # program, as well as set up your BIOS to disallow booting from # removable disk or CD-ROM, then put a password on getting into the # BIOS configuration as well. Please RTFM `install-mbr(8)'. # # password=tatercounter2000 # Specifies the number of deciseconds (0.1 seconds) LILO should # wait before booting the first image. # delay=20 # You can put a customized boot message up if you like. If you use # `prompt', and this computer may need to reboot unattended, you # must specify a `timeout', or it will sit there forever waiting # for a keypress. `single-key' goes with the `alias' lines in the # `image' configurations below. eg: You can press `1' to boot # `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'. # # message=/boot/bootmess.txt # prompt # delay=100 # timeout=1000 # Specifies the VGA text mode at boot time. (normal, extended, ask, <mode>) # # vga=ask # vga=9 # # Kernel command line options that apply to all installed images go # here. See: The `boot-prompt-HOWTO' and `kernel-parameters.txt' in # the Linux kernel `Documentation' directory. # # append="" # If you used a serial console to install Debian, this option should be # enabled by default. # serial= # # Boot up Linux by default. # #default=Linux image=/vmlinuz label=Linux read-only # restricted # alias=1 initrd=/initrd.img image=/vmlinuz.old label=LinuxOLD read-only optional # restricted # alias=2 initrd=/initrd.img.old image=/dev/hda1 label=Windows read-only #restricted #alias=2 # If you have another OS on this machine to boot, you can uncomment the # following lines, changing the device name on the `other' line to # where your other OS' partition is. #other=/dev/hda4 # label=HURD # restricted # alias=3 When I go to the konsole and type Lilo I get the following: Added Linux * Skipping /vmlinuz.old Added Windows However when I boot the computer it still does the same: It says Lilo (with the version number I think) Then it waits a second and starts booting linux Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted September 19, 2006 Report Share Posted September 19, 2006 Edit this section like so: # Specifies the number of deciseconds (0.1 seconds) LILO should # wait before booting the first image. # #delay=20 # You can put a customized boot message up if you like. If you use # `prompt', and this computer may need to reboot unattended, you # must specify a `timeout', or it will sit there forever waiting # for a keypress. `single-key' goes with the `alias' lines in the # `image' configurations below. eg: You can press `1' to boot # `Linux', `2' to boot `LinuxOLD', if you uncomment the `alias'. # # message=/boot/bootmess.txt prompt nowarn # delay=100 timeout=100 That's the typical lilo.conf setup. You probably had your "delay" set too short. The above should give you a ten second delay before automatically booting the default OS. Quote Link to comment Share on other sites More sharing options...
neocytrix Posted September 20, 2006 Author Report Share Posted September 20, 2006 Okay I changed it to what you wanted and now I get the option menu :D But I still can't boot Windows, it says unexpected EOF, Does this mean that maybe theres a syntax error in my lilo.conf? neocytrix Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted September 20, 2006 Report Share Posted September 20, 2006 (edited) Yeah, the windows entry doesn't look right either. Try this: other=/dev/hda1 label=Windows table=/dev/hda read-only This assumes your windows install is on hda1 and the boot drive is hda. Edited September 20, 2006 by pmpatrick Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted September 20, 2006 Report Share Posted September 20, 2006 Yeah, the windows entry doesn't look right either I did give this info earlier too, but my post obviously wasn't read. See the very first reply to this post :P Hence why you were still having problems with your lilo config!!!!! Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted September 20, 2006 Report Share Posted September 20, 2006 Also note, I edited my above post; it should be "other=/dev/hda1", not "image=/dev/hda1". Quote Link to comment Share on other sites More sharing options...
neocytrix Posted September 23, 2006 Author Report Share Posted September 23, 2006 Got it!!!! Thank you so much to everyone who helped me with this problem. I really appreciate it :-) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.