Old computer (asus eeeTop all in one touchscreen) mbr fails to restore after imaging task
-
@Tom-Elliott How would I check this?
-
@Arrowhead-IT said:
After the image uploaded, I got the same error again.
You mean the upload screwed the source? We should definitely have a close look if that’s the case. This should never ever happen I find!
Is this resizable (I guess) or non-resizable image type?? Please boot your (fixed) client into debug upload and run
fdisk -l /dev/sda
. That should give us sufficient information I suppose. Then if you are really keen, do an upload (commandfog
) and run the samefdisk -l /dev/sda
command when you get back to the shell after uploading. Please post pictures of both. -
Can we get an update on this?
-
@Arrowhead-IT please…
-
Sorry I didn’t see this till just now.
I only have 2 of these and they are currently in production. I will create some downtime and test it out tomorrow if I can. -
@Sebastian-Roth
Sorry for the delay. I sadly can’t easily upload an image, the thing would probably take an hour or 2 to upload itself and I can’t have it down for that long. So if you need it, it can be done but will require waiting until I can stay a bit late or get in before those that use it.Attached is the debug output…
-
@Arrowhead-IT @Sebastian-Roth I just re-read my original post remembering the problem and looked at the image logs.
I remember now why you would want to have both. I’ll see if I can just take this down for a little bit to get the debug info. -
@Arrowhead-IT What is that 500MB first partition for? It’s not marked as bootable and therefore won’t work as windows boot partition I suppose. Maybe this is playing a roll in the issue you have.
Maybe I can gather enough information if you can give me all the stuff you have in your uploaded image directory:
d1.minimum.partitions
,d1.original.partitions
,d1.original.fstypes
and if you haved1.partitions
- all copy&paste as text here in the forum. Plus uploadd1.mbr
binary file. -
@Sebastian-Roth The first 500 MB partition is the system reserved partition that windows creates during install.
So the image I actually use in practice has this in the directory…
ls /images/BaseImgLegacy32/ d1.fixed_size_partitions d1.original.fstypes d1p2.img d1.mbr d1.original.swapuuids d1.partitions d1.minimum.partitions d1p1.img
The image of the machine itself is still uploading
-
@Sebastian-Roth Here’s the full debug out of the upload with a fdisk -L before and after
[Wed Jun 01 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 [Wed Jun 01 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 * Preparing to send image file to server * Preparing backup location.........................Done * Press [Enter] key to continue * Setting permission on /images/002354b5cf4f........Done * Press [Enter] key to continue * Removing any pre-existing files...................Done * Press [Enter] key to continue * Using Image: eeeTop * Looking for Hard Disk.............................Done * Press [Enter] key to continue * Reading PartitionTables...........................Done * Press [Enter] key to continue * Using Hard Disk: /dev/sda * Now FOG will attempt to upload the image using Partclone * Press [Enter] key to continue * Checking for fixed partitions.....................Done * Press [Enter] key to continue * Getting Windows/Linux Partition Count.............Done * Press [Enter] key to continue * NTFS Partition count of: 2 * Press [Enter] key to continue * EXTFS Partition count of: 0 * Press [Enter] key to continue * Setting up any additional fixed parts * Saving original partition table...................Done * Press [Enter] key to continue * Saving original disk/parts UUIDs * Press [Enter] key to continue * Shrinking Partitions on disk * Press [Enter] key to continue * Clearing part (/dev/sda1).........................Reg file not found * Press [Enter] key to continue * Mounting partition (/dev/sda1)....................Done * Press [Enter] key to continue * Not shrinking (/dev/sda1) fixed size * Press [Enter] key to continue * Clearing part (/dev/sda2).........................Done * Press [Enter] key to continue * Mounting partition (/dev/sda2)....................Done * Press [Enter] key to continue * Removing page file................................Done * Press [Enter] key to continue * Possible resize partition size: 10832399 k * Running resize test /dev/sda2.....................Done * Press [Enter] key to continue * Resize test was successful * Press [Enter] key to continue * Resizing filesystem...............................Done * Press [Enter] key to continue * Resizing partition /dev/sda2......................Done * Clearing ntfs flag................................Done * Press [Enter] key to continue * Saving shrunken partition table * Press [Enter] key to continue * Saving Partition Tables (MBR).....................Done * Press [Enter] key to continue * Processing Hard Disk: /dev/sda * Processing Partition: /dev/sda1 (1) * Press [Enter] key to continue * Using partclone.ntfs * Press [Enter] key to continue Cloned successfully. * Image Uploaded * Press [Enter] key to continue * Processing Partition: /dev/sda2 (2) * Press [Enter] key to continue * Using partclone.ntfs * Press [Enter] key to continue Cloned successfully. * Image Uploaded * Press [Enter] key to continue * Restoring Original Partition Layout...............Done * Press [Enter] key to continue * Not expanding (/dev/sda1) fixed size * Press [Enter] key to continue * Resizing ntfs volume (/dev/sda2)..................Done * Press [Enter] key to continue * Clearing ntfs flag................................Done * Press [Enter] key to continue * Stopping FOG Status Reporter......................Done * Press [Enter] key to continue * Task Complete * Updating Database................................. Done * Press [Enter] key to continue [Wed Jun 01 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 [Wed Jun 01 root@fogclient ~]#
-
@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…