Imaging Linux systems, UUID for swap not matching on deployed systems. Eh?
-
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!
-
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. -
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. -
[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.partitionsThat’s everything I got on the server image folder.
-
[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 -
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. -
Yes, I upload the image with 1.2.0, but the image type is Multiple Partition Image - Single Disk (Not Resizable).
-
Will sigle disk resizable work with Linux & dual boot systems?
-
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.
-
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! -
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]