@bigjim How was the image you are deploying installed/created? If it is from a BIOS installed OS, it may not boot on a UEFI system. Sorry if this is a trivial answer.
Posts made by fractal13
Single disk (resizeable) 1 partition restore
I usually build my multi-partition (6+ partitions, 2+ OSs) image by installing on several systems, then capturing the individual partitions from separate machines, and deploying them all to one machine. I tried to do that with the latest release candidate and saw that on deployment, each image overwrote the MBR, GPT partition types, and partition UUIDs.
If I change the download scripts to only modify the target partition on deploy of single partition images, will it be accepted into the dev branch?
PS. Sorry for the long absence. Life’s good but eventful. I’m really impressed with the progress you’ve made with FOG in two years.
Linux, grubx64.efi, and refind.conf
- FOG Version: 1.5.0-RC-5
- OS: Ubuntu 14.04.5 LTS
Wanted to document this configuration for others.
I’m using FOG to image UEFI multi-boot systems, with boot-time selection controlled by /EFI/ubuntu/grubx64.efi. UEFI is configured to boot PXE first, then from the hard drive.
When I configure iPXE’s UEFI exit to anything other than rEFInd, I get the infinite boot attempts issue.
When I leave iPXE’s UEFI exit to rEFInd, the default I believe, then rEFInd tries to boot the first .efi file from /EFI/ubuntu/, which fails to boot. This is because the default_selection for rEFInd is set to 1.
I solved my problem with this:
sed -i 's/^default_selection .*/default_selection "grubx64.efi"/' /var/www/html/fog/service/ipxe/refind.conf
BTW: You guys have been busy! I’m liking 1.5.0. Good work.
Improved grub2 solution proposal
Updated versions of fog.download, fog.upload and funcs.sh to improve grub2 support.
Short description: These changes capture the full “embedding area” (the space before the first partition), instead of just the first 63 sectors. It turns out that grub2 may use more than the 62 sectors, if they are available. With Windows 7, the first partition is usually at 2048, not 64.
These scripts have been tested at least one full cycle of upload/download using a dual-boot (windows 7 & ubuntu 14.04) system, using grub2 and extended partitions for the ubuntu system.
I tried to make it so that you can just replace the old files with these. I think I even got the tabs right.
Let me know if you have any questions.
Extended/Logical Partitions Proposed Solution
In order to support extended and logical partitions, I’ve made changes to the fog.upload and fog.download scripts. The modified versions are attached. I’ve tested these on some simple setups, and they appear to be working.
Please consider incorporating this change into the release. I think this will avoid lots of rookie mistakes for people doing dual-boot and Linux systems, since so many Linux systems are installed with logical partitions from the start.
- Moved the detection of gpt or mbr to inside the “mps” and “mpa” portions, so that the test can be performed per-disk.
- Added per-disk sfdisk -l to detect if Extended partition exists or not.
- On MBR disks, with Linux image type (osid == 50), save the partition table to d?.partitions, using sfdisk -d
- In “mpa” image type, for MBR disks, with Linux image type, capture full (63 sectors) of mbr, not just first disk. (OK, this isn’t strictly necessary, but some systems to have grub2 installed on additional disks). It was also necessary to keep the code clean for capturing extended and logical partitions on drives other than the first.
- In “mpa” section, fixed GPT mbr to capture from $disk. Was capturing from $hd (the first drive) for all drives.
- In both “mps” and “mpa” sections, if the MBR is full (63 sectors) and image type is Linux, and if the d?.partitions file exists, use sfdisk to restore the partition table (after the dd to restore the d?.mbr file).
- In the “mpa” section, make the MBR restoration occur for all disks, not just the first one. (This is to reflect the similar change in the upload script.)
EBR signature for logical partition invalid
I’m using a fresh install of FOG 1.0.1, on ubuntu 14.04 server.
I’ve been able to capture and download images (linux, single disk, multiple partitions) from one machine and restore on another machine with a completely blank disk. The installation has linux on 2 logical partitions (5,6).
I’m able to capture a image with windows 7 and linux (linux, single disk, multiple partitions). Windows 7 creates 2 primary partitions (1,2), linux is in 2 logical partitions (5,6). When I try to restore this image to a new machine with a blank disk, I get ‘EBR signature for logical partition invalid’, during the ‘Erasing current MBR/GPT Tables’. Then, then restore continues, saying it will ‘Restore Linux swap partitions’ with a warning message ‘invalid flag 0x0000 of partition table 5 will be corrected by w(rite)’. Finally, the download ends without actually copying any partition data, and reboots the target system.
Repeated attempts on the same disk to not produce any better results.
If I restore the image to the original disk, the restoration occurs, and all data is copied.
I’ve attached a screen shot of the errors.
Is there something I could do differently to make sure that the partition table is restored correctly?