Gave up waiting for suspend/resume device on restore to hdd

Post your questions about Refracta here.

Gave up waiting for suspend/resume device on restore to hdd

Postby jasond » November 20th, 2017, 3:42 pm

Hey,

Finally found a solution that works with stretch, ty for that :)

On restoring to hdd though on every boot there is a +-30 sec pause and then it "Gave up waiting for suspend/resume device". On searching a bit I see it's most likely related to the swap, either not there or mis-labelled or not loaded early enough etc. I've also tried with and without a swap and also using existing swap instead of swap file to no avail. I'm hoping you'll probably know exactly what the problem is?

Thanks in advance and great script, without it I could not distribute my creation :)
jasond
 
Posts: 6
Joined: November 20th, 2017, 3:25 pm

Re: Gave up waiting for suspend/resume device on restore to

Postby fsmithred » November 21st, 2017, 4:13 pm

I think you're probably right about swap being involved, but the problem is likely in the initramfs. Run:
Code: Select all
lsinitramfs /initrd.img |grep resume
and see if there's a conf/conf.d/resume. It shouldn't be there, because there's an entry for it (for etc/initramfs-tools/conf.d/resume) in the rsync excludes file. But maybe things are different with systemd. I haven't tried to make a snapshot from an encrypted stretch.

Are you making a snapshot from an encrypted system? If so, you need to run a script first to rebuild the intird and replace it in the work directory before the iso gets made. See the readme for the section on CREATING A SNAPSHOT FROM AN ENCRYPTED SYSTEM.
Code: Select all
zless /usr/share/doc/refractasnapshot-base/readme.refractasnapshot.txt.gz
fsmithred
 
Posts: 262
Joined: February 11th, 2011, 4:14 am

Re: Gave up waiting for suspend/resume device on restore to

Postby jasond » November 22nd, 2017, 8:53 am

Hey,

Yes it is there:

bin/resume
conf/conf.d/resume
scripts/local-premount/resume

is what I have.

And no I haven't used any encryption.
jasond
 
Posts: 6
Joined: November 20th, 2017, 3:25 pm

Re: Gave up waiting for suspend/resume device on restore to

Postby fsmithred » November 22nd, 2017, 12:27 pm

If you follow the directions for running nocrypt, it will also remove the resume file from the initrd. Then you'll need to reinstall from the new snapshot. I think that will fix the problem. If you'd rather not reinstall, you could chroot into the installed system and rebuild the initrd there, then just reboot. If you need detailed directions for that, it may be a couple of days before I can get to it. Short version is: run nocrypt.sh in the chroot and replace the initrd with the rebuilt one.

CREATING A SNAPSHOT FROM AN ENCRYPTED SYSTEM

- Run /usr/lib/refractasnapshot/nocrypt.sh as unprivileged user from
your home directory.
- Set edit_boot_menu to "yes" in /etc/refractasnapshot.conf
- Run refractsnapshot or refractasnapshot-gui. When the program pauses
for you to edit the boot menu, copy the initrd.nocrypt.img that you made
to /home/work/iso/live/ and make sure the boot entry points to the right
initrd. (either change the name to initrd.img to match the boot menu
or change the entries in the boot menu to point to initrd.nocrypt.img)
fsmithred
 
Posts: 262
Joined: February 11th, 2011, 4:14 am

Re: Gave up waiting for suspend/resume device on restore to

Postby jasond » November 23rd, 2017, 4:07 am

Is there any way to prevent it from adding the erroneous entry without going to the extent of recompiling?
jasond
 
Posts: 6
Joined: November 20th, 2017, 3:25 pm

Re: Gave up waiting for suspend/resume device on restore to

Postby jasond » November 23rd, 2017, 6:50 pm

After a bit more searching and trial & error found an easier way:

Code: Select all
sudo blkid

to get the ID of the actual swap

Code: Select all
sudo nano /etc/initramfs-tools/conf.d/resume

replace the ID with one specified by above command

Code: Select all
sudo update-initramfs -u

update changes

reboot.

(Possibly related to #50437)
jasond
 
Posts: 6
Joined: November 20th, 2017, 3:25 pm

Re: Gave up waiting for suspend/resume device on restore to

Postby fsmithred » November 24th, 2017, 4:26 pm

Thanks for reporting. I guess excluding /etc/initramfs-tools/conf.d/resume is not enough, since the initramfs does not get rebuilt during the install. I now see where that file comes from - it's created by /usr/share/initramfs-tools/hooks/resume, which looks for a swap partition and puts the UUID into /etc/initramfs-tools/conf.d/resume so it will be included in the initrd.

I was already planning to add nocrypt.sh to the main script and have an option to turn it on or off. I'll have to do it with separate options for removing cryptroot or resume. Right now, it looks for both files and removes them.

Are you sure that's the right bug number? I looked at it (at bugs.debian.org) and it doesn't look related. (and it's from 1999.)
fsmithred
 
Posts: 262
Joined: February 11th, 2011, 4:14 am

Re: Gave up waiting for suspend/resume device on restore to

Postby jasond » November 25th, 2017, 6:01 am

Not sure just included it in case it proved to be useful.

Also getting this occasionally when installing software with Synaptic:

"W: Download is performed unsandboxed as root as file '/root/.synaptic/tmp//tmp_sh' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)"

I presume maybe because selected run user as root (default) in the setup?? (Software installs fine just that msg pops up now and again).
jasond
 
Posts: 6
Joined: November 20th, 2017, 3:25 pm

Re: Gave up waiting for suspend/resume device on restore to

Postby fsmithred » November 25th, 2017, 2:47 pm

Here's an unanswered bug report about that error message:
https://bugs.debian.org/cgi-bin/bugrepo ... bug=864179

And here's a possibly right, possibly wrong solution:
https://askubuntu.com/questions/908800/ ... ssage-mean

I have synaptic installed on one system, and /var/cache/apt/* are all owned by root:root. Do you create a root account when you installed the system, or do you just use sudo?

Oh yeah, did you get asked for a password when you opened synaptic? What happens if you run synaptic-pkexec from a terminal? (non-root). It should ask you for a password. When you start synaptic from the menu, a pkexec window should pop up to ask for the password. When I tried stretch, that didn't work.
fsmithred
 
Posts: 262
Joined: February 11th, 2011, 4:14 am

Re: Gave up waiting for suspend/resume device on restore to

Postby jasond » November 26th, 2017, 4:20 am

It does not ask for password when running synaptic-pkexec, neither does Gparted ask for a password. Whether this is intended or not I don't know but it's actually nice to not have to enter your password when starting up these programs.

When restoring the snapshot I selected add user to root AND the second option and de-selected the option for add root only for shutdown. I did come across that link :) and applied those changes but it had no effect it still pops up. Not a biggie but I can't expect my users to go through all this after installing the distro snapshot.

Unfortunately Systemback (the best & most user-friendly imo) doesn't work with Stretch because of missing casper (you can make snapshots but can't restore them).

This solution however is very close and I look forward to future updates ;) Thanks for all your help so far, appreciate it.
jasond
 
Posts: 6
Joined: November 20th, 2017, 3:25 pm


Return to Refracta

Who is online

Users browsing this forum: No registered users and 1 guest

x