Re: GRUB2 on OpenBSD 5.3-amd64: linking problem

2013-08-16 Thread Grégoire Sutre
On 08/16/2013 04:33 PM, Ilya Bakulin wrote: So the types "double" and "float" are not recognized. Could you please help me to debug this? I get the exact same problem on NetBSD. A simple (temporary) work-around is to remove the flags: -Dfloat=__grub_poision -Ddouble=__grub_poision Those ar

Re: GRUB2 on OpenBSD 5.3-amd64: linking problem

2013-08-15 Thread Grégoire Sutre
On 08/15/2013 05:00 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: This is not right fix. Many systems incorrectly define wchar_t as 16-bit type whil GRUB needs at least 21 as we handle all unicode characters. Please try: === modified file 'grub-core/lib/posix_wrap/wchar.h' --- grub-core/lib/p

Re: GRUB2 on OpenBSD 5.3-amd64: linking problem

2013-08-14 Thread Grégoire Sutre
On 08/14/2013 03:31 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 14.08.2013 15:09, Ilya Bakulin wrote: ./lib/posix_wrap/sys/types.h:25: error: conflicting types for 'size_t' /usr/include/stddef.h:48: error: previous declaration of 'size_t' was here gmake[3]: *** [fs/squash4_module-squash4

Build failure: GRUB_DISK_DEVICE_UBOOTDISK_ID

2013-07-21 Thread Grégoire Sutre
Latest trunk fails to build with: commands/nativedisk.c: In function 'get_uuid': commands/nativedisk.c:63:3: error: enumeration value 'GRUB_DISK_DEVICE_UBOOTDISK_ID' not handled in switch [-Werror=switch] cc1: all warnings being treated as errors This is on Debian GNU/Linux with gcc 4.7.3. Gr

[PATCH] NetBSD boot disk info

2013-07-19 Thread Grégoire Sutre
Hi, The attached patch improves knetbsd regarding boot disk info: - the boot disk info is filled unconditionally, - toplevel BSD disk labels are not ignored anymore. This makes knetbsd's behavior closer to that of the NetBSD native boot loader with respect to boot disk info. Grégoire === modif

Re: [PATCH] Strengthen the test for working -nostdinc -isystem

2012-08-05 Thread Grégoire Sutre
On 08/05/2012 12:02 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 01.08.2012 01:20, Grégoire Sutre wrote: This prevents configure from believing that -nostdinc -isystem works in some cases where it doesn't (NetBSD with non-native gcc 4.4). The patch simply adds the r

Re: [PATCH] Add gnulib's stpcpy.

2012-08-05 Thread Grégoire Sutre
On 08/05/2012 12:02 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 01.08.2012 01:26, Grégoire Sutre wrote: The attached patch adds gnulib's stpcpy. This is required on systems lacking stpcpy, e.g., NetBSD 5.1. Where do we need it? It may make more sense to just use

[PATCH] Add gnulib's stpcpy.

2012-07-31 Thread Grégoire Sutre
The attached patch adds gnulib's stpcpy. This is required on systems lacking stpcpy, e.g., NetBSD 5.1. Note: I used gnulib's sources from 2010-09-20, since this is, afaics, the date of import of gnulib files in GRUB. Grégoire === modified file 'grub-core/gnulib/Makefile.am' --- grub-core/gnuli

[PATCH] Strengthen the test for working -nostdinc -isystem

2012-07-31 Thread Grégoire Sutre
This prevents configure from believing that -nostdinc -isystem works in some cases where it doesn't (NetBSD with non-native gcc 4.4). The patch simply adds the requirement that #include works with -nostdinc -isystem. Grégoire --- configure.ac.orig 2012-07-28 17:41:28.0 + +++ confi

Re: [PATCH] Update manual NetBSD-wise

2012-07-31 Thread Grégoire Sutre
On 07/31/2012 03:28 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 30.07.2012 01:06, Grégoire Sutre wrote: The attached patch updates the NetBSD-specific parts of the manual. Go ahead Done, thanks. Grégoire ___ Grub-devel mailing

[PATCH] Update manual NetBSD-wise

2012-07-29 Thread Grégoire Sutre
The attached patch updates the NetBSD-specific parts of the manual. Grégoire === modified file 'docs/grub.texi' --- docs/grub.texi 2012-06-23 08:55:14 + +++ docs/grub.texi 2012-07-29 23:01:27 + @@ -311,8 +311,10 @@ tables are also loaded. @item Support non-Multiboot kernels Support ma

Re: [build failure] GCC 4.1.3 support?

2012-07-27 Thread Grégoire Sutre
More data, this time on Debian GNU/Linux (squeeze) amd64. - successful build with GCC 4.4.5 - build failure with GCC 4.3.5 The failure with GCC 4.3.5 is: make[2]: Entering directory `/tmp/grub-2.00' gcc-4.3 -DHAVE_CONFIG_H -I. -Wall -W -I./include -DGRUB_UTIL=1 -DGRUB_LIBDIR=\"/usr/local/lib

[build failure] GCC 4.1.3 support?

2012-07-27 Thread Grégoire Sutre
Hi, Configuring GRUB 2.00 on NetBSD 5.1.2 gives the following error: checking if C symbols get an underscore after compilation... configure: error: gcc failed to produce assembly code This comes from warnings -Waddress, -Wempty-body and -Woverflow that are not supported by gcc on this system,

Re: [PATCH] Fix overflow in grub_util_get_fd_size for NetBSD

2012-06-25 Thread Grégoire Sutre
On 06/24/2012 08:31 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 24.06.2012 13:19, Grégoire Sutre wrote: -return label.d_secperunit<< log_sector_size; +return (grub_uint64_t)label.d_secperunit<< log_sector_size; Please add a space after ). Othe

[PATCH] Fix overflow in grub_util_get_fd_size for NetBSD

2012-06-24 Thread Grégoire Sutre
Hi, The attached patch fixes grub-probe for NetBSD (the issue was introduced in commit 4068). Grégoire === modified file 'ChangeLog' --- ChangeLog 2012-06-23 20:56:19 + +++ ChangeLog 2012-06-24 11:10:41 + @@ -1,3 +1,10 @@ +2012-06-24 Grégoire Sutre + + Fix overflow. + + * grub-core/k

[patch] fix out-of-bounds error

2012-03-18 Thread Grégoire Sutre
I get the following warning on Debian GNU/Linux when compiling with -O2. This is with GCC 4.6.3. $ CFLAGS='-O2' ./configure && make ... gdb/cstub.c: In function 'grub_gdb_trap': gdb/cstub.c:83:21: error: array subscript is above array bounds [-Werror=array-bounds] cc1: all warnings being treat

Re: [PATCH] Fix unused label/function warnings on NetBSD

2012-03-02 Thread Grégoire Sutre
On 03/02/2012 11:39 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 01.03.2012 17:25, Grégoire Sutre wrote: The attached patch fixes the following warnings when building GRUB on NetBSD (and probably other BSDs): util/getroot.c: In function 'grub_make_system_path_relative_to_

[PATCH] Fix unused label/function warnings on NetBSD

2012-03-01 Thread Grégoire Sutre
The attached patch fixes the following warnings when building GRUB on NetBSD (and probably other BSDs): util/getroot.c: In function 'grub_make_system_path_relative_to_its_root': util/getroot.c:2711:2: error: label 'parsedir' defined but not used util/getroot.c: At top level: util/getroot.c:1084:1

Re: Fix for pkgdatadir grub-mkconfig_lib in all util scripts and grub.d scripts

2012-02-20 Thread Grégoire Sutre
On 02/20/2012 06:47 PM, Keshav P R wrote: Hi, Attached patch fixes runtime error due to sed transform used in pkgdatadir Maybe we should apply the sed transform to grub-mkconfig_lib's installation directory, i.e., install grub-mkconfig_lib alongside unicode.pf2 and friends? Grégoire # /

Re: GRUB warning level increase

2012-02-12 Thread Grégoire Sutre
On 02/10/2012 05:00 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Hello, all. I have increased the warning level in GRUB. This is done for quicker discovery and correction of the bugs which would be otherwise hard to track. Mostly it enabled warnings regarding guidelines which are already foll

Re: [PATCH] Unbreak help2man invocations

2012-02-10 Thread Grégoire Sutre
On 02/10/2012 04:51 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 10.02.2012 13:11, Grégoire Sutre wrote: Following Vladimir's suggestion on IRC, the attached patch fixes bug http://savannah.gnu.org/bugs/?35452. Go ahead. I've committed the patch and closed the b

[PATCH] Unbreak help2man invocations

2012-02-10 Thread Grégoire Sutre
Following Vladimir's suggestion on IRC, the attached patch fixes bug http://savannah.gnu.org/bugs/?35452. Grégoire p.s. The patch uses @PACKAGE_TARNAME@ instead of @PACKAGE@ in the name of the directory that grub-mkconfig_lib is sourced from, to preserve the definition of pkgdatadir that was in

Re: Build break (uninitialized variable)

2012-02-04 Thread Grégoire Sutre
On 02/04/2012 11:31 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 03.02.2012 19:26, Grégoire Sutre wrote: The compiler complains about `totsize' being possibly uninitialized in grub-core/disk/diskfilter.c, function grub_diskfilter_make_raid(). I get this error with gcc

Build break (uninitialized variable)

2012-02-03 Thread Grégoire Sutre
The compiler complains about `totsize' being possibly uninitialized in grub-core/disk/diskfilter.c, function grub_diskfilter_make_raid(). I get this error with gcc 4.5.3 on NetBSD, and also with gcc 4.6.2 on Debian GNU/Linux. I'm not familiar with that code. The attached patch fixes this by retu

Re: [PATCH] NetBSD disk wedge support

2012-02-03 Thread Grégoire Sutre
On 02/03/2012 12:18 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Go ahead. Done, thanks. Grégoire On 03.02.2012 11:48, Grégoire Sutre wrote: The attached patch makes it possible to install GRUB from NetBSD on a GPT partition. Those are available as so-called disk wedges on N

[PATCH] NetBSD disk wedge support

2012-02-03 Thread Grégoire Sutre
The attached patch makes it possible to install GRUB from NetBSD on a GPT partition. Those are available as so-called disk wedges on NetBSD (see [1]). Tested under NetBSD -current. Grégoire [1] http://netbsd.gw.com/cgi-bin/man-cgi?dk++NetBSD-current === modified file 'grub-core/kern/emu/hostdi

Re: Issue in netbsd_bootinfo.h

2011-11-09 Thread Grégoire Sutre
On 11/09/2011 01:14 AM, Seth Goldberg wrote: Hi, The following structure definition is causing linker failures (not with GNU ld) when building GRUB2: struct grub_netbsd_btinfo_bootwedge { grub_uint32_t biosdev; grub_disk_addr_t startblk; grub_uint64_t nblks; grub_disk_addr_t matchblk; grub_uint

Re: [patch] Make knetbsd pass the root device

2011-09-28 Thread Grégoire Sutre
On 09/28/2011 10:57 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 28.09.2011 19:56, Grégoire Sutre wrote: + grub_uint64_t buf[(GRUB_DISK_SECTOR_SIZE + 7) / 8]; No need for + 7 since you know that GRUB_DISK_SECTOR_SIZE is divisible by 8. Other than this patch looks good

Re: [patch] Make knetbsd pass the root device

2011-09-28 Thread Grégoire Sutre
Following Vladimir's comments on IRC, here is the second version of the patch. - Make sure that buffers are well-aligned. - Check that partmap->name is "netbsd". (I kept the magic test since it's cheap, but I won't fight over it :-) Grégoire === modified file 'ChangeLog' --- ChangeLog 2011-09-

Re: [patch] Make knetbsd pass the root device

2011-09-21 Thread Grégoire Sutre
On 09/21/2011 01:25 AM, Grégoire Sutre wrote: + dev = grub_device_open (0); + if (! (dev&& dev->disk&& dev->disk->partition)) +return; This `return' should be a `goto fail'. Grégoire ___ Grub-devel ma

[patch] Make knetbsd pass the root device

2011-09-20 Thread Grégoire Sutre
Hi, The attached patch adds bootdisk and bootwedge to the bootinfo passed to NetBSD kernels by knetbsd. These fields indicate to the kernel which is the root device. The patch sets them to GRUB's root device. This way, specifying --root for knetbsd is no longer necessary for common cases. Exam

[PATCH] Sector size on NetBSD

2011-07-03 Thread Grégoire Sutre
Hi, NetBSD does not know about BLKSSZGET. The attached patch retrieves the sector size from the disk label (for NetBSD). Grégoire === modified file 'ChangeLog' --- ChangeLog 2011-07-02 19:22:19 + +++ ChangeLog 2011-07-03 22:52:47 + @@ -1,3 +1,8 @@ +2011-07-03 Grégoire Sutre + +

Re: [PATCH] Source grub-mkconfig_lib in ${libdir}/@PACKAGE@

2011-07-02 Thread Grégoire Sutre
On 07/02/2011 03:01 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 02.07.2011 14:21, Grégoire Sutre wrote: Hi, The file grub-mkconfig_lib is installed in $(pkglibdir), which is defined (by automake) as: pkglibdir = $(libdir)/@PACKAGE@ go ahead Thanks. It's commi

[PATCH] Source grub-mkconfig_lib in ${libdir}/@PACKAGE@

2011-07-02 Thread Grégoire Sutre
Hi, The file grub-mkconfig_lib is installed in $(pkglibdir), which is defined (by automake) as: pkglibdir = $(libdir)/@PACKAGE@ The attached patch makes sure that users of this library look for it in the same place, without relying on PACKAGE=grub. Grégoire The file grub-mkconfig_lib is instal

Re: Boot sector for ext2

2011-05-23 Thread Grégoire Sutre
On 05/21/2011 09:31 AM, Martin Rosenau wrote: Background: In a multi-OS-environment it is sometimes not possible installing GRUB on the MBR (Windows Vista has problems then!) Installing GRUB on an ext2 partition (instead of on the MBR) often requires "block lists" which often do not work. I wro

Re: Your contributions to grub.enbug.org

2011-03-31 Thread Grégoire Sutre
On 03/31/2011 09:17 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Hello, when discussing after the temporary wiki problems it was decided that it would be better to migrate the information from wiki into the manual and developper manual where legal reasons permit. You have contributed to the w

Re: How to debug 'out of disk' error.

2011-03-18 Thread Grégoire Sutre
On 03/18/2011 15:22, Lennart Sorensen wrote: On Fri, Mar 18, 2011 at 10:04:42AM +0100, Grégoire Sutre wrote: I didn't look at the code, but this is probably the ATA geometry of the disk, which is returned by the INT-13h (Extended) function 48h (Read Drive Parameters). If I remember corr

Re: How to debug 'out of disk' error.

2011-03-18 Thread Grégoire Sutre
On 03/16/2011 20:19, Phillip Susi wrote: On 3/16/2011 1:32 PM, Lennart Sorensen wrote: So I now have some debug info: version=48 total_sectors=156312576 C=16383 H=16 S=63 error: hd0,msdos1 out of disk. Entering rescue mode... grub rescue> So version is returning something, and it is actually g

Re: Reserved first sector for UFS

2011-01-07 Thread Grégoire Sutre
On 01/07/2011 13:20, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Do you know of any OS that would put the superblock in sector 0? I googled a bit, but I couldn't find examples where UFS would not start with a boot sector (afaics, it usually starts with a bootblock area of at least 8KiB -- with

Re: Reserved first sector for UFS

2011-01-07 Thread Grégoire Sutre
On 01/07/2011 11:30, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 01/07/2011 10:35 AM, Grégoire Sutre wrote: Isn't the first sector reserved for the boot block in UFS? Depends on OS: /* The blocks on which the superblock can be found. */ static int sblocklist[] = { 128,

Re: [RFT] NetBSD embedding regression fix

2011-01-07 Thread Grégoire Sutre
On 01/05/2011 11:50, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Please test the attached patch I did a few tests, it works fine. Thanks, Grégoire ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

Reserved first sector for UFS

2011-01-07 Thread Grégoire Sutre
Isn't the first sector reserved for the boot block in UFS? Grégoire === modified file 'grub-core/fs/ufs.c' --- grub-core/fs/ufs.c 2010-10-16 20:16:52 + +++ grub-core/fs/ufs.c 2011-01-07 09:31:49 + @@ -786,6 +786,9 @@ static struct grub_fs grub_ufs_fs = #endif .uuid = grub_ufs_uuid

Re: Build failure on NetBSD

2011-01-06 Thread Grégoire Sutre
Looks like you actualy do have libdevmapper (I'm surprised it exists for NetBSD) but not the headers. I'm not sure what it's for (I don't use LVM). The utility dmsetup(8) (ported from Linux?) requires it. > We should check for headers too. Attached patch adds this. Grégoire === modified file

Re: Build failure on NetBSD

2011-01-06 Thread Grégoire Sutre
On 01/06/2011 19:18, Grégoire Sutre wrote: On 01/06/2011 18:51, Vladimir 'φ-coder/phcoder' Serbinenko wrote: This means that HAVE_DEVICE_MAPPER is defined. It shouldn't be. Can you post config.log? On this system, there is a /lib/libdevmapper.so but no libdevmapper.h. Afaics,

Re: Build failure on NetBSD

2011-01-06 Thread Grégoire Sutre
On 01/06/2011 18:51, Vladimir 'φ-coder/phcoder' Serbinenko wrote: This means that HAVE_DEVICE_MAPPER is defined. It shouldn't be. Can you post config.log? (Too big for the list.) http://pastebin.com/YnFzxHKP Grégoire ___ Grub-devel mailing list Gru

Build failure on NetBSD

2011-01-06 Thread Grégoire Sutre
Hi, Trunk does not build on NetBSD (it's 5.99.41 in case that matters). $ (./autogen.sh ; ./configure ; gmake) > /tmp/grub-build.log 2>&1 gives, at the end of the log: grub-core/kern/emu/hostdisk.c:102:27: error: libdevmapper.h: No such file or directory grub-core/kern/emu/misc.c:46:27: error

Re: [RFT] nested partition issues

2010-11-02 Thread Grégoire Sutre
Hi, The main issue at hand is that, to support NetBSD, we need a working grub-setup for the (very common) case where the NetBSD disklabel is placed in an MSDOS partition. If we need to add yet other ``strcmp (..._partmap->name, ...)'' tests to grub-setup, then we likely have bad abstractions.

Re: [RFT] nested partition issues

2010-11-01 Thread Grégoire Sutre
On 09/04/2010 02:07 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Hello. It was reported to me about several issues with nested partitions. Please try attached patch and report back any remaining problems NetBSD and OpenBSD disklabels that are nested in an MSDOS partition are now viewed as

Re: [PATCH] Fix getline name clash

2010-10-19 Thread Grégoire Sutre
On 10/19/2010 11:17, BVK Chaitanya wrote: How about the attached patch? The patch fixes the problem. With the patch, grub trunk builds fine on NetBSD 5. Thanks, Grégoire ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/li

Re: Portable mktemp invocation?

2010-10-18 Thread Grégoire Sutre
On 10/16/2010 04:04 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Go ahead for mainline Thanks, it's committed. Grégoire ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

Re: Portable mktemp invocation?

2010-10-11 Thread Grégoire Sutre
This is a new version of the patch. Changes with respect to the previous version: - use double quotes (i.e. "${TMPDIR:-/tmp}/tmp.XX") - apply the same scheme to util/grub-mkrescue.in (intead of MKTEMP_TEMPLATE) Grégoire 2010-10-11 Grégoire Sutre Make mktemp invocations port

Re: Guidance on conflicts between GNU GRUB and proprietary software

2010-09-29 Thread Grégoire Sutre
On 09/29/2010 00:11, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Let me try to explain more clearly what I have in mind. In the GPT case, we have a dedicated partition ID for bootloader software. This makes things simpler. If we had such a dedicated partition ID in the MSDOS case, then a lot

Re: Guidance on conflicts between GNU GRUB and proprietary software

2010-09-28 Thread Grégoire Sutre
On 09/28/2010 09:05 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Using an embedding partition on msdos as an optional alternative (not as replacement) to MBR gap is a clear possibility, good idea and was proposed before but details are very unclear. Like: - How to create such partition - How

Re: Portable mktemp invocation?

2010-09-25 Thread Grégoire Sutre
On 09/23/2010 06:27 PM, Grégoire Sutre wrote: A simple solution would be to replace those invocations with: mktemp [-d] ${TMPDIR:-/tmp}/tmp.XX The attached patch implements this solution. Build tested on Debian GNU/Linux and NetBSD. Grégoire === modified file 'Chan

Re: [PATCH] Fix getline name clash

2010-09-24 Thread Grégoire Sutre
On 09/24/2010 12:18, Colin Watson wrote: This looks good to me as far as it goes, but doesn't it need a bit more? I guess we should not rename the actual calls to the getline() library function (otherwise gnulib's replacement won't help). And I personally don't mind if function arguments and

[PATCH] Uninitialized variable

2010-09-23 Thread Grégoire Sutre
Hi, This is catched (as a warning) by gcc 4.1.3 -- gcc 4.4 does not complain (maybe some command-line option is missing?). Grégoire 2010-09-23 Grégoire Sutre * grub-core/commands/acpihalt.c (get_sleep_type): Initialize prev. === modified file 'grub-core/commands/acpih

Portable mktemp invocation?

2010-09-23 Thread Grégoire Sutre
Hi, We use `mktemp' or `mktemp -d' (with no argument) in the shell scripts: - grub-core/genmod.sh.in - tests/util/grub-shell.in - tests/util/grub-shell-tester.in - tests/grub_script_blockarg.in - tests/partmap_test.in - util/powerpc/ieee1275/grub-mkrescue.in But such invocations of mktemp fail

[PATCH] Fix getline name clash

2010-09-23 Thread Grégoire Sutre
Hi, On NetBSD 5, the latest trunk does not build: $ ./autogen.sh ; ./configure CFLAGS='-std=gnu99' ; gmake [...] gcc -DHAVE_CONFIG_H -I. -Wall -W -I./include -DGRUB_UTIL=1 -DGRUB_LIBDIR=\"/usr/local/lib/grub\" -DLOCALEDIR=\"/usr/local/share/locale\" -DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I3

Re: Improperly nested partitions, help needed!

2010-09-22 Thread Grégoire Sutre
On 09/22/2010 18:44, Lennart Sorensen wrote: After all msdos partitions tables may only exist in MBR and extended partitions According to which standard? Grégoire ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo

Re: Improperly nested partitions, help needed!

2010-09-21 Thread Grégoire Sutre
On 09/21/2010 09:42 PM, Svante Signell wrote: # file /tmp/sda3.mbr /tmp/sda3.mbr: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, 1st sector stage2 0xdd29b38; partition 1: ID=0x83, starthead 239, startsector 63, 35153937 sectors, extended partition table (last)\011, code offset 0x

Re: Improperly nested partitions, help needed!

2010-09-21 Thread Grégoire Sutre
On 09/21/2010 16:54, Lennart Sorensen wrote: What does improperly nested mean: overlapping, or something else? How to resolve this problem? According to fdisk the sda1 and sda3 partitions are _not_ overlapping: Additionally, does the same warning have to be repeated so many times for every ke

Re: Improperly nested partitions, help needed!

2010-09-21 Thread Grégoire Sutre
On 09/21/2010 09:31, Svante Signell wrote: When installing a new kernel or a new version of grub I get a warning that /dev/sda1 (windows rescue) and /dev/sda3 (linux root /) are improperly nested: /usr/sbin/grub-probe: warn: Discarding improperly nested partition (hd1,msdos3,msdos1). Assuming

Re: [Patch] strip disk->name of partition suffix in grub_disk_open

2010-07-20 Thread Grégoire Sutre
On 07/20/2010 03:52 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Which functions concatenate disk->name with anything else? It looks like disk->name is with partitions by design. In several places, the (full) grub partition name is obtained by concatenating disk->name with the result of gr

Re: [Patch] Discard incorrect nested partitions (fixes #29956)

2010-07-14 Thread Grégoire Sutre
On 07/13/2010 11:53 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: I mean that the files we need are below the limit but some parts of partition are above the limit. It will work the current boot but will break in the future. I see. Go ahead for trunk. Thanks, I committed the patch. Gr

[Patch] strip disk->name of partition suffix in grub_disk_open

2010-07-09 Thread Grégoire Sutre
Hi, When the argument passed to grub_disk_open is a string containing a partition, e.g. "hd0,msdos3,bsd7", disk->name is set to the full string instead of just the prefix up to the first ',' (here "hd0"). This leads to incorrect partition identifiers when the disk name and the partition name are

Re: [Patch] Discard incorrect nested partitions (fixes #29956)

2010-07-09 Thread Grégoire Sutre
On 07/08/2010 02:28, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Attached is the new version of the patch. As I already told you in real dprintf isn't seen by user. One need to grub_dprintf (); #ifdef GRUB_UTIL grub_util_warn (...); #endif Ok. For partition.c, this is now done in the ch

Re: [Patch] Discard incorrect nested partitions (fixes #29956)

2010-07-06 Thread Grégoire Sutre
Hi, This is the reworked version of the patch. There are few ramifications of this patch. First of all some partitions which are just barely outside of the host partition will lead to something like "partition not found" errors in grub-probe. This message should be more informative (the easiest

Re: [Patch] Do not embed with multiple partmaps

2010-07-04 Thread Grégoire Sutre
On 07/01/2010 10:52 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Go ahead. Just replace "BAD IDEA" with "not supported yet" Thanks, I replaced "BAD IDEA" with "not supported yet" and committed. Grégoire. ___ Grub-devel mailing list Grub-devel@g

[Patch] Do not embed with multiple partmaps

2010-06-17 Thread Grégoire Sutre
Hi, As a (temporary) solution to the problem of embedding with multiple top-level partmaps, the attached patch simply disables embedding when there are multiple partmaps (i.e. apply the same behavior as when there is no partmap). This prevents grub-setup from overwriting e.g. a BSD label if it f

Re: Which partitioning schemes should be supported by GRUB?

2010-06-16 Thread Grégoire Sutre
Hi, I made several tests, and the patch works fine with standard boot. When multibooting core.img, the command-line is taken into account correctly. However, if no multiboot command-line is given, the prefix is set as before (old partition naming style). This comes from the fact that the modifi

Re: Which partitioning schemes should be supported by GRUB?

2010-06-15 Thread Grégoire Sutre
On 06/15/2010 01:21 PM, Colin Watson wrote: A possible solution would be to use the multiboot-command line. AFAIK, the boot_device field of the multiboot information structure is supposed to pass this kind of partition information, but you cannot specify the partmaps in this field, hence its in

Re: Which partitioning schemes should be supported by GRUB?

2010-06-14 Thread Grégoire Sutre
On 06/14/2010 18:43, Colin Watson wrote: Do you have any suggestions on how to deal with that? I'm not familiar with multiboot and need guidance. A possible solution would be to use the multiboot-command line. AFAIK, the boot_device field of the multiboot information structure is supposed to

Re: Which partitioning schemes should be supported by GRUB?

2010-06-13 Thread Grégoire Sutre
On 06/12/2010 07:26 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Any "hybrid" cofiguration fails the criteria of non confusability. I was assuming the new partition notation. The old notation is clearly ambiguous when there are multiple partmaps, and AFAIR the new notation was introduced

Re: [PATCH] Fix grub-probe partition naming on FreeBSD

2010-06-13 Thread Grégoire Sutre
Hi Colin, The following patch is aimed at fixing this Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=585068 I've tested it on Debian GNU/kFreeBSD and it seems to be producing sensible output now. In another thread [1], it was observed that offsets are not absolute in FreeBSD

Re: Which partitioning schemes should be supported by GRUB?

2010-06-12 Thread Grégoire Sutre
On 06/07/2010 10:46 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: There are two parts of this question: 1) Which partition schemes should GRUB be able to read modules and payloads from ? It's platform-indepedent and 2 conditions apply: - Usage. There are OS which are able to boot from such OS

Re: [Patch] Discard incorrect nested partitions (fixes #29956)

2010-06-12 Thread Grégoire Sutre
On 05/31/2010 08:35 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: There are few ramifications of this patch. First of all some partitions which are just barely outside of the host partition will lead to something like "partition not found" errors in grub-probe. It's not ideal, but IMHO it's

[grub-setup] New procedure to choose the embedding area

2010-06-10 Thread Grégoire Sutre
Hi, [ This is an extended summary of discussions that took place on irc. ] The current version of grub-setup requires an msdos or gpt partitioning scheme, and is not compatible with hybrid partitioning schemes (i.e. two top-level disklabels). Some disklabels have a specific partition type for b

Re: Which partitioning schemes should be supported by GRUB?

2010-06-09 Thread Grégoire Sutre
On 06/07/2010 10:46 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: There are two parts of this question: 1) Which partition schemes should GRUB be able to read modules and payloads from ? It's platform-indepedent Agreed. and 2 conditions apply: - Usage. There are OS which are able to boot

Re: [PATCH] Improve man page headers

2010-06-09 Thread Grégoire Sutre
On 06/08/2010 20:26, Colin Watson wrote: Could your approach also support filename transformations? I'm not sure how that would work. I guess you'd need program_transform_name applied to the .h2m files. Do you want me to put my patch in a bzr branch so that you can experiment with that? I'm

Re: [PATCH] Improve man page headers

2010-06-08 Thread Grégoire Sutre
On 06/08/2010 19:46, Colin Watson wrote: In a recent message sent to the list [1], I proposed the following modification [2] to account for filename transformations in man pages: + * Makefile.in (install-local): Use installed files on help2man command + line to account for file name

Re: [PATCH] File name transformations (split into 7 diffs)

2010-06-07 Thread Grégoire Sutre
On 06/07/2010 11:16 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Regarding file-name-transformations_1.diff: phco...@debian.bg45.phnet:~$ /usr/local/bin/grub-mkfont --help Usage: /usr/local/bin/grub-mkfont [OPTIONS] FONT_FILES So I would prefer not to use basename for uniformity. Otherwise p

Which partitioning schemes should be supported by GRUB?

2010-06-06 Thread Grégoire Sutre
Hi, Tests of GRUB on NetBSD (and FreeBSD) have raised several issues (most of them reported on the list) regarding partition detection. However, I have the feeling that some of these issues are not considered as real issues since the test configuration is not supported by GRUB. This surprises m

Re: Are BSD partitions not supported?

2010-06-06 Thread Grégoire Sutre
On 06/01/2010 01:21 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: For FreeBSD we have to investigate 'c' partition to determine delta. Right. In short, the normal interpretation of BSD label offsets would be the relative one (b), and we would make an exception to handle NetBSD and OpenBSD

[Patch] Use absolute offset for embedding area in grub-setup (i386-pc)

2010-06-04 Thread Grégoire Sutre
Hi, The attached patch uses grub_partition_get_start (p) instead of p->start in grub-setup's iteration over partitions. While we are at it, also use grub_partition_get_len (p) instead of p->len. An alternative would be to assume that partitions are properly nested, and therefore iterate only ov

Re: Are BSD partitions not supported?

2010-06-01 Thread Grégoire Sutre
On 05/31/2010 11:16 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: Looks like we have to have different behaviour for different BSDs. Since it looks like generic code would fail for ThisBSD or ThatBSD, I propose to go by as-needed basis. So I think we should: -restrict bsdlabel to being embed

[Patch] Discard incorrect nested partitions (fixes #29956)

2010-05-27 Thread Grégoire Sutre
Hi, Regarding the nested partition code, there is an implicit assumption that each partition should be contained in its parent, i.e. its sectors should also be sectors of its parent. This ``physical nesting'' is checked in grub_disk_read, but it would be better to check it before that. The att

grub-setup failure with (primary) BSD disklabel

2010-05-25 Thread Grégoire Sutre
Hi, When there is both a MBR partition table and a (primary) BSD disklabel, grub-setup returns an error: No DOS-style partitions found. Yet, the partition containing the GRUB images is in the MBR. But we are actually lucky, since it could be worse. Below is a detailed example on NetBSD/i386 st

[Patch] File name transformations & grub-mkconfig --root-directory

2010-05-24 Thread Grégoire Sutre
Hi, The attached patch fixes problems with file name transformations, which are partly broken in trunk. With this patch, several installations of grub can coexist with no conflict (at least they should), sharing however the same configuration directory (etc/grub.d). It also adds --root-director

Re: Option handling in grub-mkconfig

2010-05-24 Thread Grégoire Sutre
On 05/24/2010 06:42 AM, BVK Chaitanya wrote: 2010/5/21 Grégoire Sutre: The processing of option `-o' in grub-mkconfig only works when it is the first option. IMO this issue might have been fixed in experimental branch, by fix-cmdline-parsing (or similar) branch. I am on travel, so I c

Re: Are BSD partitions not supported?

2010-05-23 Thread Grégoire Sutre
On 05/23/2010 05:44 PM, C. P. Ghost wrote: With bsdlabel_v3.diff, and the image I've posted here, I get dropped into grub_rescue. This breaks Vladimir's second patch on FreeBSD. :-( Thanks for testing the patch. But I honestly don't understand why it does not work on your system. I could rep

Re: Are BSD partitions not supported?

2010-05-23 Thread Grégoire Sutre
On 05/19/2010 09:20 PM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: [snip] - delta = grub_partition_get_start (disk->partition); + delta = grub_le_to_cpu32 (whole_disk_be.offset); As dicsussed on irc, this makes the delta completely dependent on the c: entry of the disklabel, which could

[Patch] Unifont search in configure.ac

2010-05-22 Thread Grégoire Sutre
Hi, With the attached patch, unifont is searched by extension first (pcf being the preferred one), and then by directory. The first directory being searched is `.', which allows non-root users to install ascii.pf2 and unifont.pf2 by first downloading unifont in the build directory. Grégoire ===

Re: [Patch] [bug #26237] multiple problems with usb devices

2010-05-21 Thread Grégoire Sutre
On 05/22/2010 01:46 AM, Aleš Nesrsta wrote: I cannot get actual bzr code because of this error: $ bzr get http://bzr.savannah.gnu.org/r/grub bzr: ERROR: Not a branch: "http://bzr.savannah.gnu.org/r/grub/.bzr/branch/";. For trunk, use: bzr branch http://bzr.savannah.gnu.org/r/grub/trunk/grub

Re: Option handling in grub-mkconfig

2010-05-21 Thread Grégoire Sutre
On 05/21/2010 12:57 PM, Colin Watson wrote: Thanks for the patch, it works fine. I'm just wondering: Is keeping `-o' worth the extra complication? Grégoire How about: === modified file 'util/grub-mkconfig.in' --- util/grub-mkconfig.in 2010-04-19 19:25:41 + +++ util/grub-mkconfig.in

Option handling in grub-mkconfig

2010-05-21 Thread Grégoire Sutre
Hi, The processing of option `-o' in grub-mkconfig only works when it is the first option. The code is: # Check the arguments. for option in "$@"; do case "$option" in [...] -o) shift grub_cfg=$1 ;; --output=*) grub_cfg=`echo "$option" | sed 's/--outp

Re: update-grub & Xen boot stanza generation

2010-05-21 Thread Grégoire Sutre
Bruce Edge wrote: I actually had the kernel arg=val repeated twice originally, but the xen-devel guys said to use dummy=dummy. Maybe the xen-devel guys meant the following grub command: multiboot /boot/xen.gz dummy=dummy [other options] which will pass to xen the following multiboot-protocol

Re: [PATCH] Fix use of ENABLE_NLS (which is not always defined)

2010-03-16 Thread Grégoire Sutre
n #if directives. In fact, any package which makes good use of Autoconf cannot support -Wundef. I don't see why. Could you please elaborate? Best regards, Grégoire Sutre [1] http://lists.gnu.org/archive/html/bug-gnulib/2010-01/msg00316.html [2] http://lists.gnu.org/archive/html/bug-gnul

[PATCH] Lexer sed post-processing instead of pragmas

2010-03-16 Thread Grégoire Sutre
Hi, The lexer code in script/yylex.l uses pragmas that are not supported by gcc < 4.2. However, without these pragmas, the build fails because of warnings in the lexer code generated by flex (recall that some targets are built with -Werror by default). I've discussed this issue with sethmeister

Re: [PATCH] --foo bar cmdline argument parsing support for grub-* scripts

2010-02-09 Thread Grégoire Sutre
BVK Chaitanya wrote: I assume you are talking about /usr/bin/getopt (not libc getopt). /usr/bin/getopt comes with util-linux package (in debian), and yes, I too dont think it would be available on other platforms as bash or coreutils does. You might want to use the POSIX shell built-in getopts

Re: Is it possible to have grub2's boot.img as my MBR, but have it look in a separate partition for core.img?

2010-01-29 Thread Grégoire Sutre
Wesley Smith wrote: Thanks for your help, but no, it appears you cannot do this by simply using "grub-install /dev/sdx". I tried this, and yes, it did make the target partition bootable (it contained a Grub loader in its PBR). However, to ensure the disk MBR had also been updated and was now get

  1   2   >