@Sebastian-Roth
CentOS Linux release 7.2.1511 (Core)
3.10.0-327.13.1.el7.x86_64
Posts made by BedCruncher
-
RE: Mount and Extract files from images
-
RE: Mount and Extract files from images
@george1421 @Sebastian-Roth
I was having issues with the newer one trying to get it mounted. I uninstalled it and then tried to install the one you sent me the link to, but when I am trying to find any kind of documentation with relevant references to get it working, I can’t really see anything on how to properly use it.The restore command I ran is
cat /images/W7Px64PreSysprep/d1p2.img | gzip -d -c > /tmp/test_img.img
I then ran
imagemount -d /dev/nbd0 -f /tmp/test_img.img -m /mnt -t ntfs
and got no errors, but when I do a ls on /mnt I see nothing.
I had saw on other places such as the Clonezilla FAQ where I might have to run the command
modprobe nbd
, but I get the errormodprobe: FATAL: Module nbd not found.
-
RE: Mount and Extract files from images
@Sebastian-Roth @george1421
I’ve got the latest version of those tools downloaded and installed. I will attempt to get one of my images mounted in that way and let you both know how I fare. -
RE: Mount and Extract files from images
@george1421
My goal basically was to be able to quickly and easily access images without the need to restore them to get access to the files and add in or copy out simple flat files, not make any major OS changes, or anything other than just dealing with the captured image to either add or remove something.I know in the case of adding something I would have to go in and recompress the image and basically get it back to the proper directory and named the proper way at least according to what FOG expects for its own operation. Long term that isn’t what I was thinking about. It was more to be able to at least open an image in a read only format and be able to get access to the image and all files stored within without needing a host box to restore the image to. Espescially if the host box I have on hand is sufficiently different from the original and it BSOD’s on boot.
-
RE: Mount and Extract files from images
@Sebastian-Roth
I haven’t as far as running the image mount part of it. I will have to try that tomorrow and see. -
RE: Mount and Extract files from images
@Junkhacker
I was thinking more along the lines of if I didn’t have a spare PC handy to do just that. I don’t often need it, but thought since I had run into it, and others might have also that this would be a good thing. -
RE: Mount and Extract files from images
@Sebastian-Roth
Yeah I know they are doing that, but I was wondering if there would be a way to add this to the project as an automatic thing. Where if I say checked a box and selected the image that I wanted to mount in this way, then it would do that and maybe alert me it was done so that I could then pop into the restored image grab what I wanted from it. It could then dismount the image and delete it from the temp directory without having to manually doing it myself.For the Partclone part of it, I tried to download that package directly from the REPO’s that I had added to my server, but got
yum install partclone Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirrors.tds.net * epel: fedora-epel.mirror.lstn.net * extras: mirror.beyondhosting.net * remi: mirrors.mediatemple.net * remi-safe: mirrors.mediatemple.net * rpmforge: mirror.nexcess.net * updates: mirror.beyondhosting.net No package partclone available.
-
RE: Mount and Extract files from images
@Sebastian-Roth
I was able to get it working to at least mount the images. I did run a touch on the d1p2_extracted.img file, but I am not sure if that’s specifically required or not.I had to download partclone using the following command
wget https://forensics.cert.org/centos/cert/7/x86_64/partclone-0.2.88-1.el7.x86_64.rpm
Would it be possible to make this a feature or at least addon in the future images? I mean at least in my case I needed to extract a couple of files that I had misplaced and didn’t want to have to restore to my test machine, grab the files, restore the proper image back and then put them in place. Figured if I could restore the image to a junk location on the server then I would save a lot of extra steps.
-
Mount and Extract files from images
Would like to have a way to mount images on the servers automatically without needing to run the following commands.
apt-get install ntfs-3g partclone pigz cd /images/IMAGENAME/ cat d1p2.img | pigz -d -c | partclone.restore -C -s - -O d1p2_extracted.img mount -t ntfs-3g d1p2_extracted.img /mnt
-
RE: Multicast Issues on Centos 7
@Wayne-Workman
God, I feel like I’m crying wolf all the time now. I disabled the firewalld service and it was hanging there as before. I then ran the commandssystemctl stop FOGMulticastManager killall udp-sender killall udp-sender killall udp-sender mysql -u root fog TRUNCATE TABLE multicastSessionsAssoc; TRUNCATE TABLE multicastSessions; TRUNCATE TABLE tasks; quit; systemctl start FOGMulticastManager
I then tested it, and ran the multicast test. I again ran the commands to do all that above. I rebooted and ran the above commands again to ensure I was working clean and disabled the firewall and tested and so far it seems to be working. Please disregard.
-
RE: Multicast Issues on Centos 7
@Wayne-Workman
I will do that really quick, but it seems like it might be a different issue with firewalld now. I got it to work again if I ransystemctl restart firewalld.service
after a reboot. then it would start the imaging seemingly consistently. For some reason the rules aren’t correctly applying at boot time. -
RE: Multicast Issues on Centos 7
@Wayne-Workman
I am not quite experiencing the same perfect results as @dvchuyen with regards to that firewall rule. I got it to work once, but since then it’s been extremely problematic.firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -m udp -p udp -m pkttype --pkt-type multicast -j ACCEPT
verified it was in there with
ipdtable-save
and ranfirewall-cmd --reload
andsystemctl restart firewalld
. This was to ensure that it was all properly in there and correct. I even rebooted the server to ensure that there wasn’t something in the network service that was gumming it up. I have also deleted the tasks out of FOG and manually triggered it again and still hang. -
RE: Multicast Issues on Centos 7
@Wayne-Workman
Sorry… I reread over what I had posted and it didn’t seem clear. The command above that I had ran was “supposed” to make it permanent, but failed to do so. I had to specify it statically in the NIC interface file. I will also double check the command you posted and test to see if it persists across reboots. -
RE: Multicast Issues on Centos 7
@Wayne-Workman
No, I hadn’t. The command I ran wasfirewall-cmd --permanent --zone=trusted --change-interface=em2
that was specified at this RHEL Firewalld page page. This seems to be this link firewalld.zones.
So I can change mine around and try it, but I wouldn’t have managed to do that particular one myself as I’m by no means a iptables guru. I will try to apply that tomorrow to test it out and let you know.
-
RE: Multicast Issues on Centos 7
OK!!! I think we have something here. So I finally figured out that part of the problem seems to be in the firewall zone as specified in the Centos 7 Setup guide. The issue I think stems from that the
public
zone seems to be blocking the multicast ports. I even explicitly told the firewalld daemon to add the interfaceem2
to thetrusted
zone, but it never did unless I manually specified in the NIC interface fileZONE=trusted
. This seems to be a bug of sorts in that project.I suppose that you could also specify a port range for the firewalld daemon to allow through. In my case the NIC hosting the FOG Server is segregated my other network. So in this case I don’t care to have all ports open on that interface because there is no reason to block that traffic. Keep in mind the interface
em1
is still in thepublic
zone and more locked down and restricted.The result seems to be that I am now able get it to consistently image across at least two devices and so far it has persisted across device and server reboots. So I think we have made a good leap in that regards. I will keep checking back here for a few days to try and update if I run into issues.
Thank you all for persistently fighting with me to get this rolling. I do much appreciate all you have done for me and with me.
@Sebastian-Roth @Wayne-Workman @Tom-Elliott -
RE: Multicast Issues on Centos 7
@Tom-Elliott
Ok, so now we are getting somewhere. I had to run another multicast test really quickly on both of the client computers as I had earlier blown away the partition tables that were restored. That was just to have them properly put back in place. I since have ran the command that you specified on the client and am testing it for both of the stored disk images and they are restoring back. I will let it run it’s course… only take 15 minutes or less for the restore to take place and then try doing the multicast test directly and see if it hangs or not.EDIT:
The manual restore for both partitions that I did worked correctly and both now boot. I will try scheduling a multicast task again and see where we are at. -
RE: Multicast Issues on Centos 7
@Tom-Elliott
I will try the command you posted above and report back what it finds. Thanks. -
RE: Multicast Issues on Centos 7
I followed up as I just posted on the second link and with some tweaking I was able to get somewhere on this, I believe you should be able to understand what I’ve done according to the second link and it’s testing steps.
-
RE: Multicast Issues on Centos 7
To answer your questions, I will handle the second one first. I went through and verified that yes, I do have a firewall on my server (firewalld), and as a way to get around the default zone of public that the em2 interface was assigned, I moved it to the “trusted” zone so that it wouldn’t filter any traffic whatsoever. After that, I then was able to get some more information for muticasting testing for you.
I got to playing around with the the commands and debug mode on an individual client and I noticed a slight issue when comparing the multicast port in the fog settings with the command that is logged when I trigger and try to run the multicast task. The logged part I am referencing is
--portbase 50028
but when I checked that against what I had listed in the fogsettings multicast port56904
. I attempted to change to settings to mirror what is in the log file, but continually fail at the part where I attempt to run the commandcat /images/W7Px64PreSysprep/d1p1.img | /usr/local/sbin/udp-sender --interface em2 --min-receivers 2 --max-wait 600 --portbase 50028 --full-duplex --ttl 32 --nokbd --nopointopoint;cat /images/W7Px64PreSysprep/d1p2.img | /usr/local/sbin/udp-sender --interface em2 --min-receivers 2 --max-wait 600 --portbase 50028 --full-duplex --ttl 32 --nokbd --nopointopoint;
However, if I follow that part near the bottom middle of this Multicasting page, I can get it to work running the same command
gunzip -c /images/W7Px64PreSysprep/d1p1.img | /usr/local/sbin/udp-sender --interface em2 --min-receivers 2 --max-wait 600 --portbase 50028 --full-duplex --ttl 32 --nokbd --nopointopoint;gunzip -c /images/W7Px64PreSysprep/d1p2.img | /usr/local/sbin/udp-sender --interface em2 --min-receivers 2 --max-wait 600 --portbase 50028 --full-duplex --ttl 32 --nokbd --nopointopoint;
Then both clients begin to receive the images as expected.
-
RE: Multicast Issues on Centos 7
@Sebastian-Roth
I did that through my dumb switch and also removed the min-receivers switch and tried it manually. Still didn’t work. I then plugged the server directly into the switch and tried only the simplified command that I got to work before and it also failed.I will try that tomorrow as I won’t have access to the server until then.