chakokuのブログ(rev4)

テック・コミック・ごくまれにチャリ

Ubuntu16.04LTS package upgradeでfatalエラー(linux-generic)

Ubuntuのパッケージ更新を行うと、、fatal-errorが発生

ubuntu:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  gnome-software gnome-software-common python3-software-properties
  software-properties-common software-properties-gtk ubuntu-software
The following packages will be upgraded:
  activity-log-manager activity-log-manager-control-center apache2 apache2-bin
  apache2-data apache2-utils apport apport-gtk bash firefox firefox-locale-en
  ghostscript ghostscript-x gir1.2-javascriptcoregtk-4.0 gir1.2-webkit2-4.0
  git git-man imagemagick imagemagick-6.q16 imagemagick-common iproute2
  isc-dhcp-client isc-dhcp-common libfreetype6 libgs9 libgs9-common libjasper1
  libjavascriptcoregtk-4.0-18 libjbig2dec0 libldap-2.4-2 libmagickcore-6.q16-2
  libmagickcore-6.q16-2-extra libmagickwand-6.q16-2 libminiupnpc10
  libnm-gtk-common libnm-gtk0 libnma-common libnma0 librtmp1 libsmbclient
  libsndfile1 libtiff5 libwbclient0 libwebkit2gtk-4.0-37
  libwebkit2gtk-4.0-37-gtk2 libwhoopsie0 linux-firmware logrotate mosquitto
  network-manager-gnome openssh-client openssh-server openssh-sftp-server
  python-samba python3-apport python3-problem-report samba-common
  samba-common-bin samba-libs smbclient snapd ssh-askpass-gnome sudo
  thunderbird thunderbird-gnome-support thunderbird-locale-en
  thunderbird-locale-en-us unattended-upgrades vino whoopsie zlib1g
71 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 0 B/186 MB of archives.
After this operation, 16.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'linux-generic' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

ubuntu:~$ ls /var/lib/dpkg/info/linux-generic.list
/var/lib/dpkg/info/linux-generic.list

ubuntu:~$ ls -l /var/lib/dpkg/info/linux-generic.list
-rw-r--r-- 1 root root 144 May 27 00:59 /var/lib/dpkg/info/linux-generic.list

ubuntu:~$ cat /var/lib/dpkg/info/linux-generic.list

ubuntu:~$ od -xvc  /var/lib/dpkg/info/linux-generic.list
0000000    0000    0000    0000    0000    0000    0000    0000    0000
         \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000020    0000    0000    0000    0000    0000    0000    0000    0000
         \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040    0000    0000    0000    0000    0000    0000    0000    0000
         \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000060    0000    0000    0000    0000    0000    0000    0000    0000
         \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100    0000    0000    0000    0000    0000    0000    0000    0000
         \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000120    0000    0000    0000    0000    0000    0000    0000    0000
         \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000140    0000    0000    0000    0000    0000    0000    0000    0000
         \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000160    0000    0000    0000    0000    0000    0000    0000    0000
         \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000200    0000    0000    0000    0000    0000    0000    0000    0000
         \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000220

エラー起こしてるファイルは取ってしまえというコメントを見つけて、、削除。再度 upgrade実行

$ sudo rm /var/lib/dpkg/info/linux-generic.list

$ sudo apt-get upgrade
    ....
dpkg: warning: files list file for package 'linux-generic' missing; assuming package has no files currently installed

途中、エラーが出た。 initrd, usbのデバドラ ko?? initrdは起動シーケンスのバイナリとデバドラ群らしいが。。このエラーが今後どのように悪さするのか。。

update-initramfs: Generating /boot/initrd.img-4.4.0-78-generic
modinfo: ERROR: could not get modinfo from 'ums_alauda': Exec format error
modinfo: ERROR: could not get modinfo from 'ums_onetouch': Exec format error
modinfo: ERROR: could not get modinfo from 'ums_karma': Exec format error
modinfo: ERROR: could not get modinfo from 'ums_freecom': Exec format error
modinfo: ERROR: could not get modinfo from 'ums_datafab': Exec format error
modinfo: ERROR: could not get modinfo from 'ums_jumpshot': Exec format error
modinfo: ERROR: could not get modinfo from 'ums_usbat': Exec format error
modinfo: ERROR: could not get modinfo from 'ums_cypress': Invalid argument
modinfo: ERROR: could not get modinfo from 'ums_sddr09': Exec format error
modinfo: ERROR: could not get modinfo from 'ums_isd200': Exec format error
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-alauda.ko: Exec format error
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-cypress.ko: Invalid argument
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-datafab.ko: Exec format error
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-freecom.ko: Exec format error
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-isd200.ko: Exec format error
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-jumpshot.ko: Exec format error
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-karma.ko: Exec format error
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-onetouch.ko: Exec format error
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-sddr09.ko: Exec format error
depmod: ERROR: failed to load symbols from /var/tmp/mkinitramfs_zUARw9/lib/modules/4.4.0-78-generic/kernel/drivers/usb/storage/ums-usbat.ko: Exec format error

■ご参考URL
https://askubuntu.com/questions/909719/dpkg-unrecoverable-fatal-error-aborting-files-list-file-for-package-linux-ge