Hard drive doesn't expand after image
-
This is dependent on any errors that might occur. Please try to provide the error messages and I’m sure you’ll see the whole problem.
-
I’ve moved this into Hardware Compatibility as I believe this is more likely a kernel issue, not a FOG coding issue.
I suspect this, because if it were a coding issue, the problem would be present on everything, not just one “type” of system.
-
I’m having the same issue with an Intel NUC6i5 with an Intel SSD 6000p m.2 PCIE NVME drive.
After writing the image it shows “Resizing ntfs volume (/dev/nvme0n1p2) … Done”, but the partition doesn’t get resized.
Further it show “Mounting Windows File System … failed to mount c:”
and “ntfs-3g : Failed to access Volume ‘/dev/sda2’: No such file or directory”Where did the sda2 come from? Could it be hard coded somewhere?
Running FOG 1.4.0 with the latest Kernel 4.11.0 (updated form 1.2.0 -> 1.3.5 -> 1.40) on Ubuntu 14.04
Imaging an older NUC D54250 with SATA SSD works without problems.
-
@lukeD Are you using a postdownloadscript? I say this because the “Mounting Windows File System…failed to mount c:” doesn’t make sense. I can understand the ntfs-3g issue if /dev/sda2 is not a valid partition (at all) or not a valid ntfs partition (though the no such file or directory seems to point otherwise).
The code base is relatively robust and can guess things pretty well now, so to my knowledge none of the “core” scripts have any hardcoded partitions anymore.
-
@Tom-Elliott said in Hard drive doesn't expand after image:
postdownloadscript
Yeah, thanks for the hit. It is the postdownloadscript/driverinstall.sh I got from here https://wiki.fogproject.org/wiki/index.php/Auto_driver_Install and it tries to mount sda2.
-
@lukeD Do you know how to update the script to be generalized for your environment?
The wiki you linked to is “functional” so to speak, but obviously isn’t generalized enough for your device’s needs.
I’ll see if I can dig up a similar script that is more generic and usable across more devices (if not all) to get things working across all of your devices. If I cannot find it, I’ll likely update the script in the wiki to gain the same effect.
-
@Tom-Elliott I have a script that you rewrote to be a bit more generic that supports nvme drives.
#!/bin/bash . /usr/share/fog/lib/funcs.sh [[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/" case $osid in 5|6|7|9) clear [[ ! -d /ntfs ]] && mkdir -p /ntfs getHardDisk if [[ -z $hd ]]; then handleError "Could not find hdd to use" fi getPartitions $hd for part in $parts; do umount /ntfs >/dev/null 2>&1 fsTypeSetting "$part" case $fstype in ntfs) dots "Testing partition $part" ntfs-3g -o force,rw $part /ntfs ntfsstatus="$?" if [[ ! $ntfsstatus -eq 0 ]]; then echo "Skipped" continue fi if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then echo "Not found" umount /ntfs >/dev/null 2>&1 continue fi echo "Success" break ;; *) echo " * Partition $part not NTFS filesystem" ;; esac done if [[ ! $ntfsstatus -eq 0 ]]; then echo "Failed" debugPause handleError "Failed to mount $part ($0)\n Args: $*" fi echo "Done" debugPause . ${postdownpath}fog.log . ${postdownpath}fog.drivers . ${postdownpath}fog.ad umount /ntfs ;; *) echo "Non-Windows Deployment" debugPause return ;; esac
ref: https://forums.fogproject.org/topic/8889/fog-post-install-script-for-win-driver-injection/6
-
@Tom-Elliott I’m not that familiar with shell scripting, but given enough time I could figure it out. For now I’ll just try changing the sda2 to nvme0n1p2 and run some more test. If you could provide a script that would be great.
I think I figured out why the resize doesn’t work. Fog tries to load the “d1.partitions” file which isn’t available in any of my images. The images were made with fog 1.2.0. Is this new in recent versions?
Sorry, for going of topic as this doesn’t seem to have anything to do with HW compatibility.
-
@lukeD said in Hard drive doesn't expand after image:
Yeah, thanks for the hit. It is the postdownloadscript/driverinstall.sh I got from here https://wiki.fogproject.org/wiki/index.php/Auto_driver_Install and it tries to mount sda2.
@Wayne-Workman That wiki page is really old. We might consider taking it down since it will only cause pain moving forward as there is issues now with nvme drives.
-
@george1421 Done. All the work in that thread you referenced needs to be moved over to the new documentation platform… I need to get going with that myself.
-
@lukeD I do believe they’re used for resizing purposes, yes. It stores the partition information of the original image.
-
@Quazz The files “d1.original.partitions”, “d1.original.fstypes”, “d1.fixed_size_partitions”, “d1.original.swapuuids” are all there. The system tries to load “d1.partitions” which is missing.
So I tried “cp d1.original.partitions d1.partitions” and it works! Even with NVME drives!
This solved it for me, thank everyone!