Thanks Ben for the advice and sorry for the latency. The steps you're
suggesting are indeed more straightforward. However, the generated .deb
packages still fail to install properly. I repeated the procedure on
several fresh Debian 8.1 installations, using default settings in the
installer, with the same outcome.

After some digging, I realized that the root failure seems to first occur
inside the running kernel (!!), during the dpkg installation. Below is the
relevant dmesg output during dpkg -i:

[  708.498832] device-mapper: uevent: version 1.0.3
[  708.498991] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30) initialised:
[email protected]
[  709.089486] SGI XFS with ACLs, security attributes, realtime, large
block/inode numbers, no debug enabled
[  709.095776] JFS: nTxBlock = 8192, nTxLock = 65536
[  709.108028] ntfs: driver 2.1.30 [Flags: R/W MODULE].
[  709.119640] QNX4 filesystem 0.2.3 registered.
[  709.190614] raid6: mmxx1     4992 MB/s
[  709.258663] raid6: mmxx2     5880 MB/s
[  709.326691] raid6: sse1x1    4514 MB/s
[  709.394717] raid6: sse1x2    5192 MB/s
[  709.462765] raid6: sse2x1    9530 MB/s
[  709.530787] raid6: sse2x2   11756 MB/s
[  709.530790] raid6: using algorithm sse2x2 (11756 MB/s)
[  709.530791] raid6: using ssse3x1 recovery algorithm
[  709.532132] xor: automatically using best checksumming function:
[  709.570816]    avx       : 20117.000 MB/sec
[  709.583698] Btrfs loaded
[  709.587963] fuse init (API version 7.23)
[  709.633347] EXT4-fs (sda2): unable to read superblock
[  709.634932] EXT4-fs (sda2): unable to read superblock
[  709.636302] EXT4-fs (sda2): unable to read superblock
[  709.638439] XFS (sda2): Invalid superblock magic number
[  709.641380] FAT-fs (sda2): utf8 is not a recommended IO charset for FAT
filesystems, filesystem will be case sensitive!
[  709.641576] FAT-fs (sda2): bogus number of reserved sectors
[  709.641643] FAT-fs (sda2): Can't find a valid FAT filesystem
[  709.642860] FAT-fs (sda2): utf8 is not a recommended IO charset for FAT
filesystems, filesystem will be case sensitive!
[  709.643015] FAT-fs (sda2): bogus number of reserved sectors
[  709.643080] FAT-fs (sda2): Can't find a valid FAT filesystem
[  709.648183] ntfs: (device sda2): read_ntfs_boot_sector(): Primary boot
sector is invalid.
[  709.648322] ntfs: (device sda2): read_ntfs_boot_sector(): Mount option
errors=recover not used. Aborting without trying to recover.
[  709.648423] ntfs: (device sda2): ntfs_fill_super(): Not an NTFS volume.
[  709.650203] MINIX-fs: unable to read superblock
[  709.651596] attempt to access beyond end of device
[  709.651598] sda2: rw=16, want=3, limit=2
[  709.651600] hfsplus: unable to find HFS+ superblock
[  709.653236] qnx4: no qnx4 filesystem (no root dir).
[  709.654695] You didn't specify the type of your ufs filesystem

mount -t ufs -o
ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...

>>>WARNING<<< Wrong ufstype may corrupt your filesystem, default is
ufstype=old
[  709.657400] hfs: can't find a HFS filesystem on dev sda2


The EXT4-fs, FAT-fs, and ntfs errors seems suspicious, since the hardware
doesn't seem faulty. Moreover, I ran this inside different virtual
machines, all failing in the same way.

Let me know if you'd need any extra information.

Stefan



On Fri, Aug 7, 2015 at 7:24 PM, Debian Bug Tracking System <
[email protected]> wrote:

> This is an automatic notification regarding your Bug report
> which was filed against the src:linux package:
>
> #794849: linux: custom linux-image packages fail to install
>
> It has been closed by Ben Hutchings <[email protected]>.
>
> Their explanation is attached below along with your original report.
> If this explanation is unsatisfactory and you have not received a
> better one in a separate message then please contact Ben Hutchings <
> [email protected]> by
> replying to this email.
>
>
> --
> 794849: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794849
> Debian Bug Tracking System
> Contact [email protected] with problems
>
>
> ---------- Forwarded message ----------
> From: Ben Hutchings <[email protected]>
> To: [email protected]
> Cc:
> Date: Fri, 07 Aug 2015 18:21:09 +0100
> Subject: Re: Bug#794849: linux: custom linux-image packages fail to install
> On Fri, 2015-08-07 at 12:30 +0200, Stefan Bucur wrote:
> > Source: linux
> > Severity: serious
> > Justification: fails to build from source (but built successfully in the
> past)
> >
> > Dear Maintainer,
> >
> >    * What led up to the situation?
> >
> > I was trying to create a custom kernel package by following the steps
> > at https://kernel-handbook.alioth.debian.org/ch-common-tasks.html.
> >
> > I changed the ABI version from "4" to "4-s2e". I customized the
> > kernel configuration using "make localmodconfig".  Then, I built the
> > dpkg packages for the 586 subarchitecture (both linux-image and linux
> > -headers).
> [...]
>
> It sounds like you've done things in the wrong order or the wrong
> directory, because this package can be and is being built from source.
>  If there's any bug here, it would be in the kernel-handbook package,
> but I'm pretty sure it's stil correct.
>
> It is generally easier to build custom kernels using this approach:
> <
> http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-building
> >.
>
> Ben.
>
> --
> Ben Hutchings
> Computers are not intelligent.  They only think they are.
>
>
> ---------- Forwarded message ----------
> From: Stefan Bucur <[email protected]>
> To: Debian Bug Tracking System <[email protected]>
> Cc:
> Date: Fri, 07 Aug 2015 12:30:12 +0200
> Subject: linux: custom linux-image packages fail to install
> Source: linux
> Severity: serious
> Justification: fails to build from source (but built successfully in the
> past)
>
> Dear Maintainer,
>
>    * What led up to the situation?
>
> I was trying to create a custom kernel package by following the steps at
> https://kernel-handbook.alioth.debian.org/ch-common-tasks.html.
>
> I changed the ABI version from "4" to "4-s2e". I customized the kernel
> configuration using "make localmodconfig".  Then, I built the dpkg packages
> for the 586 subarchitecture (both linux-image and linux-headers).
>
>
>    * What exactly did you do (or not do) that was effective (or
>      ineffective)?
>
> Subsequently, I also tried using make-kpkg, but the result was the same.
> The resulting dpkg package behaved the same (see below).
>
>
>    * What was the outcome of this action?
>
> Building the dpkg packages went OK. However, when I ran "sudo dpkg -i
> linux-image-3.16.0-4-s2e-586_3.16.7-ckt11-1+deb8u3_i386.deb", I got a
> warning "WARNING: missing /lib/modules/3.16.0-4-s2e-586", followed by
> another set of errors, including some error messages originating from the
> kernel. At the end, the package was left in an inconsistent state:
>
> $ sudo dpkg -i linux-image-3.16.0-4-s2e-586_3.16.7-ckt11-1+deb8u3_i386.deb
> (Reading database ... 31856 files and directories currently installed.)
> Preparing to unpack
> linux-image-3.16.0-4-s2e-586_3.16.7-ckt11-1+deb8u3_i386.deb ...
> Unpacking linux-image-3.16.0-4-s2e-586 (3.16.7-ckt11-1+deb8u3) over
> (3.16.7-ckt11-1+deb8u3) ...
> Setting up linux-image-3.16.0-4-s2e-586 (3.16.7-ckt11-1+deb8u3) ...
> /etc/kernel/postinst.d/initramfs-tools:
> update-initramfs: Generating /boot/initrd.img-3.16.0-4-s2e-586
> WARNING: missing /lib/modules/3.16.0-4-s2e-586
> Ensure all necessary drivers are built into the linux image!
> depmod: ERROR: could not open directory /lib/modules/3.16.0-4-s2e-586: No
> such file or directory
> depmod: FATAL: could not search modules: No such file or directory
> depmod: WARNING: could not open
> /var/tmp/mkinitramfs_cvTqVt/lib/modules/3.16.0-4-s2e-586/modules.order: No
> such file or directory
> depmod: WARNING: could not open
> /var/tmp/mkinitramfs_cvTqVt/lib/modules/3.16.0-4-s2e-586/modules.builtin:
> No such file or directory
> /etc/kernel/postinst.d/zz-update-grub:
> Generating grub configuration file ...
> Found linux image: /boot/vmlinuz-3.16.0-4-s2e-586
> Found initrd image: /boot/initrd.img-3.16.0-4-s2e-586
> Found linux image: /boot/vmlinuz-3.16.0-4-686-pae
> Found initrd image: /boot/initrd.img-3.16.0-4-686-pae
> done
>
> I checked the contents of /lib/modules, and found that there is a
> 3.16.0-4-586 directory, but not an "-s2e" one, in addition to the one
> corresponding to the current kernel:
>
> $ ls -l /lib/modules
> total 8
> drwxr-xr-x 3 root root 4096 Aug  7 12:19 3.16.0-4-586
> drwxr-xr-x 3 root root 4096 Aug  7 11:17 3.16.0-4-686-pae
>
>    * What outcome did you expect instead?
>
> I would have expected the dpkg package to install successfully on the
> machine.
>
>
> -- System Information:
> Debian Release: 8.1
>   APT prefers stable-updates
>   APT policy: (500, 'stable-updates'), (500, 'stable')
> Architecture: i386 (i686)
>
> Kernel: Linux 3.16.0-4-686-pae (SMP w/4 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
>

Reply via email to