package linux-image-4.15.0-24-generic (not installed) failed to install/upgrade: run-parts: /etc/kernel/postrm.d/x-grub-legacy-ec2 exited with return code 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
grub-legacy-ec2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Incomplete
|
Medium
|
Unassigned |
Bug Description
boot time in ecess of 10 minutes
problem started Monday Aug 6 2018
ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: linux-image-
ProcVersionSign
Uname: Linux 4.15.0-29-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
Date: Wed Aug 8 14:40:30 2018
ErrorMessage: run-parts: /etc/kernel/
HibernationDevice: RESUME=
InstallationDate: Installed on 2018-04-17 (113 days ago)
InstallationMedia: Ubuntu-Server 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
IwConfig:
enp3s0 no wireless extensions.
lo no wireless extensions.
MachineType: Gigabyte Technology Co., Ltd. B85M-D3H
ProcFB: 0 VESA VGA
ProcKernelCmdLine: BOOT_IMAGE=
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3ubuntu1
PythonDetails: /usr/bin/python2.7, Python 2.7.15rc1, python-minimal, 2.7.15~rc1-1
RelatedPackageV
dpkg 1.19.0.5ubuntu2
apt 1.6.3
RfKill:
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
SourcePackage: grub-legacy-ec2
Title: package linux-image-
UpgradeStatus: Upgraded to bionic on 2018-04-27 (104 days ago)
dmi.bios.date: 09/19/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F14
dmi.board.
dmi.board.name: B85M-D3H
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: To be filled by O.E.M.
dmi.product.name: B85M-D3H
dmi.product.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
Related branches
- Canonical Server packageset reviewers: Pending requested
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 35 lines (+12/-2)2 files modifieddebian/changelog (+7/-0)
debian/update-grub-legacy-ec2 (+5/-2)
- Christian Ehrhardt (community): Approve
-
Diff: 35 lines (+12/-2)2 files modifieddebian/changelog (+7/-0)
debian/update-grub-legacy-ec2 (+5/-2)
Changed in grub-legacy-ec2 (Ubuntu Bionic): | |
status: | New → Confirmed |
tags: | added: server-next |
Changed in grub-legacy-ec2 (Ubuntu Bionic): | |
assignee: | Christian Ehrhardt (paelzer) → nobody |
tags: | removed: server-next |
Hi, update- grub-legacy- ec2: line 1101: read: read error: 0: Bad file descriptor postrm. d/x-grub- legacy- ec2 exited with return code 1
from your log:
[...]
Searching for GRUB installation directory ... found: /boot/grub
Testing for an existing GRUB menu.lst file ...
Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N) /usr/sbin/
run-parts: /etc/kernel/
The code there is:
echo -n "Would you like $menu_file generated for you? " >&2
echo -n "(y/N) " >&2
read answer <&2
else
fi
That would usually work fine, example:
$ cat test.sh
#!/bin/bash
answer="foo"
read answer <&2
echo ${answer}
$ ./test.sh
asd
asd
But when run withou disconnected stdin/out it will fail like that.
$ nohup ./test.sh
nohup: ignoring input and appending output to 'nohup.out'
$ cat nohup.out
./test.sh: line 3: read: read error: 0: Bad file descriptor
foo
I must admit I never have seen ain input &2 so far.
So I wonder what it does in that case
read answer <&2
@smoser - do you know?
In any case it should probably be more resilent against stdin missing.
As it already has a default value and my test showed that with the error it is kept we might just add "|| true" to make a fail to read non-fatal for the overall execution.
@smoser - opinion on this suggestion?
I subscribed smoser for his experience on this.