@sami-blackkite What are the options you’re using?
This sounds like you’re using non-resizable as the option, but you really want to use resizable.
That said, if the drive is bitlocker encrypted then you’re only option is going to be a raw copy.
@sami-blackkite What are the options you’re using?
This sounds like you’re using non-resizable as the option, but you really want to use resizable.
That said, if the drive is bitlocker encrypted then you’re only option is going to be a raw copy.
@Lukaz No. not for linux at least, and technically not for windows either.
@NX06 This is the code that attempts to get the hard drive:
# Gets the hard drive on the host
# Note: This function makes a best guess
getHardDisk() {
hd=""
disks=""
local devs=$(lsblk -dpno KNAME -I 3,8,9,179,202,253,259 | uniq | sort -V)
if [[ -n $fdrive ]]; then
for spec in $(echo $fdrive | tr "," "\n"); do
for dev in $devs; do
if [[ "x$spec" = "x$dev" ||
"x$spec" = "x$(trim $(blockdev --getsize64 $dev))" ||
"x$spec" = "x$(trim $(lsblk -pdno SERIAL $dev))" ||
"x$spec" = "x$(trim $(lsblk -pdno WWN $dev))" ]]; then
disks=$(echo "$disks $dev")
escaped_dev=$(echo $dev | sed -e 's/[]"\/$&*.^|[]/\\&/g')
devs=$(echo ${devs} | sed "s/[[:space:]]*${escaped_dev}[[:space:]]*/ /")
break
else
p1="$(trim $(blockdev --getsize64 $dev))"
p2="$(trim $(lsblk -pdno SERIAL $dev))"
p3="$(trim $(lsblk -pdno WWN $dev))"
fi
done
done
disks=$( echo "${disks} ${devs}" | xargs)
elif [[ -r ${imagePath}/d1.size && -r ${imagePath}/d2.size ]]; then
disks=$(echo ${devs})
disk_count=$(echo "$disks" | wc -w)
disk_array=()
size_information=$(cat ${imagePath}/*.size 2>/dev/null)
for disk_number in $(seq 1 $disk_count); do
disk=$(echo $disks | cut -d' ' -f $disk_number)
if [[ -n "${size_information}" ]]; then
disk_size=$(blockdev --getsize64 $disk)
image_matching_size=$(echo ${size_information} | grep -o "[0-9][0-9]*:${disk_size}" | head -1 | cut -d':' -f1)
if [[ -n $image_matching_size && $image_matching_size -gt 0 && $image_matching_size -le 32 ]]; then
disk_number=$image_matching_size
else
closest_sized_image=$(echo -e "${size_information}\nx:${disk_size}" | sort -t':' -k2 -n | grep -B1 "${disk_size}" | head -1 | cut -d':' -f1 )
if [[ -n $closest_sized_image && $closest_sized_image -gt 0 && $closest_sized_image -le 32 ]]; then
disk_number=$closest_sized_image
fi
fi
size_information=$(echo ${size_information} | sed "s/[[:space:]]*[0-9][0-9]*:${disk_size}[[:space:]]*//")
fi
echo "${disk_array[@]}" | grep -q "$disk"
if [[ $? -eq 0 ]]; then
handleError "Fatal Error: Disk size information would lead to overwrite the already cloned disk $disk. ($0)"
fi
disk_array[$disk_number]=$disk
done
disks=${disk_array[@]}
else
disks=$(echo ${devs})
fi
for hd in $disks; do
break
done
[[ -z $hd || -z $disks ]] && handleError "Cannot find hard disk(s) (${FUNCNAME[0]})\n Args Passed: $*"
}
I’ll admit that it’s been a long time since this was written, but essentially it attempts to grab the lowest item first.
So hd is preferred if it exists, mmc, nvme, and finally sd
@NX06 This depends significantly on the controller.
That said, the only 100% absolute surest way to prevent overwriting a disk you don’t want written to, at this point, IS to ensure it’s disconnected, or unavailable to the system.
The kernel and the controllers detect things at their own speed and pace.
If a “thing” presents it the “order” is only determined by how fast it puts it up.
So it’s techically possible for a drive to show up as /dev/sda this time, and the very next boot cycle show up as /dev/sdd. The following cycle, sdb, so on and so forth. The system and the presentation speed is the only factor on naming.
In normalized channelized controllers: PATA for example:
the end of the ribbon was the first return, and the midport was second. This was on purpose to also ensure the presented in the same order, hda, hdb on channel 0 where a was the end, and b was the mid way. (hdc/hdd followed the same for channel 1)
SATA controllers were presetned using the channel 0, 1, 2, 3 in that order, on purpose, but USB also presents under SATA. There’s no way to know how quick a usb stick powers up and presents what it is, especially in a consistent manner. Because of this, USB can present - sometimes at least, faster than the onboard SATA controller does.
In the world of SSD drives, though, things get a bit more complicated but follow similarly to USB/SATA in that the speed of the drive and the PCI controller presents the “order” of the drive, but this boot can be this device, and that boot can be another device.
Essentially, as I hope this expresses, if you don’t want it to be overwritten, make sure it’s not accessible during the deploy process. That’s really the only surefire way to handle it.
While we haven’t quite figured out a method due to development and time, this could be prevented assuming we know the device UUID in a consistent manner.
There’s a reason most OS’s are now using UUID’s to reference drives. That said, from FOG’s perspective that wouldn’t be a feasible approach as unless all devices are registered, and you know explicitly which drive is the one you intend, what would be the best approach?
When you know it, that works great, but FOG is intended to automate building of systems with as minimal as touch as one can think of.
@Lukaz For linux based hostnames, theres actual files that store the names. For windows there’s a registry that we can hackishly setup, but for LInux there’s a utility on most modern installs to the effect of hostnamectl
and possibly others.
Because of this, we don’t know where all the different names might be stored and we leave it alone.
Because you captured the blocks of the disk (which includes the files as they were originally written) the device names are set to that of the captured host. It’s not really “changing” the names.
To address this we do have a client utility that should be able to change the hostname for you to the damn of the actual machine based on what it is registered as under the UI, but it would mean installing the FOG Client on the image and using that image as the base for deploying to other machines.
Of note, with the FOG CLient method, until the client performs the hostname change operation, the machine would still have the name as whatever the captured machines name was.
@professorb24 First,
Creating your base image should include installing the software you need:
Fonts
VLC, Firefox, Chrome, Office, etc…
While it is “possible” to do so with snapins, this isn’t really the point of them.
is there a reason you couldn’t install these always needed things and capture the image with that?
Second
Drivers could be installed via Snapins, but probably better using the driver injection that George is talking about.
Third,
Snapins are handled like tasks.
You create the Snapins in the UI
Associate the snapins to the Host
Deploy the specific Snapins or the all associated snapins like you would any other task.
@professorb24 I’m really not understanding what the issue is.
Are you asking “How do you deploy an image?”
if that’s the case, you’re not using the GUI?
I don’t fully understand what you’re asking here.
@Foaming It’s been a minute, but I believe you could attempt a “reset” by setting the schemaVersion.vValue to 1
I only suggest one as this will cause the whole schema to be adjusted for all tables, (where it matches)
But should maintain the data where necessary as well.
I’m only saying this as it “shoudl” fix things, but it won’t necessary be a save all.
It may seem strange, but I’d suggest making a backup of the DB as it sits now.
Do this change.
if it makes things that much “worse” you can revert back to this non functional state. if it works, awesome.
What will happen is when you change the value, it will tell you (from the gui) that an update is needed.
Please follow the steps from there and you should be back in business.
@cicero We didn’t change your password, unsure what those credentials would have been, but if you need to reset the password there are instuctions on how to do so. I would highly recommend resetting once you’re in though as it’s just the base default we define:
username: fog
password: password
https://wiki.fogproject.org/wiki/index.php?title=Reset_WebUI_FOG_password
@Tauric This “parallels” is from a M series mac?
Just a question.
The M1/M2/M3 chipsets are ARM based if I recall correctly.
@george1421 There’s the other possibility the system is running 32 bit os and only attempting to load a 64 bit kernel (or vice versa)
At least that’s the first thing that comes to my mind.
@flight What manager are you talking about?
Fog isn’t a “package” for Yum/Apt like other packages.
You need to locate where the installer resides for your environment and update that information, or download/extract to another location and install from that location.
https://wiki.fogproject.org/wiki/index.php?title=Getting_FOG
@sgilbe Just a thought here, but is there a possible firmware update needed for these devices too?
I don’t think updating the kernels is going to be a bad thing but also ensuring the firmware is updated to the latest for efi stub integration seems the next potentially most logical step?
@DBCountMan From my memory, yes, that is correct.
@DBCountMan It knows nothing of GUIDs as we don’t have a nice way to know what is what and in a consistently generatable method (believe me when I say we went down that Path and while we made some progress it wasn’t exactly feasible and has since more or less fallen off the radar.)
We use the device’s mac address’ to determine which host is attempting.
So if the primary device’s name is ME and the mac is 00:00:00:00:00:00, and you add a device with mac address 00:00:00:00:00:01, it will send both macs and lookup the device. ME will be found and 01 ending will be associated as pending mac to the device.
@DBCountMan Yes,
There’s under FOG Client Settings from the FOG Configuration page, a “Pending” option that can be disabled “globally”, among other items.
See here:
https://wiki.fogproject.org/wiki/index.php/FOG_Client#Features_overview
You’re specifically looking for Host Registration
@alexamore90 it also seems the ip address being attempted is 192.168.122.1 not 192.168.11.1
@alexamore90 the reason I had all three commands is so we can get all the details much more readily.
I understand what you’re requesting, but we don’t put limits to what can “also” be added to the list of packages.
Here’s the List for Ubuntu (Modern versions at least)
apache2 build-essential cpp curl g++ gawk gcc genisoimage git gzip htmldoc isc-dhcp-server isolinux lftp libapache2-mod-fastcgi libapache2-mod-php libc6 libcurl3 liblzma-dev m4 mariadb-client mariadb-server net-tools nfs-kernel-server openssh-server php-fpm php php-cli php-curl php-gd php-json php-ldap php-mbstring php-mysql php-mysqlnd tar tftpd-hpa tftp-hpa vsftpd wget zlib1g
Here’s the list for Redhat based OS (Modern versions beyond Centos/Redhat 7)
curl dhcp-server gcc gcc-c++ genisoimage git gzip httpd lftp m4 make mod_fastcgi mod_ssl mtools mysql mysql-server net-tools nfs-utils openssl php php-cli php-common php-fpm php-gd php-json php-ldap php-mbstring php-mysqlnd php-process syslinux tar tftp-server util-linux-user vsftpd wget xz-devel
But I am also unware that this is even potentially possible since we require internet access at the time of install.
So, if you’re able to take an SD card, load the packages, then reinsert that SD Card to the machine to install, why couldn’t you just run the installer from an “internet established link” then disconnect and isolate it?
I understand what you’re requesting, but there’s various reasons this was not put into place in the past.
@alexamore90 This doesn’t have the other commands I was looking for?