-
-
Notifications
You must be signed in to change notification settings - Fork 268
determine EFI virtual disk size automatically #813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@gozora It looks much cleaner now (at least for me). In particular I prefer to have that single task now In 70_create_efibootimg.sh I wonder about the commented out code #mv $v -f $TMP_DIR/efiboot.img $TMP_DIR/boot/efiboot.img >&2
...
#ISO_FILES=( ${ISO_FILES[@]} $TMP_DIR/boot/efiboot.img )
which is a copy from the old 70_umount_efibootimg.sh An addendum only FYI because the following In general I wonder when a function (like efiboot_img_size) And even a step further: Of course it can make code better readable when But I think the efiboot_img_size functionality is Again: This is a matter of personal preference |
|
I forgot my main question: Before the minimum EFI virtual image size was 32000 KiB Now the minimum EFI virtual image size is 128 MiB. Why? As far as I understand it this could make the ISO image Some users use rear on thousands of their servers In other words: When the exact right size of EFI virtual image is determined, Why not always use the exact right size of EFI virtual image? |
|
For the functions I just followed what was already written (I'm lazy person and it is more convenient like this), but I share your view. Local functions should be local, so if you prefer to have function directly in 70_create_efibootimg.sh, in can move it there. The size topic is a bit tricky, but to cut the story short, smaller (32MB) image size is fine when GRUB is used, (BTW. now I've realized that this check was committed, I'll correct in in next pull request with something similar to this). As GRUB is capable to "escape" virtual image into ordinary ISO filesystem, and read kernel and initrd from there. ELILO is not, so you must copy kernel together with initrd into image which makes it significantly bigger. And one interesting fact that I've learned the hard way; virtual image must be aligned to 32MB ... |
|
Regarding the efiboot_img_size function just do it as you like Regarding the size: I wonder if there could be perhaps a bug because MB != MiB size=128000 else size=32000 ... dd if=/dev/zero of=$TMP_DIR/efiboot.img count=$size bs=1024 does neither result a 128 MiB nor MB nor 32 MiB nor MB efiboot.img Is 128 x 1000 x 1024 or 32 x 1000 x 1024 really correct Accordingly 1000 x 1024 would be kKiB ;-) |
|
Sorry, I got a bit confused I see that In the new code that uses dd ... count=$(efiboot_img_size $TMP_DIR/mnt) bs=1M the kKiB versus MiB issue is fixed. But I found a kKiB versus MiB issue still in dd if=/dev/zero of=$TMP_DIR/boot.img count=64000 bs=1024 "git blame" shows that @gdha made that one. @gdha dd if=/dev/zero of=$TMP_DIR/boot.img count=64 bs=1M |
|
I've just pushed a commit about "near to be finished patch". |
|
Do not bother the Linux-ia64 scripts - these systems are getting obsolete anyway |
Conflicts: usr/share/rear/lib/uefi-functions.sh usr/share/rear/output/ISO/Linux-i386/20_mount_efibootimg.sh
|
I've done some testing (unfortunately only on my virtual guests) and all seems to be working fine. |
|
@gdha shall I file new pull request or can you somehow resolve the conflicts manually? |
|
@gozora if it is not too much work, perhaps recreate the pull request? |
|
@gdha Can you please close this one? I'll create new pull request once this one is closed ... (just to avoid confusion ;-) ) |
|
close pull request as asked by @gozora |
Fix for manual detection of EFI virtual image (efiboot.img) size.