From: "Thomas Schmitt" <scdbackup@gmx.net>
To: grub-devel@gnu.org
Cc: michel@bouissou.net
Subject: Re: A thread on grub-bug could need attention
Date: Tue, 30 Jan 2018 20:15:02 +0100 [thread overview]
Message-ID: <29547785772298108721@scdbackup.webframe.org> (raw)
In-Reply-To: <20180130180025.GB11729@router-fw-old.local.net-space.pl>
Hi,
Daniel Kiper wrote:
> IIRC you see blank screen after installing some distros. Right?
It also does not work when booting the ISO images which shall install
the systems.
E.g. debian-9.3.0-amd64-netinst.iso :
mount debian-9.3.0-amd64-netinst.iso /mnt/iso
mount /mnt/iso/boot/grub/efi.img /mnt/fat
At the end of the binary /mnt/fat/efi/boot/bootx64.efi, "strings" sees:
search --file --set=root /.disk/info
set prefix=($root)/boot/grub
source $prefix/x86_64-efi/grub.cfg
(memdisk)/boot/grub
The search leads to the ISO 9660 filesystem.
/mnt/iso/boot/grub/x86_64-efi/grub.cfg has
insmod part_acorn
insmod part_amiga
insmod part_apple
insmod part_bsd
insmod part_dfly
insmod part_dvh
insmod part_gpt
insmod part_msdos
insmod part_plan
insmod part_sun
insmod part_sunpc
source /boot/grub/grub.cfg
/mnt/iso/boot/grub/grub.cfg has
if loadfont $prefix/font.pf2 ; then
set gfxmode=800x600
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod gfxterm
insmod png
terminal_output gfxterm
fi
if background_image /isolinux/splash.png; then
set color_normal=light-gray/black
set color_highlight=white/black
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
insmod play
play 960 440 1 0 4 440 1
set theme=/boot/grub/theme/1
menuentry --hotkey=g 'Graphical install' {
set background_color=black
linux /install.amd/vmlinuz vga=788 --- quiet
initrd /install.amd/gtk/initrd.gz
}
menuentry --hotkey=i 'Install' {
set background_color=black
linux /install.amd/vmlinuz vga=788 --- quiet
initrd /install.amd/initrd.gz
}
submenu --hotkey=a 'Advanced options ...' {
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
set theme=/boot/grub/theme/1-1
menuentry '... Graphical expert install' {
set background_color=black
linux /install.amd/vmlinuz priority=low vga=788 ---
initrd /install.amd/gtk/initrd.gz
}
menuentry '... Graphical rescue mode' {
set background_color=black
linux /install.amd/vmlinuz vga=788 rescue/enable=true --- quiet
initrd /install.amd/gtk/initrd.gz
}
menuentry '... Graphical automated install' {
set background_color=black
linux /install.amd/vmlinuz auto=true priority=critical vga=788 --- quiet
initrd /install.amd/gtk/initrd.gz
}
menuentry --hotkey=x '... Expert install' {
set background_color=black
linux /install.amd/vmlinuz priority=low vga=788 ---
initrd /install.amd/initrd.gz
}
menuentry --hotkey=r '... Rescue mode' {
set background_color=black
linux /install.amd/vmlinuz vga=788 rescue/enable=true --- quiet
initrd /install.amd/initrd.gz
}
menuentry --hotkey=a '... Automated install' {
set background_color=black
linux /install.amd/vmlinuz auto=true priority=critical vga=788 --- quiet
initrd /install.amd/initrd.gz
}
submenu --hotkey=s '... Speech-enabled advanced options ...' {
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
set theme=/boot/grub/theme/1-1-1
menuentry --hotkey=x '... Expert speech install' {
set background_color=black
linux /install.amd/vmlinuz priority=low vga=788 speakup.synth=soft ---
initrd /install.amd/gtk/initrd.gz
}
menuentry --hotkey=r '... Rescue speech mode' {
set background_color=black
linux /install.amd/vmlinuz vga=788 rescue/enable=true speakup.synth=soft --- quiet
initrd /install.amd/gtk/initrd.gz
}
menuentry --hotkey=a '... Automated speech install' {
set background_color=black
linux /install.amd/vmlinuz auto=true priority=critical vga=788 speakup.synth=soft --- quiet
initrd /install.amd/gtk/initrd.gz
}
}
}
menuentry --hotkey=s 'Install with speech synthesis' {
set background_color=black
linux /install.amd/vmlinuz vga=788 speakup.synth=soft --- quiet
initrd /install.amd/gtk/initrd.gz
}
--------------------------------------------------------------------
Well, my MBR versus GPT theory fades away by Daniel Kiper's above question.
The next step would have been to build a grub-mkrescue image with
a partition layout like Knoppix 8.1. You'd take script
xorriso-1.4.8/frontend/grub-mkrescue-sed.sh
from a GNU xorriso source installation or from
https://dev.lovelyhq.com/libburnia/libisoburn/raw/master/frontend/grub-mkrescue-sed.sh
and use it as "xorriso" for the grub-mkrescue run.
It re-arranges the options for the xorriso run to achieve other partition
layouts and/or positions of the EFI System Partition.
Default is mode "mbr_only", which puts the EFI partition image after
the ISO 9660 partition and marks both partitions by MBR rather than GPT.
Best with xorrisofs option "-partition_offset 16", which lets the ISO
partition start at byte 32768 with an own superblock and directory tree,
while the overall ISO filesystem starts at byte 0 and claims the whole
image size including the EFI partition as its filesystem size.
grub-mkrescue -o output.iso minimal \
--xorriso=...path.../grub-mkrescue-sed.sh \
-partition_offset 16
If xorriso-1.4.8 is installed, you should afterwards get told by
xorriso -indev output.iso -report_system_area plain
something like:
System area summary: MBR grub2-mbr cyl-align-off
ISO image size/512 : 33864
Partition offset : 16
MBR heads per cyl : 64
MBR secs per head : 32
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x80 0x00 64 28040
MBR partition : 2 0x00 0xef 28104 5760
after this harmless warning:
libisofs: WARNING : Found hidden El-Torito image. Its size could not be figured out, so image modify or boot image patching may lead to bad results.
(I will have to improve the multi-session capabilities with boot images
which are not reachable as files of the ISO 9660 filesystem.)
Have a nice day :)
Thomas
next prev parent reply other threads:[~2018-01-30 19:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 11:35 A thread on grub-bug could need attention Thomas Schmitt
2018-01-08 12:48 ` Daniel Kiper
2018-01-08 16:14 ` Michel Bouissou
2018-01-29 12:49 ` Daniel Kiper
2018-01-29 15:29 ` Michel Bouissou
2018-01-29 18:20 ` Michel Bouissou
2018-01-29 18:53 ` Thomas Schmitt
2018-01-30 15:18 ` Michel Bouissou
2018-01-30 16:33 ` Thomas Schmitt
2018-01-30 17:43 ` Michel Bouissou
2018-01-30 18:00 ` Daniel Kiper
2018-01-30 19:15 ` Thomas Schmitt [this message]
2018-01-31 9:38 ` Michel Bouissou
2018-01-31 12:20 ` Thomas Schmitt
2018-01-31 13:22 ` Michel Bouissou
2018-01-31 15:33 ` Thomas Schmitt
2018-01-31 21:37 ` Thomas Schmitt
2018-01-31 22:47 ` Michel Bouissou
2018-02-01 0:02 ` Thomas Schmitt
2018-02-01 21:56 ` Michel Bouissou
2018-02-02 8:15 ` Thomas Schmitt
2018-02-02 10:28 ` Michel Bouissou
2018-02-02 10:50 ` Thomas Schmitt
2018-02-02 10:18 ` Thomas Schmitt
2018-01-31 15:46 ` Daniel Kiper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29547785772298108721@scdbackup.webframe.org \
--to=scdbackup@gmx.net \
--cc=grub-devel@gnu.org \
--cc=michel@bouissou.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.