Old computer (asus eeeTop all in one touchscreen) mbr fails to restore after imaging task
-
@Sebastian-Roth
And here is the list of files of the image of the actual machine with the zipped mbr binary file[root@arrowfogSnode images]# ls /images/eeeTop/ d1.fixed_size_partitions d1.original.fstypes d1p2.img d1.mbr d1.original.swapuuids d1.partitions d1.minimum.partitions d1p1.img
-
@Sebastian-Roth So I just went to check on it after the upload and the problem did not occur this time. And it should be noted that I have updated fog since the original problem. So it no longer occurs after upload.
-
Ok, the d1.mbr you uploaded as ZIP actually shows that sda1 is marked active. So this will be pushed back to the client when “restoring the original disk layout” after uploading the shrinked partitions. I tried to reproduce this in my test VM but was not lucky yet. When I just did a resizable image type upload with second partition marked active it all went fine. Not saying that this is not possible. Just wondering what I did wrong.
Please upload the new
d1.mbr
andd1.partitions
after the upload finished as well as the requestedfdisk -l /dev/sda
… -
Since the problem didn’t recur, I should probably test download overnight or something.
I’ll set it to download the universal image that failed before at 1 am tonight and check it in the morning. Then I’ll just restore the image I just made of it to put it back the way it was.@Sebastian-Roth I did upload the mbr and fdisk -l. I just also put the entire debug console output just in case there was something useful there too. See post 11 for the debug output and post 12 for the mbr of the image from the machine. But again, I gotta note that the problem didn’t recur this time around. I have updated fog since the original problem. 20 days ago it happened on git ver 7593, it did not happen after upload on git ver 7961
-
What about
cat /images/eeeTop/d1.partitions
?? In the newd1.mbr
you uploaded I still see sda1 being marked as active - instead of sda2. Hmmm?!? -
@Sebastian-Roth
as you requested, d1.partitions says…[root@arrowfogSnode images]# cat eeeTop/d1.partitions label: dos label-id: 0xc461246b device: /dev/sda unit: sectors /dev/sda1 : start= 2048, size= 1024000, type=7, bootable /dev/sda2 : start= 1026048, size= 311552000, type=7
On a different note, I got in before everybody that uses this in production so I could test this out. It imaged with my original universal legacy image and the problem did happen this time on a download.
So just to review.- On git 7593 20 days ago upload and download caused disk 2 to go inactive
- On git 7961 upload works fine but download of the original intended image still causes the problem.
I just booted it into a download debug task to download the image I uploaded yesterday from the machine itself.
Here is the fdisk -l output when it is not working…fdisk -l /dev/sda Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x9bb2a2a8 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT /dev/sda2 1026048 312581631 311555584 148.6G 7 HPFS/NTFS/exFAT
The d1.partitions content of this image (The original one from a vm, not the machine) in case you need it for comparison is…
[root@arrowfogSnode images]# cat BaseImgLegacy32/d1.partitions label: dos label-id: 0xc63d5d20 device: /dev/sda unit: sectors /dev/sda1 : start= 2048, size= 1024000, type=7, bootable /dev/sda2 : start= 1026048, size= 82857984, type=7
Both images, eeeTop from the machine and BaseImgLegacy32 are resizable images grabbing everything.
It is possible that the only problem is that the disk is not active. I have not tested simply setting it to active and rebooting, I have always done the bcdboot and bootrec commands as a safety net. I will test that theory really quick to see if I really need to be recreating boot files and such.
-
@Arrowhead-IT said in Old computer (asus eeeTop all in one touchscreen) mbr fails to restore after imaging task:
It is possible that the only problem is that the disk is not active. I have not tested simply setting it to active and rebooting, I have always done the bcdboot and bootrec commands as a safety net. I will test that theory really quick to see if I really need to be recreating boot files and such.
I just tested this, it is not the case. Simply making it active brings up an error says that the boot/bcd files are missing or corrupt.
So I do still need to run at leastbcdboot C:\Windows
I am going to test download with the image that I uploaded from the computer now and see if it still happens. I figure since this image was uploaded on the newer version of fog, if any changes were made, this will let us know that it is fixed, except that it’s working on an image from a 512 sector hdd to a 512 sector hdd. So if I need to, I can also update my legacy image, which I was planning on doing today anyway, and I’ll try it again for funzies.
-
Here is the output from the debug download task of the image from the machine taken yesterday.
In the vardump, I noticed that the mbr file variable isn’t set to anything. Not sure if that’s something or not. Also, note that I did a fdisk -L before and after, but also remember that I had set partittion 2 to be active manually just before this task.
[Thu Jun 02 root@fogclient ~]# fdisk -l /dev/sda Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x9bb2a2a8 Device Boot Start End Sectors Size Id Type /dev/sda1 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT /dev/sda2 * 1026048 312581631 311555584 148.6G 7 HPFS/NTFS/exFAT [Thu Jun 02 root@fogclient ~]# fog +------------------------------------------+ | ..#######:. ..,#,.. .::##::. | |.:###### .:;####:......;#;.. | |...##... ...##;,;##::::.##... | | ,# ...##.....##:::## ..:: | | ## .::###,,##. . ##.::#.:######::.| |...##:::###::....#. .. .#...#. #...#:::. | |..:####:.. ..##......##::## .. # | | # . ...##:,;##;:::#: ... ##.. | | .# . .:;####;::::.##:::;#:.. | | # ..:;###.. | | | +------------------------------------------+ | Free Computer Imaging Solution | +------------------------------------------+ | Credits: http://fogproject.org/Credits | | http://fogproject.org/Credits | | Released under GPL Version 3 | +------------------------------------------+ Version: 7961 * Press [Enter] key to continue * Verifying network interface configuration.........Done * Press [Enter] key to continue * Checking Operating System.........................Windows 10 * Checking CPU Cores................................2 * Send method.......................................NFS * Attempting to check in............................Done * Press [Enter] key to continue * Mounting File System..............................Done * Press [Enter] key to continue * Checking Mounted File System......................Done * Press [Enter] key to continue * Checking img variable is set......................Done * Press [Enter] key to continue * Attempting to send inventory......................Done * Press [Enter] key to continue * Using Image: eeeTop * Looking for Hard Disk.............................Done * Press [Enter] key to continue * Using Disk: /dev/sda * Enabling write cache..............................Enabled * Press [Enter] key to continue * Using Hard Disk: /dev/sda * Preparing Partition layout * Erasing current MBR/GPT Tables....................Done * Press [Enter] key to continue * Restoring Partition Tables (MBR)..................Done * Press [Enter] key to continue * Inserting Extended partitions.....................Done * Press [Enter] key to continue * Attempting to expand/fill partitions..............Done * Press [Enter] key to continue +--------------------------------+ | Attempting to download image | +--------------------------------+ | Using Partclone | +--------------------------------+ * Processing Partition: /dev/sda1 (1) * Press [Enter] key to continue * Imaging using Partclone Cloned successfully. * Clearing ntfs flag................................Done * Not expanding (/dev/sda1) fixed size * Press [Enter] key to continue * Processing Partition: /dev/sda2 (2) * Press [Enter] key to continue * Imaging using Partclone Cloned successfully. * Clearing ntfs flag................................Done * Resizing ntfs volume (/dev/sda2)..................Done * Press [Enter] key to continue * Clearing ntfs flag................................Done * Press [Enter] key to continue * Resetting UUIDs for /dev/sda * Press [Enter] key to continue * Resettings swap systems * Press [Enter] key to continue * Stopping FOG Status Reporter......................Done * Press [Enter] key to continue * Mounting directory................................Done * Press [Enter] key to continue * Mounting directory................................Done * Press [Enter] key to continue * Changing hostname.................................Done * Press [Enter] key to continue * Task Complete * Updating Database.................................Done * Press [Enter] key to continue [Thu Jun 02 root@fogclient ~]# fdisk -l /dev/sda Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x094905ec Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT /dev/sda2 1026048 312581631 311555584 148.6G 7 HPFS/NTFS/exFAT
After rebooting the problem happened again. So I booted into a windows usb and opened the command prompt.
I confirmed that partition 2 was inactive, but I didn’t set it to active this time. I listed the volumes and saw sda1 to be C:\ and sda2 to be E:
Instead of creating new bootfiles I ranbootrec /rebuildbcd
This found the boot files on E:\Windows (The inactive partition) I said yes to restoring the boot options. I confirmed the boot setting withbcdedit
which said that the windows bootmgr is on C:\ (sda1 system partition) and it showed windows 10 LTSB on E:\Windows as the default boot option. I checked diskpart again after that and noted that partition 2 was still showing as inactive. I rebooted and it booted like normal.Trouble is, I now need to do the same bootrec command on the computer after imaging it with the original image and see what happens. Because the E:\Windows boot files were put there by me in this image when I “fixed” it for these devices as described in the original posting. I will have to do that later though, the people need their barcode scanner computer.
Oh and I don’t know if it matters or not and not sure if I already mentioned it, but these are 32bit machines that are using the 32 bit kernel and init.
Hopefully though, this is enough information to do something with.
-
@Arrowhead-IT Windows 10 doesn’t have a mbr file to default to. THat’s what you see in the environment variables. If the image type was of 7 you should see a default that looks to come from /usr/share/fog/lib/. This is setup as windows 10 though, which was only introduced in the “trunk” versions of FOG so those versions automatically create the mbr files.
-
A whole new issue.
Somehow the upload from yesterday didn’t actually upload?
No wait it did. Are you confused? you should be!So I had it set to upload to a storage node but it seems to have uploaded to the default node instead. I must have had it set wrong or something. So the ls of the image and mbr I sent of the eeetop image is from may 12th when uploading it broke.
Here is the mbr file, image folder contents, and d1.partitions contents of the actual image from yesterday…
0_1464877726814_d1.zip[root@arrowfog images]# cd eeeTop/ [root@arrowfog eeeTop]# ls -l total 4624968 -rwxrwxrwx 1 root root 2 Jun 1 15:06 d1.fixed_size_partitions -rwxrwxrwx 1 root root 1048576 Jun 1 15:08 d1.mbr -rwxrwxrwx 1 root root 190 Jun 1 15:08 d1.minimum.partitions -rwxrwxrwx 1 root root 15 Jun 1 15:07 d1.original.fstypes -rwxrwxrwx 1 root root 0 Jun 1 15:06 d1.original.swapuuids -rwxrwxrwx 1 root root 248333328 Jun 1 15:09 d1p1.img -rwxrwxrwx 1 root root 4486558515 Jun 1 15:36 d1p2.img -rwxrwxrwx 1 root root 190 Jun 1 15:06 d1.partitions
[root@arrowfog eeeTop]# cat d1.partitions label: dos label-id: 0x25ec63c7 device: /dev/sda unit: sectors /dev/sda1 : start= 2048, size= 1024000, type=7 /dev/sda2 : start= 1026048, size= 311555584, type=7, bootable
Now to test this image…
-
Ok, here’s the debug output with a fdisk before and after of a download of the image I took yesterday for real this time…
[Thu Jun 02 root@fogclient ~]# fdisk -l /dev/sda Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x094905ec Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT /dev/sda2 1026048 312581631 311555584 148.6G 7 HPFS/NTFS/exFAT [Thu Jun 02 root@fogclient ~]# fog +------------------------------------------+ | ..#######:. ..,#,.. .::##::. | |.:###### .:;####:......;#;.. | |...##... ...##;,;##::::.##... | | ,# ...##.....##:::## ..:: | | ## .::###,,##. . ##.::#.:######::.| |...##:::###::....#. .. .#...#. #...#:::. | |..:####:.. ..##......##::## .. # | | # . ...##:,;##;:::#: ... ##.. | | .# . .:;####;::::.##:::;#:.. | | # ..:;###.. | | | +------------------------------------------+ | Free Computer Imaging Solution | +------------------------------------------+ | Credits: http://fogproject.org/Credits | | http://fogproject.org/Credits | | Released under GPL Version 3 | +------------------------------------------+ Version: 7961 * Press [Enter] key to continue * Verifying network interface configuration.........Done * Press [Enter] key to continue * Checking Operating System.........................Windows 10 * Checking CPU Cores................................2 * Send method.......................................NFS * Attempting to check in............................Done * Press [Enter] key to continue * Mounting File System..............................Done * Press [Enter] key to continue * Checking Mounted File System......................Done * Press [Enter] key to continue * Checking img variable is set......................Done * Press [Enter] key to continue * Attempting to send inventory......................Done * Press [Enter] key to continue * Using Image: eeeTop * Looking for Hard Disk.............................Done * Press [Enter] key to continue * Using Disk: /dev/sda * Enabling write cache..............................Enabled * Press [Enter] key to continue * Using Hard Disk: /dev/sda * Preparing Partition layout * Erasing current MBR/GPT Tables....................Done * Press [Enter] key to continue * Restoring Partition Tables (MBR)..................Done * Press [Enter] key to continue * Inserting Extended partitions.....................Done * Press [Enter] key to continue * Attempting to expand/fill partitions..............Done * Press [Enter] key to continue +--------------------------------+ | Attempting to download image | +--------------------------------+ | Using Partclone | +--------------------------------+ * Processing Partition: /dev/sda1 (1) * Press [Enter] key to continue * Imaging using Partclone Cloned successfully. * Clearing ntfs flag................................Done * Not expanding (/dev/sda1) fixed size * Press [Enter] key to continue * Processing Partition: /dev/sda2 (2) * Press [Enter] key to continue * Imaging using Partclone Cloned successfully. * Clearing ntfs flag................................Done * Resizing ntfs volume (/dev/sda2)..................Done * Press [Enter] key to continue * Clearing ntfs flag................................Done * Press [Enter] key to continue * Resetting UUIDs for /dev/sda * Press [Enter] key to continue * Resettings swap systems * Press [Enter] key to continue * Stopping FOG Status Reporter......................Done * Press [Enter] key to continue * Mounting directory................................Done * Press [Enter] key to continue * Mounting directory................................Done * Press [Enter] key to continue * Changing hostname.................................Done * Press [Enter] key to continue * Task Complete * Updating Database.................................Done * Press [Enter] key to continue [Thu Jun 02 root@fogclient ~]# fdisk -l /dev/sda Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x25ec63c7 Device Boot Start End Sectors Size Id Type /dev/sda1 2048 1026047 1024000 500M 7 HPFS/NTFS/exFAT /dev/sda2 * 1026048 312581631 311555584 148.6G 7 HPFS/NTFS/exFAT
After this download task it booted up proper. So the image from the physical machine taken yesterday did not cause the problem on upload or download.
But the image taken on May 12th on fog git ver 7593 from the machine itself caused boot fail on upload and download.@Tom-Elliott Has anything been changed that would relate to this problem since then? Should I update my universal 32bit image and give it a try? Or has nothing changed and this is a weird occurrence on my end on only these 2 devices?
Thanks for all your help thus far. And again sorry for not seeing your requests when you posted them originally.
-
@Arrowhead-IT Thanks heaps for all the detailed information. The full debug steps are great as well. I am sure I will be able to figure this out when I get enough time. This won’t be before the weekend I suppose. Maybe not even this weekend. But I won’t forget, promise!
-
@Arrowhead-IT said:
- On git 7593 20 days ago upload and download caused disk 2 to go inactive
- On git 7961 upload works fine but download of the original intended image still causes the problem
First I want to say thank you again for all the testing you did and the detailed information. I’ve spend a couple of hours trying to find what might have caused this issue but I was unable to reproduce the same problem on my machine here. Version numbers are fine when trying to find a problem in the web gui code but unfortunately it’s not the same for the scripts in the init files because the installer always tries to download the very latest inits from the official FOG website. So if you run the same installer without updating your local git/svn repository you will have a newer code in the inits but still the “old” code within the repo. While this is not causing any trouble I just try to point this out to show you that web gui and the installer version are the same but don’t essentially match up with the version of the script code in your init files.
Don’t get me wrong. I am keen to find out what was causing this and when / how we fixed it. But this would cost me a couple more hours and I don’t have the time to dig any further right now. Please keep us posted if you’re seeing this kind of issue again.
Attached is a diff of all the changes within
src/buildroot/package/fog/scripts/
in the git repository since around early April. Nothing I would assume has anything to do with the problem you had. I am really wondering if somehow (no idea how!) you had init files in place that were even older (if I remember correctly we found and fixed some issues within the calculate resize magic scripts in early 2016)…Would you mind if we mark this solved for now?