Re: The submenu command shows a text-based menu when using a GFX theme.

2012-02-23 Thread Vladimir 'φ-coder/phcoder' Serbinenko

On 24.02.2012 02:24, Towheed Mohammed wrote:

While 'export theme' fixes the issue more elegantly than what I had, it still 
results in the theme reloading when the submenu menuentry is selected.  
Reloading of the theme results in a screen flicker as the terminal window is 
shown before the theme reloads.

I cannot code in C nor do I profess to be anywhere close to scripting as you 
guys, but I think a better solution to fixing the submenu issue would be from 
source code.

Is it at all possible to simply load the menuentry items under the submenu 
command without having to reload the entire theme?  If it can be done, wouldn't 
it prevent the flicker seen as the theme reloads?

Problem is that it's possible to do something like:
submenu "xyz" {
   theme=...
}
And thus change the theme for submenu.

While at it, could you also please fix the keyboard lag that results when a gfx 
theme is used.  This is an issue with many users of gfx themes .

Thank you.

Towheed Mohammed

- Original Message -
From: Vladimir 'φ-coder/phcoder' Serbinenko
To: grub-devel@gnu.org
Cc:
Sent: Thursday, February 23, 2012 1:24 AM
Subject: Re: The submenu command shows a text-based menu when using a GFX theme.

On 23.02.2012 02:50, Towheed Mohammed wrote:

If a gfx theme is being used and the submenu command is used to show a submenu, 
the submenu does not use the gfx theme.  Instead a text-based menu is shown.  
The only way a regular user can workaround this at the moment is to reload the 
theme after the submenu menuentry item is selected.

In Ubuntu's (about the only distro that uses the submenu command at this time) 
use of the submenu in 10_linux:

 if [ "$list" ]&&   ! $in_submenu; then
   in_submenu=:
 fi

A regular user must patch 10_linux thus:

 if [ "$list" ]&&   ! $in_submenu; then
   echo "submenu \"Previous Linux versions\" --class submenu {"
   if [ "x$GRUB_THEME" != x ]&&   [ -f "$GRUB_THEME" ] \
   &&   is_path_readable_by_grub "$GRUB_THEME"; then
   prepare_grub_to_access_device `${grub_probe} --target=device 
"$GRUB_THEME"`
   cat<<   EOF
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
EOF
   fi
   in_submenu=:
 fi

What a perfect example of overengineering just to compensate for missing
"export theme". I've fixed it in trunk

to reload the theme and have a themed submenu.

Will this be fixed in the 2.00 release?


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel






--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: grub RAID heuristics (how can we avoid "superfluous RAID member (2 found)")

2012-02-23 Thread Daniel Kahn Gillmor
On Thu, 23 Feb 2012 06:43:23 +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
 wrote:
> Try attached patch

hrm, i get a segmentation fault from "grub-probe /" even without this
patch when building from bzr trunk (r3964, i think).

The test machine i've set up looks like this uses a common layering
scheme:
 disk → partition → mdadm (0.90 superblock) → lvm → filesystem

Here are the details and a backtrace of me trying:

0 root@trash:~# parted /dev/sda unit s print
Model: ATA WDC WD200BB-75DE (scsi)
Disk /dev/sda: 39062500s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  EndSize   Type File system  Flags
 1  8192s  12542018s  12533827s  primary
 2  12550144s  39062499s  26512356s  primary

0 root@trash:~# parted /dev/sdb unit s print
Model: ATA QUANTUM FIREBALL (scsi)
Disk /dev/sdb: 26520480s
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  EndSize   Type File system  Flags
 1  4096s  26520479s  26516384s  primary

0 root@trash:~# cat /proc/mdstat 
Personalities : [raid1] 
md0 : active raid1 sdb1[0] sda2[1]
  13256064 blocks [2/2] [UU]
  
unused devices: 
0 root@trash:~# pvs
  PV VGFmt  Attr PSize  PFree
  /dev/md0   vg_trash0 lvm2 a--  12.64g 9.64g
0 root@trash:~# vgs
  VG#PV #LV #SN Attr   VSize  VFree
  vg_trash0   1   1   0 wz--n- 12.64g 9.64g
0 root@trash:~# lvs
  LV   VGAttr   LSize Origin Snap%  Move Log Copy%  Convert
  root vg_trash0 -wi-ao 3.00g  
0 root@trash:~# grep ' / ' /proc/mounts 
rootfs / rootfs rw 0 0
/dev/mapper/vg_trash0-root / ext3 
rw,relatime,errors=remount-ro,user_xattr,acl,barrier=1,data=ordered 0 0
0 root@trash:~# cd - 
/home/dkg/src/grub/grub
0 root@trash:/home/dkg/src/grub/grub# gdb ./grub-probe
GNU gdb (GDB) 7.4-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/dkg/src/grub/grub/grub-probe...(no debugging symbols 
found)...done.
(gdb) run -v /
Starting program: /home/dkg/src/grub/grub/grub-probe -v /
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to 
/dev/mapper.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to /dev.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to md.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to dri.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to snd.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to cpu.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to 
vg_trash0.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to /dev.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to md.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to dri.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to snd.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to cpu.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to 
vg_trash0.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to disk.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-uuid.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-id.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to block.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to /dev.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to md.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to dri.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to snd.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to cpu.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to 
vg_trash0.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to disk.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-uuid.
/home/dkg/src/grub/grub/grub-probe: info: changing current directory to by-path.
/home/dkg/src/grub/grub/grub-probe: 

Re: grub legacy to grub2 upgrade path

2012-02-23 Thread Jordan Uggla
2012/2/22 Vladimir 'φ-coder/phcoder' Serbinenko :
>
> See parallel thread for heuristics. However note that this setup is
> fundamentally broken

To make it easier to find, said thread is available here:
http://lists.gnu.org/archive/html/grub-devel/2012-02/msg3.html

And ryuo, I assume that phcoder's recent request there for testing of
a patch for this applies to you as well.

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Search for images within sub-directories of the theme's directory.

2012-02-23 Thread Towheed Mohammed
The following components:
1. image
2. progress_bar, and

3. circular_progress

have the 'theme_dir' property.  A theme designer can use this property to place 
image files within sub-directories of the theme's directory.  However, 
00_header searches for images only in the theme's directory:


    if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo 
"$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then
        cat << EOF
    insmod jpeg
    EOF
     fi
     if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then
        cat << EOF
    insmod png
    EOF
     fi
     if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.tga" ]; then
        cat << EOF
    insmod tga
    EOF
     fi

Please modify 00_header so that it will search for image files within 
sub-directories of the theme's directory.


Thank you.

Towheed Mohammed


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: The submenu command shows a text-based menu when using a GFX theme.

2012-02-23 Thread Towheed Mohammed
While 'export theme' fixes the issue more elegantly than what I had, it still 
results in the theme reloading when the submenu menuentry is selected.  
Reloading of the theme results in a screen flicker as the terminal window is 
shown before the theme reloads.

I cannot code in C nor do I profess to be anywhere close to scripting as you 
guys, but I think a better solution to fixing the submenu issue would be from 
source code.

Is it at all possible to simply load the menuentry items under the submenu 
command without having to reload the entire theme?  If it can be done, wouldn't 
it prevent the flicker seen as the theme reloads?

While at it, could you also please fix the keyboard lag that results when a gfx 
theme is used.  This is an issue with many users of gfx themes .

Thank you.

Towheed Mohammed

- Original Message -
From: Vladimir 'φ-coder/phcoder' Serbinenko 
To: grub-devel@gnu.org
Cc: 
Sent: Thursday, February 23, 2012 1:24 AM
Subject: Re: The submenu command shows a text-based menu when using a GFX theme.

On 23.02.2012 02:50, Towheed Mohammed wrote:
> If a gfx theme is being used and the submenu command is used to show a 
> submenu, the submenu does not use the gfx theme.  Instead a text-based menu 
> is shown.  The only way a regular user can workaround this at the moment is 
> to reload the theme after the submenu menuentry item is selected.
>
> In Ubuntu's (about the only distro that uses the submenu command at this 
> time) use of the submenu in 10_linux:
>
>    if [ "$list" ]&&  ! $in_submenu; then
>      in_submenu=:
>    fi
>
> A regular user must patch 10_linux thus:
>
>    if [ "$list" ]&&  ! $in_submenu; then
>      echo "submenu \"Previous Linux versions\" --class submenu {"
>          if [ "x$GRUB_THEME" != x ]&&  [ -f "$GRUB_THEME" ] \
>              &&  is_path_readable_by_grub "$GRUB_THEME"; then
>              prepare_grub_to_access_device `${grub_probe} --target=device 
>"$GRUB_THEME"`
>              cat<<  EOF
> set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
> EOF
>          fi
>      in_submenu=:
>    fi
What a perfect example of overengineering just to compensate for missing 
"export theme". I've fixed it in trunk
>
> to reload the theme and have a themed submenu.
>
> Will this be fixed in the 2.00 release?
>
>
> ___
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


