Hi all, anyone know of a method to determine which bootloader resides in the MBR, aside from the slightly hackish dd if=/dev/hda bs=512 count=1| strings Regards Dan -- buddha 2.6.4-54.5-default 9:05am an 19:31, 1 Benutzer,
On Tuesday 11 May 2004 06:09 am, Dan Am wrote:
Hi all,
anyone know of a method to determine which bootloader resides in the MBR, aside from the slightly hackish
dd if=/dev/hda bs=512 count=1| strings
Regards Dan
Maybe boot?? You can 'talk' to grub and use it's editing functions... Try typing an 'e' at the boot line after going to text mode. Grub will let you edit/add/delete statements in the boot sequence. A very handy feechur. -- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 05/11/04 07:07 + +----------------------------------------------------------------------------+ "Beauty is in the eye of the beer holder..."
Am Dienstag, 11. Mai 2004 13:08 schrieb Bruce Marshall:
A very handy feechur True enough, but what I am tring to solve is different: Rebooting a remote (very remote!) server, that has an unknown bootloader, after a kernel upgrade. So I must know wether I have to run LILO or not. Both Packages are installed. See the problem ?
Regards -- buddha 2.6.4-54.5-default 9:05am an 19:31, 1 Benutzer,
<snip>
True enough, but what I am tring to solve is different: Rebooting a remote (very remote!) server, that has an unknown bootloader, after a kernel upgrade. So I must know wether I have to run LILO or not. Both Packages are installed. See the problem ?
You can query the rpm database and see which one is installed. Or you can use pin. You can see if grub is on this machine by looking in the /boot directory. If grub is used, there should be a directory called grub inside the /boot directory. You can also check for a menu.lst file which to my knowledge is only used with grub. Maybe some of the above helps some. I would try using rpm or pin before looking in directories. Marshall
On Tuesday 11 May 2004 09:14 am, Marshall Heartley wrote:
<snip>
True enough, but what I am tring to solve is different: Rebooting a remote (very remote!) server, that has an unknown bootloader, after a kernel upgrade. So I must know wether I have to run LILO or not. Both Packages are installed. See the problem ?
You can query the rpm database and see which one is installed. Or you can use pin. You can see if grub is on this machine by looking in the /boot directory.
If grub is used, there should be a directory called grub inside the /boot directory. You can also check for a menu.lst file which to my knowledge is only used with grub.
Maybe some of the above helps some. I would try using rpm or pin before looking in directories.
Marshall
That's not definitive.... I have grub and lilo on some of my machines and thus, all of the things you mention above. Sometimes it's really hard to tell without booting and knowing what to look for. As I said in another email, one surefire way is to try to use grub's editing features at boot time. -- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 05/11/04 09:23 + +----------------------------------------------------------------------------+ "A man lives by believing in something, not by debating and arguing about many things." - Thomas Carlyle
<snip>
That's not definitive.... I have grub and lilo on some of my machines and thus, all of the things you mention above. Sometimes it's really hard to tell without booting and knowing what to look for.
I thought that you could not have 2 different boot loaders on the same machine like that?
As I said in another email, one surefire way is to try to use grub's editing features at boot time.
Unfortunately, the original poster was wanting to know before they rebooted the machine. Marshall
On Tuesday 11 May 2004 09:33 am, Marshall Heartley wrote:
<snip>
That's not definitive.... I have grub and lilo on some of my machines and thus, all of the things you mention above. Sometimes it's really hard to tell without booting and knowing what to look for.
I thought that you could not have 2 different boot loaders on the same machine like that?
Sure you can.... you just can't have them both in the MBR. But you could (and I have) used grub on the MBR and then have grub point to a 'target' partition, on which is loaded the lilo bootloader.... or vice versa. I use an Acronis boot loader.... which then points to grub on the target partition.... so Acronis boots grub... which could then boot another partition with lilo on it..... (yawn)..... and so forth.
As I said in another email, one surefire way is to try to use grub's editing features at boot time.
Unfortunately, the original poster was wanting to know before they rebooted the machine.
Marshall
-- +----------------------------------------------------------------------------+ + Bruce S. Marshall bmarsh@bmarsh.com Bellaire, MI 05/11/04 09:40 + +----------------------------------------------------------------------------+ "You might be a high-tech Red-neck if: you have ever saved the power cord from a broken appliance"
Sure you can.... you just can't have them both in the MBR.
Ok that is where I got confused! I'm back now! :)
But you could (and I have) used grub on the MBR and then have grub point to a 'target' partition, on which is loaded the lilo bootloader.... or vice versa.
I use an Acronis boot loader.... which then points to grub on the target partition.... so Acronis boots grub... which could then boot another partition with lilo on it..... (yawn)..... and so forth.
Gotcha! Thanks for clearing up the fog of ignorance! Marshall
On Tuesday 11 May 2004 15.33, Marshall Heartley wrote:
I thought that you could not have 2 different boot loaders on the same machine like that?
Not at all, you can have for example grub on the Master Boot Record and lilo on the boot record of hda1, the NT boot loader on the boot record of hda2, the Solaris boot loader on hda3 etc. Lots of possibilities, and since the boot record isn't part of any one installation, there is no way to determine which one is there without examining the actual contents of the boot record the dd command that Dan gave himself in his original post should do the trick. SuSE's /sbin/new-kernel-pkg only checks for installed packages. The dd should be more reliable.
On Tue, 2004-05-11 at 09:45, Anders Johansson wrote:
On Tuesday 11 May 2004 15.33, Marshall Heartley wrote:
I thought that you could not have 2 different boot loaders on the same machine like that?
Not at all, you can have for example grub on the Master Boot Record and lilo on the boot record of hda1, the NT boot loader on the boot record of hda2, the Solaris boot loader on hda3 etc. Lots of possibilities, and since the boot record isn't part of any one installation, there is no way to determine which one is there without examining the actual contents of the boot record
Thanks Anders! I was a bit confused here but I think that you and Bruce got me back down here to reality!
the dd command that Dan gave himself in his original post should do the trick. SuSE's /sbin/new-kernel-pkg only checks for installed packages. The dd should be more reliable.
Now I can say that I learned something new today! Thanks so much! Marshall
On Tue, 2004-05-11 at 06:09, Dan Am wrote:
Hi all,
anyone know of a method to determine which bootloader resides in the MBR, aside from the slightly hackish
dd if=/dev/hda bs=512 count=1| strings
Aside from the straight-forward, hackish or not, you could try the classier, much more time consuming, more bulky and clumsy: "Yast->System->Boot Loader Configuration" and look... whew! That was SOOO much more work than the hackish way. Of course, if you have difficutly getting to yast remotely... oh well. I'll take hackish any day. It's what makes coomputers work. -- Brad Shelton On Line Exchange http://www.ole.net Phone: 313-526-1111 Fax: 313-526-3333
On Tuesday 11 May 2004 15.47, Brad Shelton wrote:
Aside from the straight-forward, hackish or not, you could try the classier, much more time consuming, more bulky and clumsy:
"Yast->System->Boot Loader Configuration"
and look... whew! That was SOOO much more work than the hackish way.
That method only looks at the yast configuration files, not at what is actually in the MBR. It might not be accurate, if a previous admin installed the bootloader manually
On Tue, 2004-05-11 at 10:06, Anders Johansson wrote:
On Tuesday 11 May 2004 15.47, Brad Shelton wrote:
Aside from the straight-forward, hackish or not, you could try the classier, much more time consuming, more bulky and clumsy:
"Yast->System->Boot Loader Configuration"
and look... whew! That was SOOO much more work than the hackish way.
That method only looks at the yast configuration files, not at what is actually in the MBR. It might not be accurate, if a previous admin installed the bootloader manually
Ah yes. Thanks for pointing that out. yet ANOTHER reason to take the hackish/computerish way out. `*8> -- Brad Shelton On Line Exchange http://www.ole.net Phone: 313-526-1111 Fax: 313-526-3333
Hi all, okok, thanks for your input. I think we'll settle for:
dd if=/dev/hda bs=512 count=1| strings
Actually I figured it out after I decided to post. Just thought, there might have been some "standard" command I missed. Thanks again :-) -dan -- buddha 2.6.4-54.5-default 9:05am an 19:31, 1 Benutzer,
On Tuesday 11 May 2004 3:21 pm, Dan Am wrote:
Hi all,
okok, thanks for your input. I think we'll settle for:
dd if=/dev/hda bs=512 count=1| strings
Actually I figured it out after I decided to post. Just thought, there might have been some "standard" command I missed. Thanks again :-) -dan -- buddha 2.6.4-54.5-default 9:05am an 19:31, 1 Benutzer,
Only just got home and to my email. Given that it is remote, you can't boot it remotely and see what happens. But if you can dd it, you could put it onto the boot sector of a floppy locally and try booting that. Even though it won't boot meaningfully, a GRUB boot sector will say 'GRUB' [just tried it] and a LILO will probably start to spell out 'LILO' - it uses that to indicate progress, so you might need to be off the boot sector before you get it all. Too late now, I know, but maybe useful in future? Vince
participants (6)
-
Anders Johansson
-
Brad Shelton
-
Bruce Marshall
-
Dan Am
-
Marshall Heartley
-
Vince Littler