• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Centos 7.2 UUID for swap wrong

Scheduled Pinned Locked Moved Solved
Linux Problems
6
16
3.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F
    finvader
    last edited by Nov 11, 2016, 2:52 PM

    Server
    • FOG Version: 1.2.0
    • OS: centos 7.2
    Client
    • Service Version:
    • OS: centos 7.2
    Description

    We image our centos 7.2 system which is using UUID in /etc/sftab. Once imaging is complete, the new machines show “No swap found”. I look at /e/tc/fstab and the UUID of the swap partition is the same as the imaged machine and does not match the new system.

    I dont mind using UUID , I just want to know why FOG is not swapping this out.

    We are using a new fog from 2 days ago, 1.2.0

    V/R

    Derek

    1 Reply Last reply Reply Quote 0
    • F
      finvader
      last edited by Nov 11, 2016, 2:59 PM

      The FOG server is actually running CENTOS 6.8
      The Fog machine being imaged is running CENTOS 7.2

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Nov 11, 2016, 3:04 PM

        Most current FOG release candidate version is definitely storing SWAP UUID information from the original machine and does create SWAP on the new machine with he same UUID. There should be no need to fiddle with /etc/fstab. Although I am not absolutely sure about FOG 1.2.0 I think it should be the same way in this version?!

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 1
        • W
          Wayne Workman
          last edited by Nov 11, 2016, 3:18 PM

          Sebastian is correct, and if you want to move to FOG 1.3.0 RC, here are the steps to do so: https://wiki.fogproject.org/wiki/index.php?title=Upgrade_to_trunk

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          1 Reply Last reply Reply Quote 0
          • F
            finvader
            last edited by Nov 11, 2016, 3:24 PM

            Thanks for the quick reply fellas. I love this forum and the software. Updating now and will report back.

            W 1 Reply Last reply Nov 29, 2016, 3:53 AM Reply Quote 0
            • W
              Wayne Workman @finvader
              last edited by Nov 29, 2016, 3:53 AM

              @finvader Any word on this issue?

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • F
                finvader
                last edited by Nov 29, 2016, 3:54 PM

                I did load 1.3.0 RC23 and the swap issue is there a problem. The UUID is carried over from the imaged to the deployed machine. I must change fstab to put in the correct UUID.

                G Q 2 Replies Last reply Nov 29, 2016, 4:36 PM Reply Quote 0
                • G
                  george1421 Moderator @finvader
                  last edited by george1421 Nov 29, 2016, 10:40 AM Nov 29, 2016, 4:36 PM

                  @finvader can you post what your fstab looks like for one of these systems?

                  I don’t have a solution for you, just documenting my thoughts…
                  just for reference the following command will display the output uuid of the swap partition from a running system.

                  # blkid -t TYPE=swap
                  /dev/block/253:1: UUID="7603189e-c4b0-4958-b443-e2aebdc9a4b6" TYPE="swap"
                  

                  The issue doing this with FOS is that I can see this returning the running swap space for the FOS (operating system) not the target disk image.

                  <edit>
                  Ah, ok from FOS one might use

                  # blkid /dev/sda1
                  /dev/sda1: UUID="fc5dae66-d8d4-4481-a7b0-3238ab0dbbb7" TYPE="xfs"
                  

                  FOS would know about the disk and partition at the time of imaging.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  W 1 Reply Last reply Nov 30, 2016, 1:00 AM Reply Quote 1
                  • Q
                    Quazz Moderator @finvader
                    last edited by Nov 29, 2016, 4:53 PM

                    @finvader Just to confirm: Did you upload the image to the server (overwriting the old data) after upgrading to RC23?

                    F 1 Reply Last reply Nov 30, 2016, 9:30 PM Reply Quote 1
                    • W
                      Wayne Workman @george1421
                      last edited by Wayne Workman Nov 29, 2016, 7:02 PM Nov 30, 2016, 1:00 AM

                      @george1421 I guess the UUID of swap could be fixed in postdownloadscripts. I think some people have already worked that out.

                      My question I suppose is why even have FOG store the swap UUID if it’s going to just make a swap partition who’s UUID doesn’t match? Why not generate a UUID for the new swap partition and then stick that into /etc/fstab wouldn’t it be a basic replace command? Especially if you know the old swap UUID. Almost exactly as how fog handles early hostname change for windows? Just mount every single linux partition and look for an /etc/fstab file and do the replace on every file found. It’d only fix the right one if your command uses the already existing UUID in the file.

                      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

                      1 Reply Last reply Reply Quote 0
                      • F
                        finvader @Quazz
                        last edited by Nov 30, 2016, 9:30 PM

                        @Quazz yes

                        1 Reply Last reply Reply Quote 0
                        • M
                          michalm
                          last edited by Nov 23, 2017, 2:45 PM

                          Hi! I have the same problem. I imaged mbr based ssd drive with three partitions:
                          /dev/sda1 (/)
                          /dev/sda2 (swap)
                          /dev/sda3 (/var)

                          Installed OS is Debian 9. Image type is set to “Single disk - resizable”.

                          After deploying, swap partition has different uuid, altough that this in d1.original.swapuuids file is correct.

                          I notice in source code (makeSwapSystem function) that uuid from d1.original.swapuuids file is read, only in case when we have gpt based disk layout:

                            case $hasgpt in
                                  1)
                                      uuid=$(awk "$pat{print \$2}" $file)
                                      [[ -n $uuid ]] && parttype=82
                                      ;;
                                  0)
                                      parttype=$(sfdisk -d $disk 2>/dev/null | awk -F[,=] "/^$escape_part/{print \$6}")
                                      ;;
                              esac
                          

                          Is this correct behaviour?

                          When I move uuid variable assignment outside (above) case statement, swap partition uuid is set correctly.

                          I’m using FOG 1.5.0 RC 10.

                          G W 2 Replies Last reply Nov 23, 2017, 3:02 PM Reply Quote 1
                          • G
                            george1421 Moderator @michalm
                            last edited by Nov 23, 2017, 3:02 PM

                            @Developers I know this is an old thread, but please review @michalm post since this is a current internal topic.

                            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                            1 Reply Last reply Reply Quote 0
                            • W
                              Wayne Workman @michalm
                              last edited by Nov 23, 2017, 5:34 PM

                              @michalm This is great, I think you’ve found and solved a known-bug. Can you submit a pull request with the changes to the FOG working branch on github please? https://github.com/FOGProject/fogproject/tree/working

                              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                              Daily Clean Installation Results:
                              https://fogtesting.fogproject.us/
                              FOG Reporting:
                              https://fog-external-reporting-results.fogproject.us/

                              1 Reply Last reply Reply Quote 0
                              • S
                                Sebastian Roth Moderator
                                last edited by Nov 25, 2017, 9:26 AM

                                This is still open, we are working on it. See here…

                                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                1 Reply Last reply Reply Quote 0
                                • S
                                  Sebastian Roth Moderator
                                  last edited by Nov 27, 2017, 8:18 PM

                                  This is fixed in working branch.

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  1 Reply Last reply Reply Quote 2
                                  • 1 / 1
                                  • First post
                                    Last post

                                  189

                                  Online

                                  12.0k

                                  Users

                                  17.3k

                                  Topics

                                  155.2k

                                  Posts
                                  Copyright © 2012-2024 FOG Project