grub-mount (ubuntu) hangs with hfs+ partition

2012-02-23 Thread Kees Bakker

Hi,

In Ubuntu (and Debian I guess) there is a grub-mount command.
It's added to grub with branch_fuse.patch, and in that file it mentions
http://lists.gnu.org/archive/html/grub-devel/2011-01/msg00056.html

I have a MacPro system with Ubuntu installed and some HFS+
partitions. Everytime I do a kernel update (and update-grub)
it hangs when a grub-mount command is used on one of the HFS+
partitions.

The grub-mount command does not hang on all my HFS+ partitions.
But the fact that it hangs on one of them makes it very annoying.

I've tried to debug this problem, but I am not making any progress.
The program hangs in a while(1) loop at line 657 in grub-core/fs/hfsplus.c

BTW. I've also tried to contact Macro Gerards (the contributor of the HFS+
code), but I didn't get a reply from him.
--
Kees


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Re: Lists and aliasing (Re: Freeze on 27 February)

2012-02-23 Thread Lennart Sorensen
On Thu, Feb 23, 2012 at 07:17:49AM +0100, Vladimir 'φ-coder/phcoder' Serbinenko 
wrote:
> >../../../grub-core/normal/charset.c: In function
> 'grub_bidi_line_logical_to_visual':
> ../../../grub-core/normal/charset.c:737: error: cannot optimize
> possibly infinite
> > loops If I do what is already done for GRUB_LONG_MIN and use:
> #define GRUB_INT_MIN (-0x7fff - 1) ...then gcc 4.6 is happy. gcc
> 4.4 goes on complaining
> > about the inability to optimize possibly infinite loops.
> in charset.c we actually want to ensure that it doesn't go negative.
> In grub-mkfont.c it's ok to disable warning altogether. Here is the
> patch (+grub-install fix)

gcc-4.6 -DHAVE_CONFIG_H -I. -I../..  -Wall -W -I./include -DGRUB_UTIL=1 
-DGRUB_LIBDIR=\"/usr/lib/grub\" -DLOCALEDIR=\"/usr/share/locale\"  
-DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=POWERPC_EMU -DGRUB_TARGET_CPU_POWERPC=1 
-DGRUB_FILE=\"grub-core/disk/diskfilter.c\" -I. -I../.. -I. -I../.. 
-I../../include -I./include  -I./grub-core/gnulib -I../../grub-core/gnulib  
  -g -Wall -O2 -Wall -W -Wshadow -Wold-style-declaration 
-Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Warray-bounds 
-Wattributes -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts 
-Wclobbered -Wcomment -Wcoverage-mismatch -Wdeprecated 
-Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body 
-Wendif-labels -Wfloat-equal -Wformat-contains-nul -Wformat-extra-args 
-Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit 
-Wimplicit-function-declaration -Wimplicit-int -Winit-self 
-Wint-to-pointer-cast -Winvalid-pch -Wunsafe-loop-optimizations -Wlogical-op 
-Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute 
-Wmissing-noreturn -Wmudflap -Wmultichar -Wnonnull -Woverflow 
-Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-to-int-cast 
-Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing 
-Wswitch -Wsync-nand -Wtrigraphs  -Wtype-limits -Wundef -Wuninitialized 
-Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter 
-Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var 
-Wwrite-strings -Wmissing-parameter-type -Wnested-externs -Wstrict-prototypes 
-Wpointer-sign -Werror  -Wno-undef -Wno-sign-compare -Wno-unused 
-Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code 
-Wno-conversion -Wno-old-style-definition -Wno-unsafe-loop-optimizations
-c -o grub-core/disk/libgrubkern_a-diskfilter.o `test -f 
'grub-core/disk/diskfilter.c' || echo '../../'`grub-core/disk/diskfilter.c
../../grub-core/disk/diskfilter.c: In function 'insert_array':
../../grub-core/disk/diskfilter.c:975:14: error: declaration of 'disk' shadows 
a parameter [-Werror=shadow]
../../grub-core/disk/diskfilter.c:953:27: error: shadowed declaration is here 
[-Werror=shadow]

-- 
Len Sorensen

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel