Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    Join Date
    Dec 2001
    Location
    Netherlands
    Posts
    774

    how2check: lilo or grub -- remotely

    Hi,

    How do I determine if the bootloader in the system is lilo or grub when both the config files are present ?


    ███ Remote Hands/Cloud Setup @ Europe
    ███ DevOps for Hosting Comapanies
    ███ Cloud Consultancy and Setups
    ███ since 1997

  2. #2
    Good question. Basically when you update your boot loaders config file and write the MBR, then that boot loader takes over. I know that's not the answer you're looking for, but maybe it helps.

    You could always reboot the machine and watch the boot process through a remote console device.

  3. #3
    You could copy the boot sector to a file, using a command like this:

    dd if=/dev/hda of=/tmp/boot-img.mbr bs=512 count=1

    then download that file locally and use dd to write it to a floppy.

    boot off the floppy at your local workstation.

    I haven't tried it yet myself, but ran into the same problem before and thought of doing this to check.

  4. #4
    Join Date
    Aug 2002
    Location
    UK
    Posts
    1,040
    Interesting idea with dd.

    Last time a client asked us to check we got an on-site tech to watch the display output when we rebooted the box remotely
    Robin Balen
    Gyron Internet Ltd - http://gyron.net/
    UK colocation, managed hosting and connectivity services with 100% uptime SLAs

  5. #5
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    I would ask the person who installed it.
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

  6. #6
    Join Date
    Jan 2001
    Location
    Vienna, Austria
    Posts
    2,530
    Just a question:

    When you do: cat /root/anaconda-ks.cfg | grep bootloader

    and get

    bootloader

    as result, then you are using GRUB, right?

  7. #7
    Join Date
    Aug 2002
    Location
    UK
    Posts
    1,040
    I would ask the person who installed it.

    This person didn't have a clue which was installed
    Robin Balen
    Gyron Internet Ltd - http://gyron.net/
    UK colocation, managed hosting and connectivity services with 100% uptime SLAs

  8. #8
    Join Date
    Nov 2001
    Location
    Ann Arbor, MI
    Posts
    2,978
    Originally posted by Angel78
    When you do: cat /root/anaconda-ks.cfg | grep bootloader

    and get

    bootloader

    as result, then you are using GRUB, right?
    That seems like a good way to tell, if that file is there.
    I would just do a less on the file though, it's not like it's that long. It should indicate whether you specified a different bootloader. Smart thinking.
    -Mark Adams
    www.bitserve.com - Secure Michigan web hosting for your business.
    Only host still offering a full money back uptime guarantee and prorated refunds.
    Offering advanced server management and security incident response!

  9. #9
    Lets play devils advocate


    Why does it matter?

    I use LiLo. It rules.

    You can test a new kernel without fear of hosing your system that is 1500 miles away:

    lilo -R <new_image_name>

    Try that with grub! Mffff!
    "The only difference between a poor person and a rich person is what they do in their spare time."
    "If youth is wasted on the young, then retirement is wasted on the old"

  10. #10
    Join Date
    Jul 2001
    Location
    /dev/null
    Posts
    1,219
    But with grub you can define a fall-back kernel (the last working one for example) in the grub conf. This one would boot if there would be a problem with the current one for whatever reason. As far as I know this doesn't work with lilo.

  11. #11
    Join Date
    Dec 2001
    Location
    Netherlands
    Posts
    774
    Thank you all for responding.


    This is not a kernel upgrade issue, but just a question that someone asked me [to check my admin skills I guess, which in turn, all yours for this particular one.. ]

    [b]cat /root/anaconda-ks.cfg | grep bootloader


    bootloader
    bootloader --useLilo



    Is this the result of which it was at boot time, or at the current.
    err.. what exactly am I looking at ?

    The question is to tell him what bootloader will be used on his next reboot.

    still waiting for that magic answer...


    Last edited by admin0; 06-19-2003 at 02:38 AM.
    ███ Remote Hands/Cloud Setup @ Europe
    ███ DevOps for Hosting Comapanies
    ███ Cloud Consultancy and Setups
    ███ since 1997

  12. #12
    Use the dd method I suggested earlier - that will tell what is currently installed on the mbr, which will be the one that will be used on next boot.

    Checking the anaconda-ks.cfg file just tells you what got installed. Your's looks like it was told to use Lilo - but that could have been changed.

  13. #13
    Lilo ALSO can use a "fallback" kernel.

    Lilo -R <kernel image>

    That kernel will ONLY be loaded at next boot. Therefore lets say your kernel is built wrong, you messed up, whatever. Cal the DC and ask for a hard reboot, and it will reboot with your ORIGINAL kernel in place.
    "The only difference between a poor person and a rich person is what they do in their spare time."
    "If youth is wasted on the young, then retirement is wasted on the old"

  14. #14
    Join Date
    Apr 2002
    Location
    Cornfield
    Posts
    131
    Check the current running kernel with
    uname -a
    Check both config files - see which one (LILO or GRUB) has the correct kernel listed as default boot. If BOTH do - screw it. Run lilo -v, then tell the customer they use LILO.
    Fire extinguisher extraordinare
    -------------------------------
    FastServers.Net NOC Admin

  15. #15
    Join Date
    Dec 2001
    Location
    QLD, Australia
    Posts
    284
    Hey there,

    To identify if you're using lilo or grub.

    1) dd if=/dev/hda of=/tmp/boot.img bs=512 count=1
    2) cat /tmp/boot.img

    It's lilo if it has something about "Missing io.sys". It's GRUB if it mentions GRUB.

    Stuart
    Seekbrain.com - Personal Blog
    E-Currency Australia - Crypto Currency Services

Page 1 of 2 12 LastLast

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •