Thanks.
Posts made by fractal13
-
RE: Deploy stops after restoring MBR
This is the behavior I was seeing, when my disk image used extended/logical partitions. If you are using logical partitions, then that could be the problem. You can check if logical partitions were captured by looking in the /images/IMAGENAME folder. There are files in there named d1p?.img. If you have any images with 5 or higher after the p, then you have logical partitions.
I’ve made a work around if you want to rebuild the init.xz file. If not, reinstall your source system with only primary partitions.
-
RE: Grub2 et fog 1.0.1
sfdisk is used to save and restore the partition table layout, in addition to the dd commands to save and restore the MBR.
So, my changes only deal with MBR style partitions, and leave the MBR bootloader backup as is.
-
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.
Detailed notes:
fog.upload:- 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.
fog.download:
- 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.)
[url=“/_imported_xf_attachments/0/807_fog.download.extended-partitions.txt?:”]fog.download.extended-partitions.txt[/url][url=“/_imported_xf_attachments/0/808_fog.upload.extended-partitions.txt?:”]fog.upload.extended-partitions.txt[/url]
-
RE: Grub2 et fog 1.0.1
I’ve made updates to the fog.download and fog.upload scripts that use sfdisk to save/restore logical partitions. It appears to be working on my test scenarios. I’ll post them to the developer forum, in case you want to use them.
-
RE: EBR signature for logical partition invalid
I have completed more tests.
Host configuration 1:
Dual boot, Windows 7 and Ubuntu 14.04
Grub2, MBR
Primary partition 1: Windows 7 (100 MB)
Primary partition 2: Windows 7 (C: drive)
Extended partition 3:
Logical partition 5: Linux (/ in ext4)
Logical partition 6: Linux (swap)System upload works fine. Results in the following files:
d1.mbr (32256 bytes)
d1p1.img
d1p2.img
d1p3.img (133 bytes)
d1p5.img
d1p6.imgSystem download fails as shown in the image above.
Host configuration 2:
Dual boot, Windows 7 and Ubuntu 14.04
Grub2, MBR
Primary partition 1: Windows 7 (100 MB)
Primary partition 2: Windows 7 (C: drive)
Primary partition 3: Linux (/ in ext4)
Primary partition 4: Linux (swap)
System upload works fine. Results in the following files:
d1.mbr (32256 bytes)
d1p1.img
d1p2.img
d1p3.img
d1p4.img
System download works fine to a blank disk system.
System boots fine into Windows 7 and Ubuntu 14.04.
My conclusions:- grub2 now appears to be supported (assuming it all fits into the 32K at the front of the disk)
- ext4 now appears to be supported (the move to partclone looks good)
- extended/logical partitions are still not supported.
[I][B]I would love to hear one of the fine developers confirm that my 3 conclusions are as intended by the development team.[/B][/I]
[U][B][I]Thanks for all of your work in producing, maintaining, and updating this software. It passes my criteria for great software: it makes my life better.[/I][/B][/U]
-
RE: Grub2 et fog 1.0.1
Did your Ubuntu installation go to logical or primary partitions? I’ve got a demo client system with windows 7 (primary partitions 1 & 2), and ubuntu 14.04 (primary partition 3 = /, 4 = swap), using grub 2. It appears to be working well. I did have problems when I did the default install, which put the ubuntu partitions as logical (5,6), since it appears these partitions are not cloned correctly.
-
RE: EBR signature for logical partition invalid
In reading fog.download, I see the ‘EBR …’ message comes from the sgdisk -Z command. Reading the source code for sgdisk suggests that this is not a problem. The empty disk has no partition table to delete, and the error messages don’t stop sgdisk.
Continuing in fog.download, my d1.mbr file is 32256 bytes, so the dd should send it to the disk. Examining the blank disk indicates that the MBR data was actually written. Booting the system with the almost empty disk from a rescue image shows the 2 primary partitions for windows, and the extended partition exists. But the logical partitions inside of the extended partition don’t exist. sfdisk -l and fdisk -l both complain about the extended partition’s lack of a valid signature or flag.
Continuing through fog.download, it appears that fogpartinfo --list-parts is not returning the list of partitions as desired. Likely because the logical partitions don’t exist properly? Reading source for fogpartinfo and libparted, I don’t understand why the non-logical partitions aren’t returned at least, but they aren’t processed in the fog.download for loop.
Finally, in trying to find the swap partition to restore, fog.download calls fdisk -l, which produces the Warning message in the image posted.
OK, is it true that I am having problems because of using logical partitions? If so, is there a way to use them correctly, or do I need to eliminate them?
Thanks.
-
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.
[ATTACH=full]798[/ATTACH]
Is there something I could do differently to make sure that the partition table is restored correctly?
Thanks.[url=“/_imported_xf_attachments/0/798_fog-download-error.jpg?:”]fog-download-error.jpg[/url]