add grub_run_no_partition option to generate correct grub.conf#100
add grub_run_no_partition option to generate correct grub.conf#100biancalana wants to merge 1 commit intofreebsd:masterfrom
Conversation
and allow boot using unpartitioned disks common on cloud images
|
@biancalana Could you let me know an example of unpartitioned cloud images? I'll test it with it. |
|
@metalefty alpine nocloud images (https://www.alpinelinux.org/cloud/) You need to convert from qcow2 to raw using qemu-img |
|
The Alpine image successfully booted with the following additional configuration. |
metalefty
left a comment
There was a problem hiding this comment.
Please also reflect changes on man pages, edit vm.8.
| # generate right grub.conf when the disk does not use any partition | ||
| # like some cloud images | ||
| config::get "_grub_opt" "grub_run_no_partition" | ||
| if [ -n "${_grub_opt}" ]; then |
There was a problem hiding this comment.
| if [ -n "${_grub_opt}" ]; then | |
| if [ config::yesno "grub_run_no_partition" ]; then |
There was a problem hiding this comment.
config:yesno might be better because it can handle on/true/yes/1|off/false/no/0.
The current code interprets grun_run_no_partition=no as "yes". It could mislead.
| [ -n "${_grub_opt}" ] && _root="hd0,${_grub_opt}" | ||
| # generate right grub.conf when the disk does not use any partition | ||
| # like some cloud images | ||
| config::get "_grub_opt" "grub_run_no_partition" |
There was a problem hiding this comment.
| config::get "_grub_opt" "grub_run_no_partition" |
|
@michael-o Do you have any opinions? |
No opinion, but would to know whether these images can also boot via UEFI? |
|
It actually doesn't boot with UEFI, but images for UEFI are also available. BIOS versions seem to support only BIOS+GRUB. |
I see, ok. Then this makes sense, I guess. |
|
@biancalana This one can be merged once the comments are addressed. |
Its common cloud images provide unpartitioned disks.
This add an option that generate grub.conf that allow boot using unpartitioned disks.