help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:


From: Arbiel Perlacremaz
Subject: Re:
Date: Mon, 28 Apr 2014 12:10:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hi

Maybe the conversation I once had with Andrey Borzenkov will help you. Look in grub's 2014 february archive (2014/02/15 15:48) for

Proposal for fixing bootinfoscript when grub v2.00 sits on the MBR

However I now always have grub-install install stage 2 files in a unique grub partition, distinct from /boot as the later has not to be shared among several distributions.

Arbiel

Le 27/04/2014 14:57, plmalternate plmalternate a écrit :
Can anyone point me toward some approach that I might could hammer and
whittle into a bash-scriptable way of determining which partition grub
is looking in for stage 2 files (that is to say wherever it has to
look after getting everything it can out of the
before-the-first-partition area?

I used bootinfoscript from the ubuntu 14.04 repository but the only
relevant part of its output gives me:

"Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
     the same hard drive for core.img. core.img is at this location and looks
     in partition 94 for ."

I only have 8 partitions, not 94 and that "for ." looks like some
variable didn't get set.  So I can't see any way to use that.

I also found in this old thread:
http://ubuntuforums.org/showthread.php?t=837791
this code:

sudo dd if=/dev/sda  bs=1 skip=1049 count=2 | hexdump

which was supposed to give an output that could be interpreted to give
the info I'm after but
the thread was about grub-legacy and the scheme for interpretation
given there didn't seem applicable to the output I got which was:

2+0 records in
2+0 records out
2 bytes (2 B) copied, 0.000104627 s, 19.1 kB/s
0000000 ffff
0000002

It won't do to look for /boot/grub because any or all OSs on any or
all partition could have once BEEN the partition with stage 2 files
but not be any more. Nor do I think it would do to simply look for
evidence of which OS was installed most recently and assume that is
the one
with stage 2 files because the most recent could have been installed
without reinstalling grub.

To reiterate, I'm not looking to find this information out for my
present rig, which is trivial. I looking for something I might could
work into a scriptable way to solve the general case.
Thanks for reading.

_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub





reply via email to

[Prev in Thread] Current Thread [Next in Thread]