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

Re: Reproducing cd build



Hi,
I managed to run the 2-step process (debian-cd_info.tar.gz creation
+ debian-cd netinst iso build) and found the issue is in the grub prefix set up
when grub-mkimage is done.

diff --git a/build/config/ppc64el.cfg b/build/config/ppc64el.cfg
index af0afb7..48c1bbe 100644
--- a/build/config/ppc64el.cfg
+++ b/build/config/ppc64el.cfg
@@ -46,7 +46,7 @@ arch_cd_info_dir:
                KERNEL /install/vmlinux \
                INITRD /install/initrd.gz \
        < $(GRUB_CFG_CDROM) > $(TEMP_CD_INFO_DIR)/boot/grub/grub.cfg
-       grub-mkimage -O powerpc-ieee1275 -p '(ieee1275/cdrom)/boot/grub' \
+       grub-mkimage -O powerpc-ieee1275 -p '()/boot/grub' \
                -o $(TEMP_CD_INFO_DIR)/boot/grub/powerpc.elf \
                $(GRUB_MODULES) $(GRUB_MODULES_CDROM)
        cp -p /usr/lib/grub/powerpc-ieee1275/bootinfo.txt \

On PowerVM if no devalias is defined for cdrom in the OF, the current code fails.
With the change it will work. I guess that can help also in case the debian installer
is ran from a USB key (PowerVM and even qemu from SLOF).
I saw afterwards that this has been fixed a long time ago in Ubuntu :
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1334793
But it hasn't been pulled in debian :( ; should it be pulled from Ubuntu to keep
credits or should I send a patch ?

F.


On Mon, 9 May 2016 16:13:07 +0200, Frederic Bonnard <frediz@linux.vnet.ibm.com> wrote:
> Hi Steve,
> 
> > Hmmm, OK. IIRC there was a change in default path quite a while back
> > which had this kind of effect, but I *think* that was back
> > pre-Jessie. We had to cope with this for x86 architectures. *Maybe*
> > there's a similar change needed for ppc64el too?
> > 
> > git://git.debian.org/d-i/debian-installer commit 81109010691ee0fc9357bd10be8fe116b9bb9f84
> > 
> > is the thing I'm looking at. Maybe compare the grub.cfg file in each image?
> 
> grub.cfg is the same in both mini.iso and debian-testing-ppc64el-netinst.iso.
> 
> With the failing debian-testing-ppc64el-netinst.iso, I also noticed that when
> I define "cdrom" alias in the openfirmware, grub loads its menu.
> 
> --- in the openfirmware :
> 0 > devalias 
> ibm,sp              /vdevice/IBM,sp@4000
> network             /vdevice/l-lan@30000002
> net                 /vdevice/l-lan@30000002
> scsi                /vdevice/v-scsi@30000015
> nvram               /vdevice/nvram@4002
> rtc                 /vdevice/rtc@4001
>  ok
> 
> 0 > devalias cdrom /vdevice/v-scsi@30000015/disk@8200000000000000  ok
> 0 > boot cdrom
> ---
> 
> Grub shows the menu and in grub's command line, I have :
> 
> ---
> grub> set                       
> ?=0      
> cmdpath=(ieee1275/cdrom,5)
> color_highlight=black/light-gray
> color_normal=light-gray/black   
> default=2                    
> feature_200_final=y
> feature_all_video_module=y
> feature_chainloader_bpb=y 
> feature_default_font_path=y
> feature_menuentry_id=y     
> feature_menuentry_options=y
> feature_nativedisk_cmd=y   
> feature_ntldr=y         
> feature_platform_search_hint=y
> feature_timeout_style=y       
> grub_cpu=powerpc       
> grub_platform=ieee1275
> lang=                 
> locale_dir=
> pager=     
> prefix=(ieee1275/cdrom)/boot/grub
> root=ieee1275/cdrom              
> secondary_locale_dir=
> ---
> 
> Without doing devalias, it's failing to load the menu and I have :
> ---
> grub> set                       
> ?=0      
> cmdpath=(ieee1275//vdevice/v-scsi@30000015/disk@8200000000000000,5)
> color_highlight=black/light-gray                                   
> color_normal=light-gray/black   
> feature_200_final=y          
> feature_all_video_module=y
> feature_chainloader_bpb=y 
> feature_default_font_path=y
> feature_menuentry_id=y     
> feature_menuentry_options=y
> feature_nativedisk_cmd=y   
> feature_ntldr=y         
> feature_platform_search_hint=y
> feature_timeout_style=y       
> grub_cpu=powerpc       
> grub_platform=ieee1275
> lang=                 
> locale_dir=
> pager=     
> prefix=(ieee1275/cdrom)/boot/grub
> root=ieee1275/cdrom              
> secondary_locale_dir=
> ---
> 
> So it seems that the value cmdpath in grub is different and changes the
> behaviour. Grub shows version "2.02~beta2-36".
> 
> mini.iso which works without the devalias workaround, shows the good value of
> cmdpath i.e. (ieee1275/cdrom,5) and shows "2.02~beta2-36". So I think your commit is good.
> But the 2 grubs behave differently in determing cmdpath value.
> They also show the same version.
> 
> ---
>  $ ls -ltr mini/boot/grub/powerpc.elf debian-testing-ppc64el-netinst/boot/grub/powerpc.elf
>  -r--r--r-- 3 root root  81068 Jan  6 07:37 mini/boot/grub/powerpc.elf
>  -r--r--r-- 1 root root 286964 May  9 02:00 debian-testing-ppc64el-netinst/boot/grub/powerpc.elf
> ---
> 
> How does that come ? Do we have different versions of grub actually for testing
> mini.iso and testing netinst ? or are those binaries build differently from the
> same source, one missing some functionnalities.
> 
> I'm still trying to make debian-cd work on my side :)
> 
> F.


Reply to: