• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Bristow 0
    3. Posts
    • Profile
    • Following 0
    • Followers 0
    • Topics 19
    • Posts 75
    • Groups 0

    Posts

    Recent Best Controversial
    • My cloned PCs won't boot into WOL

      Hi !

      I cloned some Linux Mint Una PCs with FOG and everything went fine.
      Now I’d like to use the wake on lan feature to turn them on remotely and do updates on them.

      The problem is that while the PCs start up fine when I switch them on normally, when I switch them on via WOL, they launch the FOG menu and after 3s switch to Boot From Hard Disk. From then on, the PC displays a cursor on an all-black screen. So the PC can’t boot normally.

      Do you have any ideas for solving this problem?

      Thanks for your help!

      posted in Linux Problems bootmenu
      Bristow 0B
      Bristow 0
    • RE: Script for a backup ?

      Thanks a lot @rodluz !

      I took your script and adapted it. I use it directly on my FOG server, which simplifies things a bit. I also changed the mail to a notification sent to my smartphone with ntfy, which I find easy to use.

      I also mounted my NAS share in NFS directly on /mnt/FOGBackups.

      Here’s my script:

      #!/bin/bash
      
      fogServerAddress="172.X.Y.Z"  # Change to actual FOG server address
      
      backupDate=$(date +"%Y%m%d")
      
      backupDir="/mnt/FOGBackups/$backupDate"
      backupDirImages="/mnt/FOGBackups/images"
      
      snapinLocation="/opt/fog/snapins"
      reportLocation="/var/www/fog/lib/reports"
      imageLocation="/images"
      
      failedBackupDB=0
      failedBackupSnapins=0
      failedBackupReports=0
      failedBackupImages=0
      
      [[ ! -d $backupDir ]] && mkdir -p $backupDir/{mysql,snapins,reports,logs} >/dev/null 2>&1
      [[ ! -d $backupDir/mysql || $backupDir/snapins || $backupDir/reports || $backupDir/logs ]] && mkdir -p $backupDir/{mysql,snapins,reports,logs} >/dev/null 2>&1
      
      backupDB() {
          wget --no-check-certificate --post-data="nojson=1" -O $backupDir/mysql/fog.sql "http://$fogServerAddress/fog/management/export.php?type=sql" 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup database!"
              failedBackupDB=1
          else
              echo "Database backed up."
          fi
      }
      
      backupSnapins() {
          cp -r $snapinLocation $backupDir/snapins/ 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup snapins!"
              failedBackupSnapins=1
          else
              echo "Snapins backed up."
          fi
      }
      
      backupReports() {
          cp -r $reportLocation $backupDir/reports/ 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup reports!"
              failedBackupReports=1
          else
              echo "Reports backed up."
          fi
      }
      
      backupImages() {
          rsync -auv $imageLocation $backupDirImages 2>>$backupDir/logs/error.log 1>>$backupDir/logs/progress.log 2>&1
          stat=$?
          if [[ ! $stat -eq 0 ]]; then
              echo "Failed to backup images!"
              failedBackupImages=1
          else
              echo "Images backed up."
          fi
      }
      
      checkForFailures() {
          echo "Running checkForFailures()"
          if [[ $failedBackupDB -eq 1 ]]; then
              message="$message \nFailed to backup database."
          fi
      
          if [[ $failedBackupSnapins -eq 1 ]]; then
              message="$message \nFailed to backup snapins."
          fi
      
          if [[ $failedBackupReports -eq 1 ]]; then
              message="$message \nFailed to backup reports."
          fi
          if [[ $failedBackupImages -eq 1 ]]; then
              message="$message \nFailed to backup images."
          fi
      }
      
      sendNotif() {
      	echo "Running sendNotif()"
          if [[ ! -z $message ]]; then
              {
                  curl -d "FOG Backup Failed\n $message" ntfy.sh/XYZATEHFJICH
      		}
      	else
      		curl -d "FOG Backup Successful!" ntfy.sh/XYZATEHFJICH
      	fi
      }
      
      backupDB
      backupSnapins
      backupReports
      backupImages
      
      checkForFailures
      sendNotif
      
      
      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Script for a backup ?

      @falko Yes, I already clone my VM on a remote space. But if my clone isn’t correct, I lose everything.
      So I’d like a backup script that allows me to automate a database backup and an rsync to a remote share. You can never be too careful.

      posted in General Problems
      Bristow 0B
      Bristow 0
    • Script for a backup ?

      At present, I clone my proxmox virtual machine for my backups and from time to time, I manually run a dump of the database and images.

      I’d like to automate this backup via a cron. Do you have a script that allows me to :

      • database dump
      • rsync images to remote media

      Perhaps you have something better to suggest? Thanks 🙏

      posted in General Problems backup dump rsync
      Bristow 0B
      Bristow 0
    • RE: Deploy a VM on a physical computer?

      Thank you for your answers. I’ll give it a try and let you know!

      posted in Linux Problems
      Bristow 0B
      Bristow 0
    • Deploy a VM on a physical computer?

      To facilitate a one-day deployment of Linux workstations, I was wondering if I could prepare a LinuxMint VM, save it on FOG and then downgrade it to a physical workstation (several different ones).

      Will this work?

      posted in Linux Problems
      Bristow 0B
      Bristow 0
    • RE: Cloned PC takes longer to boot

      @george1421

      $ cat /etc/initramfs-tools/conf.d/resume 
      RESUME=UUID=73c90b5f-8486-4ba7-b9d2-a318c57d89a5
      
      

      but I created this file. It did not exist when the cloning was completed.

      posted in Linux Problems
      Bristow 0B
      Bristow 0
    • RE: Cloned PC takes longer to boot

      @george1421

      Like this :

      /dev/sda6: UUID="73c90b5f-8486-4ba7-b9d2-a318c57d89a5" TYPE="swap" PARTUUID="8f07c4f0-06"
      /dev/sda5: UUID="3b3c3f72-f223-4d79-b6d9-c109a8dce12e" TYPE="ext4" PARTUUID="8f07c4f0-05"
      /dev/loop0: TYPE="squashfs"
      /dev/loop1: TYPE="squashfs"
      /dev/loop2: TYPE="squashfs"
      /dev/sda1: LABEL="Win7" UUID="386EED41073FF16B" TYPE="ntfs" PARTUUID="8f07c4f0-01"
      /dev/sda2: UUID="e19aa8e5-902d-49a8-9794-1933dee19faa" TYPE="ext4" PARTUUID="8f07c4f0-02"
      /dev/sda3: UUID="0DDFEA530EBC86EF" TYPE="ntfs" PARTUUID="8f07c4f0-03"
      
      
      posted in Linux Problems
      Bristow 0B
      Bristow 0
    • RE: Cloned PC takes longer to boot

      @george1421 Thank you for the answer.

      I don’t have enough experience with FOG scripts, so I do it manually.

      I’m still glad I found it and maybe it will be useful for someone later!

      I’ll put the procedure here in case the article disappears:

      Problem:
      Linux booting and taking a long time while looping with the script:
      /scripts/local-block

      Reason:
      Linux boot needs to know the UUID of the Swap file it tries to mount.

      Solution:
      Run the command:

      blkid
      

      and get the UUID of the Swap file.
      Run the command:

      nano /etc/initramfs-tools/conf.d/resume
      

      This file doesn’t exist. It will then be created.
      Add the following line as follows(example of UUID):

      RESUME=UUID=4b7ead25-e0d9-4064-bfa3-167ac46ada3f
      

      Save the file
      Run the following command:

      update-initramfs -u
      

      Reboot.

      posted in Linux Problems
      Bristow 0B
      Bristow 0
    • RE: Cloned PC takes longer to boot

      @george1421 on Mastodon, I was suggested this blog post :
      https://tipstricks.itmatrix.eu/solving-the-running-scripts-local-block-loop-while-booting-in-linux/

      and as a result, I saved 30 s of direct boot time, it worked perfectly.

      Maybe the linux fog client does this job? As it didn’t rename the machines for me (I don’t know why), this could be the cause of the problem?

      Thanks.

      posted in Linux Problems
      Bristow 0B
      Bristow 0
    • RE: Cloned PC takes longer to boot

      Thank you @george1421

      I don’t have an error, it just takes longer to boot on a cloned PC.

      I recapitulate my procedure:

      • I took a snapshot of a Lenovo workstation classroom with 8G of Ram and i5.
      • I deployed this image on an HP workstation with 4G of ram and an i3
      • I captured this image again on Fog
      • I deployed this image on a strictly identical PC near (HP with 4G ram and an i3)

      The latter PC takes 20s longer to boot… and overall, all HP PCs are very slow to boot compared to my old linux distribution which was based on Ubuntu 16.04.

      Thanks

      posted in Linux Problems
      Bristow 0B
      Bristow 0
    • Cloned PC takes longer to boot

      I have a new problem 😅

      • I cloned a workstation to an identical one, and it takes 20s longer to start (fstab checked)…
      • Also, I switched from 16.04 to 20.04 and had to double the boot time on this 4GB computer with an i3.

      Could this be a known problem with Linux partition cloning?

      I’d like to point out that I made my initial image on a computer newer than these two…

      Thanks !

      posted in Linux Problems
      Bristow 0B
      Bristow 0
    • RE: Modify the linux system of a workstation in multi-boot ?

      @sebastian-roth Yeahh, it works ! Thanks again !

      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Modify the linux system of a workstation in multi-boot ?

      @sebastian-roth First of all, I thank you once again for helping me solve my problems.

      I confirm that the code is identical to the GitHub.

      Here are the contents of the image folder

      $ ls -al /images/UbuntuMate2004/
      total 6204524
      drwxrwxrwx  2 root       root       4096 juil.  1  2021 .
      drwxrwxrwx 14 fogproject root       4096 déc.   2 08:36 ..
      -rwxrwxrwx  1 root       root          4 juil.  1  2021 d1.fixed_size_partitions
      -rwxrwxrwx  1 root       root          0 juil.  1  2021 d1.has_grub
      -rwxrwxrwx  1 root       root    1048576 juil.  1  2021 d1.mbr
      -rwxrwxrwx  1 root       root        268 juil.  1  2021 d1.minimum.partitions
      -rwxrwxrwx  1 root       root         16 juil.  1  2021 d1.original.fstypes
      -rwxrwxrwx  1 root       root         39 juil.  1  2021 d1.original.swapuuids
      -rwxrwxrwx  1 root       root    2549735 juil.  1  2021 d1p1.img
      -rwxrwxrwx  1 root       root 6349798077 juil.  1  2021 d1p2.img
      -rwxrwxrwx  1 root       root        268 juil.  1  2021 d1.partitions
      
      

      and the first directory :

      $ ls -al /images/PartLinuxSda5/
      total 6200988
      drwxr-xr-x  2 root       root       4096 déc.   3 11:42 .
      drwxrwxrwx 14 fogproject root       4096 déc.   2 08:36 ..
      -rwxr-xr-x  1 root       root 6349798077 déc.   3 11:42 d1p5.img
      

      I’m not sure, but shouldn’t I put the post I’m capturing on my Ubuntu 2004 Image?
      Currently, I have this :

      f310dea5-b0af-4217-8c8e-dc9516775004-image.png

      Thanks for your help !

      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Modify the linux system of a workstation in multi-boot ?

      I found in apache2 log :

      [Mon Jan 03 10:54:34.631953 2022] [proxy_fcgi:error] [pid 9034] [client 172.17.14.41:40394] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/fog/lib/fog/fogftp.class.php on line 953'
      

      I didn’t find much to do in the forum… Any idea ?

      Fog 1.5.9

      Thanks

      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Modify the linux system of a workstation in multi-boot ?

      It works with set the image type to “Single Disk - no resizable”, but, i can’t captured because updating database failed 😞

      IMG_20211217_133613.resized.jpg

      I don’t know why because my server works fine.

      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Modify the linux system of a workstation in multi-boot ?

      What is surprising is that I want to capture only the sda5 partition since I am using the same image that I have defined according to the message you sent me: https://forums.fogproject.org/post/146165

      I’m going to try to fix it with a live usb, I hope it will be enough!

      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Modify the linux system of a workstation in multi-boot ?

      Thanks @Sebastian-Roth it worked!

      On the other hand, as you expected, I had to boot via the live usb grub-repair, then I ran the 2 commands

      grub-install /dev/sda
      

      then

      update-grub
      

      I also modified the /etc/fstab which was not correct anymore…

      On the other hand, I have another problem that I can’t solve. I made some updates on my system (sda5 partition) and I want to capture it again to deploy it. Why do I get this error, knowing that it is an old linux system on the workstation:

      fog1.jpg

      Why does Fog check this sda2 file system? And how can I get away with my capture?

      Thanks a lot for your help!

      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Modify the linux system of a workstation in multi-boot ?

      Thanks a lot @Sebastian-Roth for your quick response !

      One last question in link before I test…

      The partitioning scheme of my UbuntuMate20.04 image to copy is this one:

      -dev-sda - GParted (au nom du superutilisateur)_037.png

      Files in my image directory :

      Sélection_036.png

      I guess I have to copy the d1p2.img file? What about the other files, I don’t need them?

      Thanks !

      posted in General Problems
      Bristow 0B
      Bristow 0
    • RE: Migrating FOG from a Optiplex 7010 to a dedicated server?

      @tesparza

      I made the same thing with this doc : https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG

      posted in General Problems
      Bristow 0B
      Bristow 0
    • 1 / 1