linuxcnc 2.7.14 swap file problem with Clonezilla

More
7 years 6 months ago #131933 by Clive S
Upon have a good working system with good boot time, I have used Clonezilla to image the drive but when restoring the image back to the drive and then booting into linuxcnc it seems to indicate a problem that is taking about 1min-50secs delay to resolve before continuing with the boot. It does boot successfully and works ok.

With my little knowledge of linux I think it is the swap file that has not been imaged and restored correctly.
looking at the drive with Gparted I had to format the sda5 partition with linux-file system but I am at a loss at how to activate it
to get rid of the error when booting.

Attachment not found

Attachment not found

Please Log in to join the conversation.

  • AnnoyingMutt
  • New Member
  • New Member
More
7 years 6 months ago #131936 by AnnoyingMutt
Replied by AnnoyingMutt on topic linuxcnc 2.7.14 swap file problem with Clonezilla
Why a 40GB swap ?
A swap partition does not have a file system, as such on it, as on it.

Read this regarding size of swap files:
itsfoss.com/swap-size/

The problem is with the swap partition uuid.

This page is how to fix the issue, the last 2 answers are what you want, starting with "From Terminal run" both of the last 2 answers need reading and acting on.

askubuntu.com/questions/625072/deleted-s...w-boot-takes-forever

Basically put in the new UUID of the swap partition in /etc/fstab
Comment out or put in the new UUID of the swap partition in /etc/initramfs-tools/conf.d/resume
Update the initramfs with:
Code:
sudo update-initramfs -u -k all
Reboot and all should be good.

Please Log in to join the conversation.

More
7 years 6 months ago #131941 by Clive S
Thank you for the rapid reply. I inadvertently attached the wrong pic but have now corrected the pic.

Why a 40GB swap ?
A swap partition does not have a file system, as such on it, as on it.

Please see new pic.
Re the partition I did change the sda5 with gparted to add a file system. Was this incorrect? or is it ok.

I will attempt to do as you suggested and report back (might have to be in a couple of days)

Please Log in to join the conversation.

  • AnnoyingMutt
  • New Member
  • New Member
More
7 years 6 months ago #131948 by AnnoyingMutt
Replied by AnnoyingMutt on topic linuxcnc 2.7.14 swap file problem with Clonezilla
No problems I ran into this problem when using clonezilla myself and had to search a bit for an answer.
This is an issue that can happen on Ubuntu & Linux Mint systems.
If that is the correct picture of gparted, sda5 is correct as it is.

if you run (the switch/letter is a lowercase L)
Code:
fdisk -l /dev/sda
and you get a line such as this for sda5 (the example below is a snippet from my desktop)
Code:
/dev/sda5 1024292864 1039550463 15257600 7.3G 82 Linux swap / Solaris

What you are interested in is the last 2 columns where:
Id should be 82
Type should be Linux swap / Solaris

To make sure everything is ok, before modifying the 2 files, you can use
Code:
sudo swapon /dev/sda5

To check the status if you want to confirm that things are ok after using the above or after modifying the files mentioned and rebotooing you can use
Code:
swapon --show

Hopefully that should see you right. Always happy to help when I can.

Please Log in to join the conversation.

More
7 years 6 months ago #131970 by tommylight
You have to edit the "fstab" and replace the uuid of the old hard drive with the new one.
lsblk -O will show you the UUID's for all the drives, so a copy and paste into /etc/fstab with a text editor.

Please Log in to join the conversation.

More
7 years 6 months ago #131972 by Clive S
Ok I now have this. Easer to read in the attached print.txt but the 2-3 boot time is the same. What am I missing?

clive@debian:~$ sudo fdisk -l /dev/sda
Disk /dev/sda: 38.3 GiB, 41110142976 bytes, 80293248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x06ff1652

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 76077055 76075008 36.3G 83 Linux
/dev/sda2 76079102 78155775 2076674 1014M 5 Extended
/dev/sda5 76079104 78155775 2076672 1014M 82 Linux swap / Solaris

clive@debian:~$ sudo update-initramfs -u -k all[/cdoe]
/boot/initrd.img-all[/cdoe] does not exist. Cannot update.

clive@debian:~$ sudo swapon --show
NAME TYPE SIZE USED PRIO
/dev/sda5 partition 1014M 0B -1

clive@debian:~$ sudo swapon /dev/sda5
swapon: /dev/sda5: swapon failed: Device or resource busy

clive@debian:~$ sudo blkid
/dev/sda1: UUID="e166e767-42b5-4c35-9978-db5e042e0b08" TYPE="ext4" PARTUUID="06ff1652-01"
/dev/sda5: UUID="71cf9f99-7de4-418a-805e-67d5ed7435fd" TYPE="swap" PARTUUID="06ff1652-05"

clive@debian:~$ sudo nano /etc/initramfs-tools/conf.d/resume

Result from above is:- RESUME=UUID=71cf9f99-7de4-418a-805e-67d5ed7435fd

clive@debian:~$ sudo swapon /dev/sda5
swapon: /dev/sda5: swapon failed: Device or resource busy



Attachment not found

Please Log in to join the conversation.

More
7 years 6 months ago #131977 by tommylight
Swapoff ?
If it is busy usually that means it is in use.
I think you can also replace the UUID's with the usual /dev/sdxN, but not sure it work on new distros as they insist on giving UUID to drives.

Please Log in to join the conversation.

  • AnnoyingMutt
  • New Member
  • New Member
More
7 years 6 months ago #132003 by AnnoyingMutt
Replied by AnnoyingMutt on topic linuxcnc 2.7.14 swap file problem with Clonezilla
Sorry mate my FU due to typo in my fist post
Code:
sudo update-initramfs -u -k all

Yeah you can still use /dev/sdxN in fstab.

pinched from unix.stackexchange.com/questions/137862/...ual-file-system-name

The advantage of using the UUID is that it is independent from the actual device number the operating system gives your hard disk. Image you add another hard disk to the system, and for some reason the OS decides that your old disk is now sdb instead of sba. Your boot process would be screwed up if fstab would point to the device name. However, in case of the UUIDs, it would be fine.

Please Log in to join the conversation.

More
7 years 6 months ago #132010 by Clive S
Thanks
If I comment out the uuid from /dev/fstab Then the machine boots up as expected.

Then I found a typo in the UUID="71cf9f99-7de4-418a-805e-67d5ed7435fd

Now it works as expected:)


But this is the result from your last post
clive@debian:~/Desktop$ sudo update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-4.9.0-8-rt-686-pae
/usr/sbin/mkinitramfs: 2: /etc/initramfs-tools/conf.d/resume.save: Syntax error: Unterminated quoted string
update-initramfs: failed for /boot/initrd.img-4.9.0-8-rt-686-pae with 2.

Did you find out what was going wrong with Zonezilla?

I use this to make various images of drives and put them on USB sticks with Etcher to make them bootable .

Please Log in to join the conversation.

More
7 years 6 months ago #132019 by tommylight
I use clonezilla very often and it tends to do that whenever there is no need to update grub after restore ( if the source disk was sda and the target is now sda, no need to run update-grub ), otherwise it works perfectly always, even when the target disk is smaller than the source, granted the source has nothing important written beyond the target size.

Please Log in to join the conversation.

Time to create page: 0.101 seconds
Powered by Kunena Forum