/scripts/local-top/kbdrate.sh: permission denied

Bug #1332907 reported by Patrik Nilsson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
upstart (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I installed Ubuntu 14.04 from scratch with LUKS-cryptsetup, so I always need to type the password before the system can mount the harddisks.

During start, if I press ESC when prompted for the password, I can see the console.

There is an error message "/scripts/local-top/kbdrate.sh: permission denied".

This error message also existed on Ubuntu 12.04.

patrik@ubuntu:~$ lsb_release -rd
Description: Ubuntu 14.04 LTS
Release: 14.04
patrik@ubuntu:~$ apt-cache policy upstart
upstart:
  Installed: 1.12.1-0ubuntu4
  Candidate: 1.12.1-0ubuntu4
  Version table:
 *** 1.12.1-0ubuntu4 0
        500 http://se.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
patrik@ubuntu:~$

Revision history for this message
James Hunt (jamesodhunt) wrote :

This looks like a local customization you have added to the initramfs since file /usr/share/initramfs-tools/scripts/local-top/kbdrate.sh is not / no longer provided by an archive package. Somehow that script seems to have lost its execute bit.

I would check the contents of that file and if you recall writing it, make the file executable and update the initramfs like this:

sudo chmod 755 /usr/share/initramfs-tools/scripts/local-top/kbdrate.sh
sudo update-initramfs

If kbdrate.sh is not something you have written, please attach to this bug so we can take a look at it.

Either way, this problem is not an issue with the upstart package.

Changed in upstart (Ubuntu):
status: New → Incomplete
Changed in upstart (Ubuntu):
status: Incomplete → New
Revision history for this message
Patrik Nilsson (nipatriknilsson) wrote :

It comes from a package I have installed, but unsure which.

patrik@ubuntu:~$ cat /usr/share/initramfs-tools/scripts/local-top/kbdrate.sh
cat: /usr/share/initramfs-tools/scripts/local-top/kbdrate.sh: No such file or directory
patrik@ubuntu:~$ sudo cat /usr/share/initramfs-tools/scripts/local-top/kbdrate.sh
[sudo] password for patrik:
cat: /usr/share/initramfs-tools/scripts/local-top/kbdrate.sh: No such file or directory

patrik@ubuntu:~$ sudo find / -iname kbdrate.sh
/etc/initramfs-tools/hooks/kbdrate.sh
/etc/initramfs-tools/scripts/local-top/kbdrate.sh

patrik@ubuntu:~$ sudo ls -Al /etc/initramfs-tools/scripts/local-top/kbdrate.sh
-rw-r--r-- 1 root root 367 Aug 20 2013 /etc/initramfs-tools/scripts/local-top/kbdrate.sh

patrik@ubuntu:~$ sudo ls -Al /etc/initramfs-tools/hooks/kbdrate.sh
-rw-r--r-- 1 root root 348 Aug 20 2013 /etc/initramfs-tools/hooks/kbdrate.sh

patrik@ubuntu:~$ sudo cat /etc/initramfs-tools/scripts/local-top/kbdrate.sh
#!/bin/sh
# kbdrate boot script

PREREQ=""
prereqs()
{
   echo "$PREREQ"
}

case $1 in
prereqs)
   prereqs
   exit 0
   ;;
esac

# Begin real processing below this line
if [ ! -x "/sbin/kbdrate" ]; then
   panic "/sbin/kbdrate executable not found"
fi

log_begin_msg "Starting kbdrate"
/sbin/kbdrate -r 10.9 -d 500 || panic "/sbin/kbdrate failed"
log_end_msg

exit 0

patrik@ubuntu:~$ sudo cat /etc/initramfs-tools/hooks/kbdrate.sh
#!/bin/sh
# Example kbdrate hook script

PREREQ=""
prereqs()
{
   echo "$PREREQ"
}

case $1 in
prereqs)
   prereqs
   exit 0
   ;;
esac

. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line

if [ ! -x "/sbin/kbdrate" ]; then
   exit 0
fi

force_load frobnicator interval=10
cp /sbin/kbdrate "${DESTDIR}/sbin"
exit 0

patrik@ubuntu:~$ sudo chmod 755 /etc/initramfs-tools/scripts/local-top/kbdrate.sh
patrik@ubuntu:~$ sudo chmod 755 /etc/initramfs-tools/hooks/kbdrate.sh
patrik@ubuntu:~$ sudo update-initramfs
You must specify at least one of -c, -u, or -d.

Usage: /usr/sbin/update-initramfs [OPTION]...

Options:
 -k [version] Specify kernel version or 'all'
 -c Create a new initramfs
 -u Update an existing initramfs
 -d Remove an existing initramfs
 -t Take over a custom initramfs with this one
 -b Set alternate boot directory
 -v Be verbose
 -h This message

patrik@ubuntu:~$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-3.13.0-30-generic
patrik@ubuntu:~$

Revision history for this message
Patrik Nilsson (nipatriknilsson) wrote :

patrik@ubuntu:~$ dpkg -S /etc/initramfs-tools/scripts/local-top/kbdrate.sh
initkeyboardspeed: /etc/initramfs-tools/scripts/local-top/kbdrate.sh
patrik@ubuntu:~$ dpkg -S /etc/initramfs-tools/hooks/kbdrate.sh
initkeyboardspeed: /etc/initramfs-tools/hooks/kbdrate.sh
patrik@ubuntu:~$

Revision history for this message
Patrik Nilsson (nipatriknilsson) wrote :

Yes, you were right. It is from a project of my own. Had completely forgotten that...

Changed in upstart (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.