Ubuntu Image with both - UEFI and Legacy support
-
Hey guys,
in the past we tried to use an ubuntu Image for your (in most cases) fujitsu computers with legacy bios and that worked good. But now we are forced to switch to efi boot since more and more hardware doesn’t support legacy bios anymore and only running on uefi.
So my question is, is it possible to use one ubuntu image which is running on computers with legacy bios and with uefi as well?
Otherwise we will have to distribute two separate images one with uefi and the other one with legacy.I found that it’s possible to convert an ubuntu system from legacy to uefi but as I understand, that system won’t boot into legacy anymore.
Anyone with the same problem or maybe with a solution?Thanks in advance!
-
@Oleg said in Ubuntu Image with both - UEFI and Legacy support:
Otherwise we will have to distribute two separate images one with uefi and the other one with legacy.
I can’t speak to ubuntu, but for windows this is what we must do. We have one image for bios and one for uefi. It not a nice solution but the easiest to maintain and will avoid any future upgrade issues (again I’m talking future Windows upgrades).
If you don’t want to have 2 images on your campus it may be time to switch everything to uefi as they are reimaged. Most current systems will not downgrade to bios anymore so uefi is the only solution. It may be time to just leave bios behind.
-
@george1421 We had to switch earlier, you’re right. I thought there is maybe possible to create a ubuntu image, which is supporting both hardware types. There are about 500 computers with legacy and the next hardware will run on uefi.
If we reimage the 500 players, they won’t run as the uefi is not activated in the bios…
-
@Oleg As far as I know George is perfectly right here. Can’t think of a way to have an image that would run on legacy BIOS as well as on UEFI only machines. Partition schema is different…
-
Hi,
I have create a ubuntu image to boot in legacy and uefi mode, it works fine in virtualbox.
But when I upload the image on FOG. When I deploy this image on a legacy computer, it dosen’t boot, but boot on uefi computer.
The solution is grub-install, but is not include in FOS.
How to put grub-install on FOS ? -
@jc35 said in Ubuntu Image with both - UEFI and Legacy support:
The solution is grub-install, but is not include in FOS.
How to put grub-install on FOS ?Well then you use FOS to
chroot
into the Ubuntu install after imaging and run grub-install there. -
@sebastian-roth said in Ubuntu Image with both - UEFI and Legacy support:
@jc35 said in Ubuntu Image with both - UEFI and Legacy support:
The solution is grub-install, but is not include in FOS.
How to put grub-install on FOS ?So far I have not succeeded, I have compiled GRUB on my pc, then I try to copy the files to the FOS, but dependency problem. We would have to figure out how to compile GRUB in STATIC and copy into FOS.
Well then you use FOS to
chroot
into the Ubuntu install after imaging and run grub-install there.
With chroot, this requires manual intervention unfortunately, I would like to do it automatically in the postinstall scripts. -
@jc35 What I mean is mount the root partition of your Ubuntu system (that you deployed) and use
chroot
to switch into that system… -
@sebastian-roth said in Ubuntu Image with both - UEFI and Legacy support:
@jc35 What I mean is mount the root partition of your Ubuntu system (that you deployed) and use
chroot
to switch into that system…Can we use chroot in a script?
-
@jc35 said in Ubuntu Image with both - UEFI and Legacy support:
Can we use chroot in a script?
Sure you can. But I suggest you try it out in a FOS debug session first for easier debugging. I think you need to bind mount special filesystems like /dev and maybe also /proc and /sys for grub-install to properly work in this chroot environment. Just use your favorit search engine to find hints on this topic on the web.
-
Hi,
@sebastian-roth said in Ubuntu Image with both - UEFI and Legacy support:
@jc35 said in Ubuntu Image with both - UEFI and Legacy support:
Can we use chroot in a script?
Sure you can. But I suggest you try it out in a FOS debug session first for easier debugging. I think you need to bind mount special filesystems like /dev and maybe also /proc and /sys for grub-install to properly work in this chroot environment. Just use your favorit search engine to find hints on this topic on the web.
It’s works fine.
Thanks you very much. -
@jc35
mount /dev/sda1 /mnt
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/ptschroot /mnt ./usr/sbin/grub-install /dev/sda