Grubb list menu

NoOp glgxg at sbcglobal.net
Sat Oct 27 22:55:45 UTC 2012


On 10/27/2012 01:53 PM, Tom H wrote:
> On Thu, Oct 25, 2012 at 11:27 PM, NoOp <glgxg at sbcglobal.net> wrote:
...
>> Tom, I ran into an issue with a new netbook with Win 7 Starter on it.
>> Grub 2 was showing both the Windows Recovery partitions as well as a
>> second (HP bootloader) 'Windows 7 (loader) /dev/sda2'. I finally figured
>> out that I could insert both 'if statements to get rid of both:
>>
>> /etc/grub.d/30_os-prober:
>> ====
>> wubi=
>>
>> for OS in ${OSPROBED} ; do
>>   DEVICE="`echo ${OS} | cut -d ':' -f 1`"
>>   LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
>>   LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
>>   BOOT="`echo ${OS} | cut -d ':' -f 4`"
>>
>>   if [ -z "${LONGNAME}" ] ; then
>>     LONGNAME="${LABEL}"
>>   fi
>>
>> # WinRecov removal
>> if [ "$LONGNAME" = "Windows Recovery Environment (loader)" ] ; then
>> continue
>> fi
>>
>>  if [ "$LONGNAME" = "Windows 7 (loader)" ] && [ "$DEVICE" = "/dev/sda2"
>> ] ; then
>> continue
>> fi
>> # End WinRecov removal
>> ===
>>
>> For those wondering what all of this is about, read the thread. The
>> modifications are those starting with:
>>
>> # WinRecov removal
>> and
>> ending with
>> # End WinRecov removal
>>
>> Insert those bits following the section shown above.
>>...
> 
> 
> 1) I've just looked at "/etc/grub.d/30_os-prober" and it's changed
> since I posted [1].
> 
> With 12.04, you have insert the lines to exclude the Windows Recovery
> partition(s) between
> 
> <begin>
> if [ -z "${LONGNAME}" ] ; then
>  LONGNAME="${LABEL}"
> fi
> </end>
> 
> and
> 
> <begin>
> gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2
> </end>

?? Perhaps 12.10? in 12.04 I do not find gettext. My 30_os-prober is here:

http://paste.ubuntu.com/1310982/

> 
> 
> 2) The ouput of os-prober seems to have changed yet again because
> according to [2], it now prints
> 
> <begin>
> Found Windows Recovery Environment (loader) on /dev/sda1
> Found Windows 7 (loader) on /dev/sda2
> Found Windows Recovery Environment (loader) on /dev/sda3
> </end>

Commenting out my changes results in:

$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-32-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-32-generic-pae
...
Found Windows 7 (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda2
Found Windows Recovery Environment (loader) on /dev/sda3

and grub2 boot menu:

Ubuntu, with Linux 3.2.0-32-generic-pae
Ubuntu, with Linux 3.2.0-32-generic-pae (recovery mode)
Previous Linux versions
Windows 7 (loader) (on /dev/sda1)
Windows 7 (loader) (on /dev/sda2)
Windows Recovery Environment (loader) (on /dev/sda3)

I of course have eliminated memtest86.

> 
> 1. https://lists.ubuntu.com/archives/ubuntu-users/2010-February/210704.html
> 
> 2. http://ubuntuforums.org/showthread.php?t=2055552
> 
> 
> 3) Totally OT:
> 
> There was a post by Karl in that thread!
> 
> https://lists.ubuntu.com/archives/ubuntu-users/2010-February/210343.html
> 

:-)






More information about the ubuntu-users mailing list