resume script missing functions

Bug #203429 reported by Justin Dugger on 2008-03-18
18
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: initramfs-tools

In Hardy, I get an error on boot (boot ultimately succeeds):

"/scripts/local-premount/resume/: /scripts/local-premount/resume: 57: log_begin_msg not found"
and
"/scripts/local-premount/resume/: /scripts/local-premount/resume: 57: log_end_msg not found"

These functions are provided one directory up in the file "functions". The resume script should likely include these if it wishes to truly use those log functions.

Liken Otsoa (liken) wrote :

Same error. Hardy uptodate. Boot in text mode.

Ken Fazzone (kfazzone) wrote :

unless i comment out the log_begin_msg line in /scripts/local-premount/resume hardy won't boot.
i get this error for all versions of initramfs-tools since ( and including) 0.85eubuntu26

Alessio Treglia (quadrispro) wrote :

I can confirm this bug, I can't resume system after hibernate...

Nikolaus Filus (nfilus) wrote :

I confirm the bug. In my case suspend/resume or booting is not broken because of this. It just ends graphical boot.

Changed in initramfs-tools:
status: New → Confirmed
Nikolaus Filus (nfilus) wrote :

A simple patch to fix the missing sourcing of functions is attached.

Ceesaxp (ceesaxp) wrote :

Pardon my ignorance, but how can I include that patch into my initrd image?

ski (skibrianski) wrote :

"Me too", on both the bug, and Ceesaxp's question. Hardy BETA here.

Nikolaus Filus (nfilus) wrote :

For a manual fix (until new package is uploaded, assuming attachment is saved in /tmp):
 sudo su -
 cd /usr/lib/hal
 patch -p1 < /tmp/initramfs-scripts-functions.patch
 mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`
 exit
reboot

Ceesaxp (ceesaxp) wrote :

thx, I've gone the longer route:

cd /tmp
mkdir initrd.img
zcat /boot/initrd.img-`uname -r` | cpio -i -d -H newc --no-absolute-filenames

(modify scripts/local-premount/resume)

find . | cpio -o -H newc | gzip > ../initrd.img-`uname -r`

then copy it over to /boot

peabody (ebnasos) wrote :

Ubuntu Hardy Beta

Changed in initramfs-tools:
assignee: nobody → ebnasos
assignee: ebnasos → nobody
Max Schukin (schukin) wrote :

I confirm the bug. No problems with suspend/resume or booting, It just ends graphical boot.
I tried "patch -p1 < /tmp/initramfs-scripts-functions.patch", but got an error "patch: **** strip count l is not a number".

I'm using Ubuntu Hardy Heron Beta.

ski (skibrianski) wrote :

Max, that's a 1 (one), not a lowercase letter L in the arguments to patch: patch -p1.

Good luck.

Max Schukin (schukin) wrote :

Thanks ski. That was a silly mistake of mine.

Blacksheep (juliamohana) wrote :

Same problem here, can't resume but boot succeeds.
I'm too stupid to fix it.

***@ubuntu:~$ sudo su -
root@ubuntu:~# cd /usr/lib/hal
root@ubuntu:/usr/lib/hal# patch -p1 < /home/blackibex/Desktop/initramfs-scripts-functions.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Nur initramfs-tools-0.85eubuntu34.dist/scripts/local-premount/resume initramfs-tools-0.85eubuntu34/scripts/local-premount/resume
|--- initramfs-tools-0.85eubuntu34.dist/scripts/local-premount/resume 2008-03-01 03:31:26.000000000 +0100
|+++ initramfs-tools-0.85eubuntu34/scripts/local-premount/resume 2008-03-23 11:59:47.000000000 +0100
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored

Nikolaus Filus (nfilus) wrote :

I'm sorry, it's my fault - I mixed two different problems. The right path would be:
  /usr/share/initramfs-tools/
NOT /usr/lib/hal

@Blacksheep: this bug shouldn't be responsible for your resume problems, as this here is only a cosmetic fix.
Please file a new bug.

Alessio Treglia (quadrispro) wrote :

Nikolaus, is your patch really working?

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.85eubuntu35

---------------
initramfs-tools (0.85eubuntu35) hardy; urgency=low

  * hook-functions: Do not display find error messages if firmware directories
    cannot be found. (LP: #153743)
  * scripts/functions: Remove unneeded quotes. These were causing multiple
    mountroot fail hook entries to be run as one command.
  * scripts/local: Panic if the root device node cannot be found, or vol_id
    can't identify the volume on the device. This allows mdadm's mountroot fail
    hook to be reliably triggered, as the md device node exists even if the
    array cannot be brought up.
  * init: Add 2>&1 to the run-init line at the end of the file, to fix a long
    outstanding bug where init has no stderr.
  * scripts/local-premount/resume: Source /scripts/functions, thanks to
    Nikolaus Filus for the patch. (LP: #203429)

 -- Luke Yelavich <email address hidden> Thu, 10 Apr 2008 00:48:51 +1000

Changed in initramfs-tools:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers