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

Imaging Linux systems, UUID for swap not matching on deployed systems. Eh?

Scheduled Pinned Locked Moved
Linux Problems
5
31
18.3k
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.
  • T
    Tom Elliott
    last edited by Jul 25, 2014, 3:52 PM

    Did you reupload the image or just try redeploying?

    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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

    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
    • H
      Hongyun
      last edited by Jul 25, 2014, 3:56 PM

      Yes, I reuploaded the image after the upgrade yesterday, and redeployed the computer today.

      1 Reply Last reply Reply Quote 0
      • H
        Hongyun
        last edited by Jul 25, 2014, 4:11 PM

        I think it has something to do with the OS. I tried reupload a working image and then download it again, it still works. But this Mageia 4.1 OS doesn’t work properly. I will try to reinstall it with ext3 partition to see if it works.

        1 Reply Last reply Reply Quote 0
        • I
          ianabc Testers
          last edited by Jul 25, 2014, 6:34 PM

          [quote=“Hongyun, post: 34129, member: 1117”]I think it has something to do with the OS. I tried reupload a working image and then download it again, it still works. But this Mageia 4.1 OS doesn’t work properly. I will try to reinstall it with ext3 partition to see if it works.[/quote]

          UUIDs work for ext3 and ext4 filesystems because the UUID is part of the filesystem itself, it is written into the superblock. Since Fog 1.2.0 fog also seems to allow UUIDs in /etc/fstab for swap partitions. For other filesystems, I’m not sure, I haven’t noticed any problems with xfs, but I haven’t looked too close. Incidentally, there are some other reasons to use ext4 - fog 1.2.0 can resize ext4 filesystems automatically!

          1 Reply Last reply Reply Quote 0
          • H
            Hongyun
            last edited by Jul 25, 2014, 6:41 PM

            [quote=“ianabc, post: 34153, member: 24548”]UUIDs work for ext3 and ext4 filesystems because the UUID is part of the filesystem itself, it is written into the superblock. Since Fog 1.2.0 fog also seems to allow UUIDs in /etc/fstab for swap partitions. For other filesystems, I’m not sure, I haven’t noticed any problems with xfs, but I haven’t looked too close. Incidentally, there are some other reasons to use ext4 - fog 1.2.0 can resize ext4 filesystems automatically![/quote]
            But I think the problem now is that after downloading the FOG image, the swap partition’s UUID got changed, even when I download the image to the same computer where I uploaded the image from. Our instructor prefer the Mageia 4.1, I’m still trying to make this work with FOG, a month left before the term starts, feeling the pressure now:(

            1 Reply Last reply Reply Quote 0
            • I
              ianabc Testers
              last edited by Jul 25, 2014, 6:49 PM

              From the image you showed above, are you sure that swap is the problem? what filesystems are your other partitions on? swap problems shouldn’t stop a system from booting in general - as I might have said above, it’s just swap!

              1 Reply Last reply Reply Quote 0
              • I
                ianabc Testers
                last edited by Jul 25, 2014, 7:14 PM

                Actually it looks like mageia (and some fedora) might have an issue with swap UUIDs. Somebody thought that putting UUIDs into initramfs was a good idea. There are some workarounds, but I don’t have any machines to work with to try them out.

                [LIST]
                [][url]https://forums.mageia.org/en/viewtopic.php?f=7&t=7093[/url]
                [
                ][url]http://forums.fedoraforum.org/showthread.php?t=292088[/url]
                [/LIST]
                Additionally, when an instructor - or anyone for that matter - asks for a specific distribution, it is a good idea to ask them what they are intending to do with it. Unless they are working with the package manager(s) day to day it generally doesn’t matter. Usually they have conflated a specific set of applications and versions with an distribution.

                1 Reply Last reply Reply Quote 0
                • I
                  ianabc Testers
                  last edited by Jul 25, 2014, 7:25 PM

                  Could you take a look in /images/NAMEOFYOURIMAGE and see if you can find a file similar to “d1.original.swapuuids”. Here is one of mine
                  [CODE]
                  $ cat /images/RHL7x64PIMS50GBResizeable/d1.original.swapuuids
                  /dev/sda5 7f6a8920-bab3-444d-8e3f-acca4c76e3cd
                  [/CODE]
                  When I deploy that image to a machine the UUID of the swap partition matches
                  [CODE]
                  $ blkid /dev/sda5 UUID=“7f6a8920-bab3-444d-8e3f-acca4c76e3cd”
                  [/CODE]
                  Obviously, change /dev/sda5 to wherever your swap partition is.

                  1 Reply Last reply Reply Quote 0
                  • H
                    Hongyun
                    last edited by Jul 25, 2014, 8:47 PM

                    [root@foggy henn205mageia4]# ls -la
                    total 1659936
                    drwxrwxrwx. 2 root root 4096 Jul 25 10:29 .
                    drwxrwxrwx. 39 fog fog 4096 Jul 25 11:56 …
                    -rwxrwxrwx. 1 root root 0 Jul 25 10:16 d1.has_grub
                    -rwxrwxrwx. 1 root root 1048576 Jul 25 10:16 d1.mbr
                    -rwxrwxrwx. 1 root root 1698702304 Jul 25 10:29 d1p1.img
                    -rwxrwxrwx. 1 root root 1131 Jul 25 10:29 d1p2.img
                    -rwxrwxrwx. 1 root root 310 Jul 25 10:16 d1.partitions

                    That’s everything I got on the server image folder.

                    1 Reply Last reply Reply Quote 0
                    • H
                      Hongyun
                      last edited by Jul 25, 2014, 8:51 PM

                      [root@foggy henn205mageia4]# cat d1.partitions

                      partition table of /dev/sda

                      unit: sectors

                      /dev/sda1 : start= 2048, size=960572497, Id=83, bootable
                      /dev/sda2 : start=960577506, size= 16190559, Id= 5
                      /dev/sda3 : start= 0, size= 0, Id= 0
                      /dev/sda4 : start= 0, size= 0, Id= 0
                      /dev/sda5 : start=960577536, size= 16190529, Id=82

                      1 Reply Last reply Reply Quote 0
                      • I
                        ianabc Testers
                        last edited by Jul 25, 2014, 10:01 PM

                        hmm…Did you create that image with an older version of fog? On fog 1.2.0 uploading a linux image gives me the following
                        [CODE]
                        drwxrwxrwx. 2 root root 4096 Jul 22 15:03 .
                        drwxrwxrwx. 56 fog root 4096 Jul 22 15:03 …
                        -rwxrwxrwx. 1 root root 4 Jul 22 14:48 d1.fixed_size_partitions
                        -rwxrwxrwx. 1 root root 0 Jul 22 14:49 d1.has_grub
                        -rwxrwxrwx. 1 root root 1048576 Jul 22 14:49 d1.mbr
                        -rwxrwxrwx. 1 root root 310 Jul 22 14:49 d1.minimum.partitions
                        -rwxrwxrwx. 1 root root 80 Jul 22 14:49 d1.original.fstypes
                        -rwxrwxrwx. 1 root root 310 Jul 22 14:48 d1.original.partitions
                        -rwxrwxrwx. 1 root root 47 Jul 22 15:03 d1.original.swapuuids
                        -rwxrwxrwx. 1 root root 84480518 Jul 22 14:49 d1p1.img
                        -rwxrwxrwx. 1 root root 1944498680 Jul 22 14:53 d1p2.img
                        -rwxrwxrwx. 1 root root 6416223022 Jul 22 15:03 d1p3.img

                        -rwxrwxrwx. 1 root root 125 Jul 22 15:03 d1p4.img
                        [/CODE]
                        Did you try [B]uploading[/B] the image with 1.2.0 and then deploying it again. N.B. This is for a “Resizeable” image, it looks like the code for “Multiple partition” images might need to be updated to match.

                        1 Reply Last reply Reply Quote 0
                        • H
                          Hongyun
                          last edited by Jul 25, 2014, 10:16 PM

                          Yes, I upload the image with 1.2.0, but the image type is Multiple Partition Image - Single Disk (Not Resizable).

                          1 Reply Last reply Reply Quote 0
                          • H
                            Hongyun
                            last edited by Jul 25, 2014, 10:18 PM

                            Will sigle disk resizable work with Linux & dual boot systems?

                            1 Reply Last reply Reply Quote 0
                            • I
                              ianabc Testers
                              last edited by Jul 25, 2014, 10:40 PM

                              Since 1.2.0 it supports linux and (as far as I know) dual boot. I haven’t tested the dual boot myself but the linux resizable works for me. The key seems to be to stick to ext4 filesystems.

                              I’ll try to take a look to see if we could retain swap UUIDs for multiple partition image types.

                              1 Reply Last reply Reply Quote 0
                              • H
                                Hongyun
                                last edited by Jul 25, 2014, 11:17 PM

                                Ha! Thank you Ianabc, I switched to use Single Disk (Resizable), and it keeps the swap partition’s UUID, which means it’s working!!!
                                Have a good weekend!

                                1 Reply Last reply Reply Quote 0
                                • K
                                  kAs1m @ianabc
                                  last edited by kAs1m Dec 18, 2017, 2:36 AM Dec 17, 2017, 10:21 PM

                                  So, it’s still even in FOG 1.4.4…
                                  If you want to deploy debian-based(mint in my case) distribs propertly, i made a
                                  workaround, just copy-paste it in terminal(as root), change sda5 to your swap partition name, right before you get ready to made an image(before clicking the capture button). Then made a capture task and reboot the machine.
                                  [CODE]
                                  echo ‘#!/bin/sh’ > /usr/bin/fst.sh
                                  echo ‘OLDUID=$(grep swap /etc/fstab |grep -v “#” |cut -d’ ’ -f1)’ >> /usr/bin/fst.sh
                                  echo ‘NEWUID="UUID=$(ls -la /dev/disk/by-uuid/ |grep sda5|rev|cut -d’ ’ -f3|rev)"’ >> /usr/bin/fst.sh
                                  echo ‘sed -ie “s/$OLDUID/$NEWUID/” /etc/fstab’ >> /usr/bin/fst.sh
                                  echo ‘crontab -u root -l | grep -v ‘/usr/bin/fst.sh’ | crontab -u root -’ >> /usr/bin/fst.sh
                                  echo ‘rm /usr/bin/fst.sh’ >> /usr/bin/fst.sh
                                  chmod +x /usr/bin/fst.sh
                                  (crontab -u root -l ; echo “@reboot /usr/bin/fst.sh > /dev/nul 2>&1”) | crontab -u root -

                                  [/CODE]

                                  https://www.pastiebin.com/5a36ef8163a91

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

                                  234

                                  Online

                                  12.0k

                                  Users

                                  17.3k

                                  Topics

                                  155.2k

                                  Posts
                                  Copyright © 2012-2024 FOG Project