From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VnnGI-0004JH-NP for mharc-grub-devel@gnu.org; Tue, 03 Dec 2013 05:31:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnnGA-0004ID-LX for grub-devel@gnu.org; Tue, 03 Dec 2013 05:31:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnnG5-0006sY-Fk for grub-devel@gnu.org; Tue, 03 Dec 2013 05:31:18 -0500 Received: from mail-bk0-f54.google.com ([209.85.214.54]:40014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnnG5-0006sM-2g for grub-devel@gnu.org; Tue, 03 Dec 2013 05:31:13 -0500 Received: by mail-bk0-f54.google.com with SMTP id v16so5965912bkz.13 for ; Tue, 03 Dec 2013 02:31:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=Q8KEjmfsoIQBQE6jSPJ1nSgBj7sey03hAIP15WUco7c=; b=DRBQKvHJBVvPEHwjuyjKL5ccktCNGhDegzkkCvm94sfvay5nlKYIH8LuE3UIoxWUNb 9IaigH/H9z7GjBvEPaSTGhq+N8gmdsBGB7ttaT/aKP8Fix+y2Lw+9WMlMFRDTpazhJO0 FCx+gbZ1N5BR9+loeSUb7dUSZ6HgP2OOf10aYlsJcX0dOozl7ANl16IgZz2IRqw/xQ6x e+MW7IZAXjz4VL+oDTRDWJof+VsGFy3afR3uAMpjJWm0rglIQAvdHTrd96o8nzPEpbNi ul1hnfT/y5HslGW6nSE6Q5/2UlAVr380XmWdQ41OZo2ZeM2D8zjsU5v2Ggh9AmrZlndo K8/w== X-Gm-Message-State: ALoCoQlu2NkBAy+1f/iScXOiAlONpxPuLnFOflTzH1Lw+T/Kb57dFC8xkNKY7riipcH1aRMGaw4p X-Received: by 10.204.122.1 with SMTP id j1mr1762825bkr.57.1386066671902; Tue, 03 Dec 2013 02:31:11 -0800 (PST) Received: from [192.168.1.26] (ip-73-126.sn2.eutelia.it. [83.211.73.126]) by mx.google.com with ESMTPSA id o5sm25645586bkz.4.2013.12.03.02.31.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 02:31:11 -0800 (PST) Message-ID: <529DB2F1.4080509@m2r.biz> Date: Tue, 03 Dec 2013 11:31:13 +0100 From: Fabio Fantoni User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= Subject: Re: [Xen-devel] pvgrub2 is merged References: <527EA084.6000706@gmail.com> <20131110084753.540b0107@opensuse.site> <5283DD8F.5080103@gmail.com> <52850918.1040406@gmail.com> <52851D28.1090905@gmail.com> <52851D77.6060203@gmail.com> <5285440B.2040301@gmail.com> <5293733B.3090604@m2r.biz> <5294E157.90708@m2r.biz> <20131126221221.3fe316e3@opensuse.site> <5295D867.9050306@m2r.biz> <5295DCA0.2010805@gmail.com> <529616EA.4000504@m2r.biz> <529617B7.2020507@gmail.com> <52961CD5.1040009@m2r.biz> <20131127213552.3120f5e5@opensuse.site> <52973FF8.7040502@m2r.biz> <52974D98.3090608@gmail.com> <5297508C.40607@m2r.biz> <52987A43.9070806@m2r.biz> <52987D7F.3050006@gmail.com> <52988F86.6050008@m2r.biz> In-Reply-To: <52988F86.6050008@m2r.biz> Content-Type: multipart/mixed; boundary="------------060303010209090302010306" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.214.54 Cc: The development of GNU GRUB , xen-devel X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2013 10:31:24 -0000 This is a multi-part message in MIME format. --------------060303010209090302010306 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Il 29/11/2013 13:58, Fabio Fantoni ha scritto: > Il 29/11/2013 12:41, Vladimir 'φ-coder/phcoder' Serbinenko ha scritto: >> On 29.11.2013 12:28, Fabio Fantoni wrote: >>> Il 28/11/2013 15:17, Fabio Fantoni ha scritto: >>>> Il 28/11/2013 15:05, Vladimir 'φ-coder/phcoder' Serbinenko ha scritto: >>>>> On 28.11.2013 14:07, Fabio Fantoni wrote: >>>>>> Il 27/11/2013 18:35, Andrey Borzenkov ha scritto: >>>>>>> В Wed, 27 Nov 2013 17:24:53 +0100 >>>>>>> Fabio Fantoni пишет: >>>>>>> >>>>>>>> Il 27/11/2013 17:03, Vladimir 'φ-coder/phcoder' Serbinenko ha >>>>>>>> scritto: >>>>>>>>> On 27.11.2013 16:59, Fabio Fantoni wrote: >>>>>>>>>> Il 27/11/2013 12:50, Vladimir 'φ-coder/phcoder' Serbinenko ha >>>>>>>>>> scritto: >>>>>>>>>>> That pretty much explains what happened: you don't have any >>>>>>>>>>> /boot/grub2/grub.cfg and when looking for >>>>>>>>>>> /boot/grub/grub.cfg GRUB >>>>>>>>>>> found >>>>>>>>>>> its own memdisk and fell into recursion. I'm not sure what >>>>>>>>>>> should >>>>>>>>>>> be the >>>>>>>>>>> proper way to solve this recursion. >>>>>>> Yes, it was a bit naive on my side. Recursion in principle can be >>>>>>> stopped by using global variable, but search is limited to the >>>>>>> first >>>>>>> match only anyway, so I guess it is not worth it. >>>>>>> >>>>>>>>>> Anyone know how to exclude memdisk from the search please? >>>>>>> Please look in grub2 sources at docs/osdetect.cfg. It implements >>>>>>> advanced run-time detection of possible bootable files from >>>>>>> various operating systems. It boils down to loop across all >>>>>>> devices, >>>>>>> and of course you can either limit device names (like looking >>>>>>> for hd* >>>>>>> only) or explicitly exclude known ones (like memdisk). >>>>>>> >>>>>>>> Is it possible to specify a different default grub.cfg path >>>>>>>> (different >>>>>>>> from all other distributions) changing this command: >>>>>>>> ./grub-mkstandalone --grub-mkimage=./grub-mkimage -o >>>>>>>> pvgrub2.xen -O >>>>>>>> x86_64-xen -d grub-core/ boot/grub/grub.cfg >>>>>>>> Is it hardcoded as /boot/grub/grub.cfg for grub memdisk or can be >>>>>>>> set? >>>>>>>> >>>>>>> Not really. Currently the situation is >>>>>>> >>>>>>> - grub-mkstandalone hardcodes $prefix as (memdisk)/boot/grub >>>>>>> - after launch grub unconditionally starts "normal" module if at >>>>>>> all >>>>>>> possible >>>>>>> - normal module always tries to load and execute $prefix/grub.cfg >>>>>>> if no >>>>>>> explicit configuration file name is given as argument >>>>>>> >>>>>>> But I think that using osdetect.cfg or something based on this idea >>>>>>> won't require changing defaults at all. >>>>>> Thanks for your reply. >>>>>> >>>>>> I did this script that is working about finding and include the >>>>>> grub.cfg >>>>>> of pv domUs with many cases: >>>>>> >>>>>> cat > boot/grub/grub.cfg <>>>>> insmod lvm >>>>>> insmod ext2 >>>>>> insmod part_msdos >>>>>> insmod part_gpt >>>>>> insmod btrfs >>>>>> >>>>>> insmod regexp >>>>>> for dev in (*); do >>>>>> # $device: parenthesis removed from $dev >>>>>> regexp -s device '\((.*)\)' $dev >>>>>> set root=$device >>>>>> for file in /boot/vmlinuz-* /boot/linux-*; do >>>>>> if test -f $file; then >>>>>> set saved_root=$root >>>>>> fi >>>>>> done >>>>>> done >>>>>> set root=$saved_root >>>>>> >>>>>> if test -f /boot/grub2/grub.cfg ; then >>>>>> configfile /boot/grub2/grub.cfg >>>>>> elif test -f /boot/grub/grub.cfg ; then >>>>>> configfile /boot/grub/grub.cfg >>>>>> fi >>>>>> EOF >>>>>> >>>>>> @xen developer: Are there other modules to insert for other >>>>>> partitions >>>>>> or file systems, other grub cfg path for other distributions or >>>>>> other >>>>>> kernel type to search that support xen pv domUs? >>>>>> I think is good do and post complete pvgrub2 cfg that support all pv >>>>>> domUs. >>>>>> >>>>>> @xen and grub developer: I'm still unable to boot any entry of >>>>>> Sid pv >>>>>> domU using official kernel: >>>>>> xl -vvv create -c /etc/xen/sid.cfg >>>>>> ... >>>>>> Caricamento Linux 3.11-1-amd64... >>>>>> Caricamento ramdisk iniziale... >>>>>> xc: debug: hypercall buffer: total allocations:247 total >>>>>> releases:247 >>>>>> xc: debug: hypercall buffer: current allocations:0 maximum >>>>>> allocations:4 >>>>>> xc: debug: hypercall buffer: cache current size:4 >>>>>> xc: debug: hypercall buffer: cache hits:236 misses:4 toobig:7 >>>>>> >>>>>> Any ideas? >>>>>> >>>>> Ah I forgot: you need to "insmod xzio" since debian ones are >>>>> compressed. >>>>>> If you need more tests/informations tell me and I'll post them. >>>>>> >>>>>> Thanks for any reply. >>>>>> >>>> Thanks for reply, in the meantime I rebuilt updated grub2 from git >>>> (commit b67422d33de8eee83700db534a45b2ac5e5ed67a) and there is a >>>> regression from build of some days ago (I don't remember the exact >>>> commit, probably was of 24 or 25 november). >>>> Fails on script I posted on previous mail showing some errors: >>>>> kern/dl.c:619: module name: test >>>>> kern/dl.c:620: init function: 0x3f5abdd4 >>>>> error: two arguments expected. >>>>> commands/wildcard.c:164: Regexp is ^vmlinuz-.*$ >>>>> commands/wildcard.c:164: Regexp is ^linux-.*$ >>>>> error: two arguments expected. >>>>> commands/wildcard.c:164: Regexp is ^vmlinuz-.*$ >>>>> commands/wildcard.c:164: Regexp is ^linux-.*$ >>>>> error: two arguments expected. >>>>> commands/wildcard.c:164: Regexp is ^vmlinuz-.*$ >>>>> commands/wildcard.c:164: Regexp is ^linux-.*$ >>>> Full log with debug on attachment. >>>> >>> I updated git to commit 69ca97c820a623f85baf2db1627e19bef9c24e44 and >>> the >>> regression persist. >>> >>> About Sid boot adding "insmod xzio" not solve the problem. >>> Can you give me details of your working cases? >> Can you send me the exact kernel? My sid kernel work fine. > (Resent re-adding xen-devel and grub-devel) I have updated Sid domU today before retry with pvgrub2. Latest version of kernel and grub is installed, on attachment the grub.cfg of domU. If domU's grub.cfg is ok, what is git commit and details of your pvgrub2 build working? My actual build is: git clone git://git.sv.gnu.org/grub.git ./autogen.sh ./configure --target=x86_64 --with-platform=xen make mkdir -p boot/grub/ cat > boot/grub/grub.cfg <