Discussion:
Bug#854822: installation-report: U-boot not correctly installed when partitioning with "Guided - use entire disk"
(too old to reply)
Gunnar Wolf
2017-02-10 18:10:02 UTC
Permalink
Raw Message
Package: installation-reports
Version: 2.62
Severity: important
Tags: d-i



-- Package-specific info:

Boot method: SD card
Image version: https://d-i.debian.org/daily-images/armhf/daily/hd-media/SD-card-images/firmware.MX6_Cubox-i.img.gz https://d-i.debian.org/daily-images/armhf/daily/hd-media/SD-card-images/partition.img.gz and http://gemmei.acc.umu.se/cdimage/daily-builds/daily/arch-latest/armhf/iso-cd/debian-testing-armhf-netinst.iso downloaded 2017-02-08
Date: <Date and time of the install>

Machine: CuBox-i 4 Pro
Partitions: From the installation log:

7: MMC/SD card #2 (mmcblk1) - 15.9 GB SD SL16G,
8: > #1 primary 254.8 MB B f ext2 /boot ,
9: > #2 primary 13.6 GB f ext4 / ,
10: > #5 logical 2.1 GB f swap swap ,
11: SCSI2 (0,0,0) (sda) - 4.2 GB Generic Flash Disk,

Base System Installation Checklist:
[O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it

Initial boot: [O]
Detect network card: [O]
Configure network: [O]
Detect CD: [O]
Load installer modules: [O]
Clock/timezone setup: [O]
User/password setup: [O]
Detect hard drives: [O]
Partition hard drives: [O]
Install base system: [O]
Install tasks: [O]
Install boot loader: [E]
Overall install: [E]

Comments/Problems:

I am installing the system on the same media that was used to boot the
installer from; this is supported according to the installation manual
sect. 5.1.5 (last paragraph).

If I ask the partitioner to use the «Guided - use entire disk» option,
the install process _seems_to_ be successful, but I end up with a
nonbooting system (U-boot seems to be clobbered, as it does not do
anything at powerup); selecting «Guided - use the largest continuous
free space» results in a correctly booting system.

I am attaching two log files, «cubox-clobbered-uboot.log» and
«cubox-boots-correctly.log».

As a very minor issue, even in the second case, after the install
notifies «Requesting system reboot», it just hangs. I disconnected and
reconnected power to get the system to boot — But it booted correctly
after that.

==============================================
Installer lsb-release:
==============================================
DISTRIB_ID=Debian
DISTRIB_DESCRIPTION="Debian GNU/Linux installer"
DISTRIB_RELEASE="9 (stretch) - installer build 20170208-00:09"
X_INSTALLATION_MEDIUM=hd-media

==============================================
Installer hardware-summary:
==============================================
uname -a: Linux debian 4.9.0-1-armmp #1 SMP Debian 4.9.6-3 (2017-01-28) armv7l GNU/Linux
usb-list:
usb-list: Bus 01 Device 01: EHCI Host Controller [1d6b:0002]
usb-list: Level 00 Parent 00 Port 00 Class 09(hub ) Subclass 00 Protocol 01
usb-list: Manufacturer: Linux 4.9.0-1-armmp ehci_hcd
usb-list: Interface 00: Class 09(hub ) Subclass 00 Protocol 00 Driver hub
usb-list:
usb-list: Bus 02 Device 01: EHCI Host Controller [1d6b:0002]
usb-list: Level 00 Parent 00 Port 00 Class 09(hub ) Subclass 00 Protocol 01
usb-list: Manufacturer: Linux 4.9.0-1-armmp ehci_hcd
usb-list: Interface 00: Class 09(hub ) Subclass 00 Protocol 00 Driver hub
usb-list:
usb-list: Bus 02 Device 02: Mass Storage [058f:6387]
usb-list: Level 01 Parent 01 Port 00 Class 00(>ifc ) Subclass 00 Protocol 00
usb-list: Manufacturer: Generic
usb-list: Interface 00: Class 08(mstor) Subclass 06 Protocol 50 Driver usb-storage
lsmod: Module Size Used by
lsmod: dm_mod 102858 0
lsmod: md_mod 120554 0
lsmod: jfs 174436 0
lsmod: btrfs 1143362 0
lsmod: xor 4718 1 btrfs
lsmod: zlib_deflate 20290 1 btrfs
lsmod: raid6_pq 87373 1 btrfs
lsmod: fuse 88991 0
lsmod: brcmfmac 239877 0
lsmod: brcmutil 5789 1 brcmfmac
lsmod: cfg80211 475000 1 brcmfmac
lsmod: rfkill 16819 1 cfg80211
lsmod: nls_utf8 1318 1
lsmod: loop 17534 2
lsmod: isofs 32049 1
lsmod: ext4 549443 2
lsmod: crc16 1274 1 ext4
lsmod: jbd2 93854 1 ext4
lsmod: crc32c_generic 1862 3
lsmod: fscrypto 15747 1 ext4
lsmod: mbcache 5508 3 ext4
lsmod: nls_ascii 3386 1
lsmod: nls_cp437 4922 1
lsmod: vfat 10313 1
lsmod: fat 57141 1 vfat
lsmod: sd_mod 32731 2
lsmod: uas 12934 0
lsmod: usb_storage 45771 2 uas
lsmod: imx_ipuv3_crtc 10746 0
lsmod: ahci_imx 6207 0
lsmod: libahci_platform 6494 1 ahci_imx
lsmod: ci_hdrc_imx 6936 0
lsmod: libahci 23377 2 libahci_platform,ahci_imx
lsmod: ci_hdrc 35216 1 ci_hdrc_imx
lsmod: libata 192873 3 libahci_platform,libahci,ahci_imx
lsmod: ehci_hcd 64996 1 ci_hdrc
lsmod: extcon_core 13223 1 ci_hdrc
lsmod: udc_core 26335 1 ci_hdrc
lsmod: imx_ipu_v3 75709 1 imx_ipuv3_crtc
lsmod: scsi_mod 187972 4 sd_mod,usb_storage,libata,uas
lsmod: sdhci_esdhc_imx 12147 0
lsmod: sdhci_pltfm 3338 1 sdhci_esdhc_imx
lsmod: usbcore 195888 5 usb_storage,ehci_hcd,brcmfmac,uas,ci_hdrc
lsmod: sdhci 39260 2 sdhci_pltfm,sdhci_esdhc_imx
lsmod: usb_common 3659 3 udc_core,usbcore,ci_hdrc
lsmod: usbmisc_imx 6594 1 ci_hdrc_imx
lsmod: phy_mxs_usb 6386 2
lsmod: anatop_regulator 4712 1
lsmod: dw_hdmi_imx 3203 0
lsmod: dw_hdmi 14062 1 dw_hdmi_imx
lsmod: imxdrm 5486 1 imx_ipuv3_crtc
lsmod: drm_kms_helper 117262 3 imx_ipuv3_crtc,dw_hdmi,imxdrm
lsmod: drm 276096 5 imx_ipuv3_crtc,dw_hdmi,dw_hdmi_imx,imxdrm,drm_kms_helper
df: Filesystem 1K-blocks Used Available Use% Mounted on
df: none 206592 76 206516 0% /run
df: devtmpfs 1017956 0 1017956 0% /dev
df: /dev/sda1 4068576 360716 3707860 9% /hd-media
df: /dev/loop0 360712 360712 0 100% /cdrom
df: /dev/mmcblk1p3 12976824 470844 11827068 4% /target
df: /dev/mmcblk1p2 240972 25124 203407 11% /target/boot
df: /dev/mmcblk1p3 12976824 470844 11827068 4% /dev/.static/dev
df: devtmpfs 1017956 0 1017956 0% /target/dev
df: /dev/loop0 360712 360712 0 100% /target/media/cdrom
free: total used free shared buffers
free: Mem: 2065916 958916 1107000 98612 65964
free: -/+ buffers: 892952 1172964
free: Swap: 2016252 0 2016252
/proc/cmdline: console=ttymxc0,115200 DEBIAN_FRONTEND=text priority=critical
/proc/cpuinfo: processor : 0
/proc/cpuinfo: model name : ARMv7 Processor rev 10 (v7l)
/proc/cpuinfo: BogoMIPS : 6.00
/proc/cpuinfo: Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
/proc/cpuinfo: CPU implementer : 0x41
/proc/cpuinfo: CPU architecture: 7
/proc/cpuinfo: CPU variant : 0x2
/proc/cpuinfo: CPU part : 0xc09
/proc/cpuinfo: CPU revision : 10
/proc/cpuinfo:
/proc/cpuinfo: processor : 1
/proc/cpuinfo: model name : ARMv7 Processor rev 10 (v7l)
/proc/cpuinfo: BogoMIPS : 6.00
/proc/cpuinfo: Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
/proc/cpuinfo: CPU implementer : 0x41
/proc/cpuinfo: CPU architecture: 7
/proc/cpuinfo: CPU variant : 0x2
/proc/cpuinfo: CPU part : 0xc09
/proc/cpuinfo: CPU revision : 10
/proc/cpuinfo:
/proc/cpuinfo: processor : 2
/proc/cpuinfo: model name : ARMv7 Processor rev 10 (v7l)
/proc/cpuinfo: BogoMIPS : 6.00
/proc/cpuinfo: Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
/proc/cpuinfo: CPU implementer : 0x41
/proc/cpuinfo: CPU architecture: 7
/proc/cpuinfo: CPU variant : 0x2
/proc/cpuinfo: CPU part : 0xc09
/proc/cpuinfo: CPU revision : 10
/proc/cpuinfo:
/proc/cpuinfo: processor : 3
/proc/cpuinfo: model name : ARMv7 Processor rev 10 (v7l)
/proc/cpuinfo: BogoMIPS : 6.00
/proc/cpuinfo: Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpd32
/proc/cpuinfo: CPU implementer : 0x41
/proc/cpuinfo: CPU architecture: 7
/proc/cpuinfo: CPU variant : 0x2
/proc/cpuinfo: CPU part : 0xc09
/proc/cpuinfo: CPU revision : 10
/proc/cpuinfo:
/proc/cpuinfo: Hardware : Freescale i.MX6 Quad/DualLite (Device Tree)
/proc/cpuinfo: Revision : 0000
/proc/cpuinfo: Serial : 0000000000000000
/proc/device-tree/model: SolidRun Cubox-i Dual/Quad/proc/iomem: 00110000-00111fff : /soc/dma-***@00110000
/proc/iomem: 00900000-0093ffff : 900000.sram
/proc/iomem: 02020000-02023fff : /soc/aips-***@02000000/spba-***@02000000/***@02020000
/proc/iomem: 0209c000-0209ffff : /soc/aips-***@02000000/***@0209c000
/proc/iomem: 020a0000-020a3fff : /soc/aips-***@02000000/***@020a0000
/proc/iomem: 020a4000-020a7fff : /soc/aips-***@02000000/***@020a4000
/proc/iomem: 020a8000-020abfff : /soc/aips-***@02000000/***@020a8000
/proc/iomem: 020ac000-020affff : /soc/aips-***@02000000/***@020ac000
/proc/iomem: 020b0000-020b3fff : /soc/aips-***@02000000/***@020b0000
/proc/iomem: 020b4000-020b7fff : /soc/aips-***@02000000/***@020b4000
/proc/iomem: 020c9000-020c9fff : /soc/aips-***@02000000/***@020c9000
/proc/iomem: 020ca000-020cafff : /soc/aips-***@02000000/***@020ca000
/proc/iomem: 020e0000-020e3fff : /soc/aips-***@02000000/***@020e0000
/proc/iomem: 020ec000-020effff : /soc/aips-***@02000000/***@020ec000
/proc/iomem: 02184000-021841ff : /soc/aips-***@02100000/***@02184000
/proc/iomem: 02184000-021841ff : /soc/aips-***@02100000/***@02184000
/proc/iomem: 02184200-021843ff : /soc/aips-***@02100000/***@02184200
/proc/iomem: 02184200-021843ff : /soc/aips-***@02100000/***@02184200
/proc/iomem: 02184800-021849ff : /soc/aips-***@02100000/***@02184800
/proc/iomem: 02188000-0218bfff : /soc/aips-***@02100000/***@02188000
/proc/iomem: 02190000-02193fff : /soc/aips-***@02100000/***@02190000
/proc/iomem: 02194000-02197fff : /soc/aips-***@02100000/***@02194000
/proc/iomem: 021f0000-021f3fff : /soc/aips-***@02100000/***@021f0000
/proc/iomem: 02200000-02203fff : /soc/***@02200000
/proc/iomem: 10000000-8fffffff : System RAM
/proc/iomem: 10008000-10afffff : Kernel code
/proc/iomem: 10c00000-10d54103 : Kernel data
/proc/interrupts: CPU0 CPU1 CPU2 CPU3
/proc/interrupts: 16: 78447 111212 97855 91134 GIC-0 29 Edge twd
/proc/interrupts: 17: 0 0 0 0 GPC 55 Level i.MX Timer Tick
/proc/interrupts: 25: 830 0 0 0 GPC 26 Level 2020000.serial
/proc/interrupts: 50: 0 0 0 0 GPC 19 Level rtc alarm
/proc/interrupts: 56: 0 0 0 0 GPC 2 Level sdma
/proc/interrupts: 57: 147 0 0 0 GPC 43 Level 2184000.usb
/proc/interrupts: 58: 15942 0 0 0 GPC 40 Level 2184200.usb
/proc/interrupts: 59: 5564 0 0 0 GIC-0 150 Level 2188000.ethernet
/proc/interrupts: 60: 0 0 0 0 GIC-0 151 Level 2188000.ethernet
/proc/interrupts: 61: 1418 0 0 0 GPC 22 Level mmc0
/proc/interrupts: 62: 1662766 0 0 0 GPC 23 Level mmc1
/proc/interrupts: 66: 0 0 0 0 GPC 29 Level 21f0000.serial
/proc/interrupts: 69: 0 0 0 0 GPC 39 Level ahci-imx[2200000.sata]
/proc/interrupts: 77: 0 0 0 0 gpio-mxc 4 Edge 2194000.usdhc cd
/proc/interrupts: 145: 0 0 0 0 gpio-mxc 8 Edge Button 0
/proc/interrupts: 297: 0 0 0 0 IPU 457 Edge (null)
/proc/interrupts: 298: 0 0 0 0 IPU 451 Edge (null)
/proc/interrupts: 299: 0 0 0 0 IPU 457 Edge (null)
/proc/interrupts: 300: 0 0 0 0 IPU 451 Edge (null)
/proc/interrupts: IPI0: 0 0 0 0 CPU wakeup interrupts
/proc/interrupts: IPI1: 0 0 0 0 Timer broadcast interrupts
/proc/interrupts: IPI2: 60279 215955 274690 445238 Rescheduling interrupts
/proc/interrupts: IPI3: 148 120 3945 154 Function call interrupts
/proc/interrupts: IPI4: 0 0 0 0 CPU stop interrupts
/proc/interrupts: IPI5: 1 0 0 0 IRQ work interrupts
/proc/interrupts: IPI6: 0 0 0 0 completion interrupts
/proc/interrupts: Err: 0
/proc/meminfo: MemTotal: 2065916 kB
/proc/meminfo: MemFree: 1107036 kB
/proc/meminfo: MemAvailable: 1855904 kB
/proc/meminfo: Buffers: 65964 kB
/proc/meminfo: Cached: 792644 kB
/proc/meminfo: SwapCached: 0 kB
/proc/meminfo: Active: 277872 kB
/proc/meminfo: Inactive: 598812 kB
/proc/meminfo: Active(anon): 73180 kB
/proc/meminfo: Inactive(anon): 43504 kB
/proc/meminfo: Active(file): 204692 kB
/proc/meminfo: Inactive(file): 555308 kB
/proc/meminfo: Unevictable: 0 kB
/proc/meminfo: Mlocked: 0 kB
/proc/meminfo: HighTotal: 1310720 kB
/proc/meminfo: HighFree: 491592 kB
/proc/meminfo: LowTotal: 755196 kB
/proc/meminfo: LowFree: 615444 kB
/proc/meminfo: SwapTotal: 2016252 kB
/proc/meminfo: SwapFree: 2016252 kB
/proc/meminfo: Dirty: 920 kB
/proc/meminfo: Writeback: 0 kB
/proc/meminfo: AnonPages: 18196 kB
/proc/meminfo: Mapped: 2576 kB
/proc/meminfo: Shmem: 98612 kB
/proc/meminfo: Slab: 61420 kB
/proc/meminfo: SReclaimable: 50880 kB
/proc/meminfo: SUnreclaim: 10540 kB
/proc/meminfo: KernelStack: 1016 kB
/proc/meminfo: PageTables: 488 kB
/proc/meminfo: NFS_Unstable: 0 kB
/proc/meminfo: Bounce: 0 kB
/proc/meminfo: WritebackTmp: 0 kB
/proc/meminfo: CommitLimit: 3049208 kB
/proc/meminfo: Committed_AS: 124712 kB
/proc/meminfo: VmallocTotal: 245760 kB
/proc/meminfo: VmallocUsed: 0 kB
/proc/meminfo: VmallocChunk: 0 kB
/proc/meminfo: CmaTotal: 16384 kB
/proc/meminfo: CmaFree: 15892 kB
/proc/bus/input/devices: I: Bus=0019 Vendor=0001 Product=0001 Version=0100
/proc/bus/input/devices: N: Name="gpio-keys"
/proc/bus/input/devices: P: Phys=gpio-keys/input0
/proc/bus/input/devices: S: Sysfs=/devices/soc0/gpio-keys/input/input0
/proc/bus/input/devices: U: Uniq=
/proc/bus/input/devices: H: Handlers=
/proc/bus/input/devices: B: PROP=0
/proc/bus/input/devices: B: EV=3
/proc/bus/input/devices: B: KEY=1 0 0 0 0 0 0 0 0
/proc/bus/input/devices:

-- System Information:
Debian Release: 9.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-2-amd64 (SMP w/8 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)

installation-report depends on no packages.

Versions of packages installation-report recommends:
ii pciutils 1:3.5.2-1
ii reportbug 7.1.4

installation-report suggests no packages.

-- no debconf information
Gunnar Wolf
2017-02-10 18:20:03 UTC
Permalink
Raw Message
Please note that the provided "hardware-summary" was taken from the
Post by Gunnar Wolf
(...)
==============================================
==============================================
(...)
df: Filesystem 1K-blocks Used Available Use% Mounted on
df: none 206592 76 206516 0% /run
df: devtmpfs 1017956 0 1017956 0% /dev
df: /dev/sda1 4068576 360716 3707860 9% /hd-media
df: /dev/loop0 360712 360712 0 100% /cdrom
df: /dev/mmcblk1p3 12976824 470844 11827068 4% /target
df: /dev/mmcblk1p2 240972 25124 203407 11% /target/boot
df: /dev/mmcblk1p3 12976824 470844 11827068 4% /dev/.static/dev
df: devtmpfs 1017956 0 1017956 0% /target/dev
df: /dev/loop0 360712 360712 0 100% /target/media/cdrom
This could cause a confusion otherwise.

Thanks,
Karsten Merker
2017-02-10 20:40:02 UTC
Permalink
Raw Message
Post by Gunnar Wolf
Package: installation-reports
Version: 2.62
Severity: important
Tags: d-i
[...]
Post by Gunnar Wolf
Boot method: SD card
Image version: https://d-i.debian.org/daily-images/armhf/daily/hd-media/SD-card-images/firmware.MX6_Cubox-i.img.gz https://d-i.debian.org/daily-images/armhf/daily/hd-media/SD-card-images/partition.img.gz and http://gemmei.acc.umu.se/cdimage/daily-builds/daily/arch-latest/armhf/iso-cd/debian-testing-armhf-netinst.iso downloaded 2017-02-08
Date: <Date and time of the install>
Machine: CuBox-i 4 Pro
[...]
Post by Gunnar Wolf
I am installing the system on the same media that was used to boot the
installer from; this is supported according to the installation manual
sect. 5.1.5 (last paragraph).
If I ask the partitioner to use the «Guided - use entire disk» option,
the install process _seems_to_ be successful, but I end up with a
nonbooting system (U-boot seems to be clobbered, as it does not do
anything at powerup); selecting «Guided - use the largest continuous
free space» results in a correctly booting system.
Hello,

when using the "Guided - use entire disk" option, partman by
default clobbers the boot sector and the area after it (where
u-boot is located) to make sure that there are no remains of old
partition tables. We have code in partman-base that disables
this clobbering on systems of which we know that u-boot would be
damaged (which includes systems based on Freescale SoCs such as
your Cubox-i), but this doesn't work in your case as we currently
only disable the clobbering for /dev/mmcblk0 while your SD card
shows up as /dev/mmcblk1. I am not 100% sure about that, but IIRC
with older kernels the SD card in the cubox-i has shown up as
/dev/mmcblk0.

The relevant code in partman-base can be seen here:
https://anonscm.debian.org/cgit/d-i/partman-base.git/tree/parted_server.c#n1377

The easiest solution would be to check for /dev/mmcblk instead of
/dev/mmcblk0. If nobody has objections against this change, I'll modify
partman-base accordingly and upload a new version (CCing the partman-base
uploaders Max Vozeler, Anton Zinoviev, Colin Watson and Christian Perrier
and Kibi as the d-i release manager).
Post by Gunnar Wolf
As a very minor issue, even in the second case, after the install
notifies «Requesting system reboot», it just hangs. I disconnected and
reconnected power to get the system to boot — But it booted correctly
after that.
I have similar experiences with systems based on other ARM-SoCs,
but I have not been able to pinpoint the cause. The hang happens
only when rebooting from the d-i environment; rebooting the
installed system with exactly the same kernel works without
problems.

Regards,
Karsten
--
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten für Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.
Cyril Brulebois
2017-02-10 20:50:01 UTC
Permalink
Raw Message
Hi,
Post by Karsten Merker
when using the "Guided - use entire disk" option, partman by
default clobbers the boot sector and the area after it (where
u-boot is located) to make sure that there are no remains of old
partition tables. We have code in partman-base that disables
this clobbering on systems of which we know that u-boot would be
damaged (which includes systems based on Freescale SoCs such as
your Cubox-i), but this doesn't work in your case as we currently
only disable the clobbering for /dev/mmcblk0 while your SD card
shows up as /dev/mmcblk1. I am not 100% sure about that, but IIRC
with older kernels the SD card in the cubox-i has shown up as
/dev/mmcblk0.
https://anonscm.debian.org/cgit/d-i/partman-base.git/tree/parted_server.c#n1377
The easiest solution would be to check for /dev/mmcblk instead of
/dev/mmcblk0. If nobody has objections against this change, I'll
modify partman-base accordingly and upload a new version (CCing the
partman-base uploaders Max Vozeler, Anton Zinoviev, Colin Watson and
Christian Perrier and Kibi as the d-i release manager).
That seems like a fair approach, feel free to go ahead; thanks.


KiBi.
Karsten Merker
2017-02-11 13:30:01 UTC
Permalink
Raw Message
Control: tags 854822 + patch
Post by Cyril Brulebois
Hi,
Post by Karsten Merker
when using the "Guided - use entire disk" option, partman by
default clobbers the boot sector and the area after it (where
u-boot is located) to make sure that there are no remains of old
partition tables. We have code in partman-base that disables
this clobbering on systems of which we know that u-boot would be
damaged (which includes systems based on Freescale SoCs such as
your Cubox-i), but this doesn't work in your case as we currently
only disable the clobbering for /dev/mmcblk0 while your SD card
shows up as /dev/mmcblk1. I am not 100% sure about that, but IIRC
with older kernels the SD card in the cubox-i has shown up as
/dev/mmcblk0.
https://anonscm.debian.org/cgit/d-i/partman-base.git/tree/parted_server.c#n1377
The easiest solution would be to check for /dev/mmcblk instead of
/dev/mmcblk0. If nobody has objections against this change, I'll
modify partman-base accordingly and upload a new version (CCing the
partman-base uploaders Max Vozeler, Anton Zinoviev, Colin Watson and
Christian Perrier and Kibi as the d-i release manager).
That seems like a fair approach, feel free to go ahead; thanks.
Attached is a patch against partman-base that should fix this
issue. During testing it I have stumbled over two other issues,
though:

a) In my local d-i builds the bootscript doesn't seem to get
properly installed in the netboot SD card images (although it
apears to work properly for other image types and the daily
builds on d-i.debian.org look ok), so for now I have only
tested an installer build that was booted by tftp.

b) Partman sometimes exits with errors during formatting the
/boot partition or in other cases the installed system doesn't
boot due to errors in the /boot filesystem. In bug #854857,
excactly the same issue has just been reported by somebody
else.

I haven't yet committed my patch as I would like to have a
completely successful test installation from SD card with my
patch applied (although the patch appears to be orthogonal to the
other two issues). I would appreciate very much if one of the
people more familiar with the internals of partman and libparted
could take a look at bug #854857.

I'll try to take a look at the two issues descibed above
as well, but I currently lack the time to do so.

Regards,
Karsten
--
Gem. Par. 28 Abs. 4 Bundesdatenschutzgesetz widerspreche ich der Nutzung
sowie der Weitergabe meiner personenbezogenen Daten fÃŒr Zwecke der
Werbung sowie der Markt- oder Meinungsforschung.
Cyril Brulebois
2017-06-25 22:10:01 UTC
Permalink
Raw Message
Hi Rick,
Post by Cyril Brulebois
Post by Karsten Merker
when using the "Guided - use entire disk" option, partman by
default clobbers the boot sector and the area after it (where
u-boot is located) to make sure that there are no remains of old
partition tables. We have code in partman-base that disables
this clobbering on systems of which we know that u-boot would be
damaged (which includes systems based on Freescale SoCs such as
your Cubox-i), but this doesn't work in your case as we currently
only disable the clobbering for /dev/mmcblk0 while your SD card
shows up as /dev/mmcblk1. I am not 100% sure about that, but IIRC
with older kernels the SD card in the cubox-i has shown up as
/dev/mmcblk0.
https://anonscm.debian.org/cgit/d-i/partman-base.git/tree/parted_server.c#n1377
The easiest solution would be to check for /dev/mmcblk instead of
/dev/mmcblk0. If nobody has objections against this change, I'll
modify partman-base accordingly and upload a new version (CCing the
partman-base uploaders Max Vozeler, Anton Zinoviev, Colin Watson and
Christian Perrier and Kibi as the d-i release manager).
That seems like a fair approach, feel free to go ahead; thanks.
KiBi.
It appears that as of Stretch 9.0.0 this fix has not made it into the
distribution. Is there anything I can do to help make it happen?
I think you just did: I gave Karsten a green light then forgot about
this specific bug report
 I'm adding a note for 9.x.

I think I'll commit the proposed patch, and upload to unstable. As usual
(not specific to d-i), this is a prerequisite for getting a package
updated in stable. Once that has happened, a confirmation (that the fix
uploaded to unstable works as expected) would be most welcome.

Thanks!


KiBi.
Rick Thomas
2017-06-25 22:10:02 UTC
Permalink
Raw Message
Post by Cyril Brulebois
Hi,
Post by Karsten Merker
when using the "Guided - use entire disk" option, partman by
default clobbers the boot sector and the area after it (where
u-boot is located) to make sure that there are no remains of old
partition tables. We have code in partman-base that disables
this clobbering on systems of which we know that u-boot would be
damaged (which includes systems based on Freescale SoCs such as
your Cubox-i), but this doesn't work in your case as we currently
only disable the clobbering for /dev/mmcblk0 while your SD card
shows up as /dev/mmcblk1. I am not 100% sure about that, but IIRC
with older kernels the SD card in the cubox-i has shown up as
/dev/mmcblk0.
https://anonscm.debian.org/cgit/d-i/partman-base.git/tree/parted_server.c#n1377
The easiest solution would be to check for /dev/mmcblk instead of
/dev/mmcblk0. If nobody has objections against this change, I'll
modify partman-base accordingly and upload a new version (CCing the
partman-base uploaders Max Vozeler, Anton Zinoviev, Colin Watson and
Christian Perrier and Kibi as the d-i release manager).
That seems like a fair approach, feel free to go ahead; thanks.
KiBi.
It appears that as of Stretch 9.0.0 this fix has not made it into the distribution.
Is there anything I can do to help make it happen?

Rick
Gunnar Wolf
2017-02-10 22:50:02 UTC
Permalink
Raw Message
Thanks for the quick insight into this, Karsten!
(...) but this doesn't work in your case as we currently
only disable the clobbering for /dev/mmcblk0 while your SD card
shows up as /dev/mmcblk1. I am not 100% sure about that, but IIRC
with older kernels the SD card in the cubox-i has shown up as
/dev/mmcblk0.
Hmmm, interesting! Yes, I had not noticed it is finding the card as
mmcblk1. Checking the kernel boot messages, I see the following
messages:

# dmesg |grep mmc
[ 2.509702] sdhci-esdhc-imx 2190000.usdhc: allocated mmc-pwrseq
[ 2.771308] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
[ 2.808099] mmc0: queuing unknown CIS tuple 0x80 (50 bytes)
[ 2.816447] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
[ 2.818516] mmc0: queuing unknown CIS tuple 0x80 (7 bytes)
[ 2.827572] mmc0: queuing unknown CIS tuple 0x80 (4 bytes)
[ 2.868673] mmc0: queuing unknown CIS tuple 0x02 (1 bytes)
[ 2.872362] mmc1: host does not support reading read-only switch, assuming write-enable
[ 2.880622] mmc1: new high speed SDHC card at address aaaa
[ 2.884074] mmcblk1: mmc1:aaaa SL16G 14.8 GiB
[ 2.884808] mmc0: new SDIO card at address 0001
[ 2.889061] mmcblk1: p1 p2 p3 p4 < p5 >
[ 3.609029] EXT4-fs (mmcblk1p3): mounted filesystem with ordered data mode. Opts: (null)
[ 4.715715] EXT4-fs (mmcblk1p3): re-mounted. Opts: errors=remount-ro
[ 6.173094] brcmfmac mmc0:0001:1: firmware: direct-loading firmware brcm/brcmfmac4329-sdio.bin
[ 6.179691] brcmfmac mmc0:0001:1: firmware: direct-loading firmware brcm/brcmfmac4329-sdio.txt
[ 6.181794] Adding 2016252k swap on /dev/mmcblk1p5. Priority:-1 extents:1 across:2016252k SSFS
[ 7.313952] EXT4-fs (mmcblk1p2): mounting ext2 file system using the ext4 subsystem
[ 7.322217] EXT4-fs (mmcblk1p2): mounted filesystem without journal. Opts: (null)

So... Well, mmcblk1 is mounted at mmc0 (don't know what mmc1 is), but
other than that, I see nothing too suspicious.
The easiest solution would be to check for /dev/mmcblk instead of
/dev/mmcblk0. If nobody has objections against this change, I'll modify
partman-base accordingly and upload a new version (CCing the partman-base
uploaders Max Vozeler, Anton Zinoviev, Colin Watson and Christian Perrier
and Kibi as the d-i release manager).
I would say this makes sense. Even if I had multiple MMC units in my
system, installing on a MMC card should not clobber a preexisting
U-boot image; an option would be for d-i to install the matching right
flavor of the pre-boot environment for the current Debian release, but
of course, that would not enter in Stretch (if it was deemed desirable
at all)
Post by Gunnar Wolf
As a very minor issue, even in the second case, after the install
notifies «Requesting system reboot», it just hangs. I disconnected and
reconnected power to get the system to boot — But it booted correctly
after that.
I have similar experiences with systems based on other ARM-SoCs,
but I have not been able to pinpoint the cause. The hang happens
only when rebooting from the d-i environment; rebooting the
installed system with exactly the same kernel works without
problems.
Yes, I have rebooted the machine several times over from other environments.
Rick Thomas
2017-07-17 10:00:02 UTC
Permalink
Raw Message
Great! Is there an installer image somewhere I can test this with on my Cubox-i4x4 ?

Thanks!
Rick
Your message dated Sat, 15 Jul 2017 22:17:18 +0000
and subject line Bug#854822: fixed in partman-base 191+deb9u1
has caused the Debian Bug report #854822,
regarding installation-report: U-boot not correctly installed when partitioning with "Guided - use entire disk"
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
immediately.)
--
854822: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854822
Debian Bug Tracking System
Subject: installation-report: U-boot not correctly installed when partitioning with "Guided - use entire disk"
Date: February 10, 2017 at 9:51:20 AM PST
Subject: Bug#854822: fixed in partman-base 191+deb9u1
Date: July 15, 2017 at 3:17:18 PM PDT
Source: partman-base
Source-Version: 191+deb9u1
We believe that the bug you reported is fixed in the latest version of
partman-base, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Thu, 13 Jul 2017 09:45:14 +0200
Source: partman-base
Binary: partman-base partman-utils
Architecture: source
Version: 191+deb9u1
Distribution: stretch
Urgency: medium
partman-base - Partition the storage devices (partman) (udeb)
partman-utils - Utilities related to partitioning (udeb)
Closes: 854822
partman-base (191+deb9u1) stretch; urgency=medium
.
[ Karsten Merker ]
* For systems that are known to have their boot firmware on an mmcblk
device, protect the firmware area on all mmcblk devices (and not
only on mmcblk0) from being clobbered during guided partitioning
and add missing whitespace to the corresponding log output.
(Closes: #854822)
65d49a15bd0ca3c01778311d6f5a597ae33dcd52 1873 partman-base_191+deb9u1.dsc
ff82be90a39e977780dc3ff5580cd9fbca4752b0 173300 partman-base_191+deb9u1.tar.xz
c78505be41fe4f5e3904c2e33f81782b12875c628448e935627e58d61455b784 1873 partman-base_191+deb9u1.dsc
b03fa6f816e15279e3e87c7e3a7cd475671f65ca1f9f7121ff0ad02940533932 173300 partman-base_191+deb9u1.tar.xz
9ad01e3de42d9034dff7f4705f6e99f0 1873 debian-installer standard partman-base_191+deb9u1.dsc
3c0fb9f3270c7ce28bd79aeaec6297f0 173300 debian-installer standard partman-base_191+deb9u1.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJZZzp2AAoJEP+RSvDCs1Ug18EP/RYg23ppH10l3J0U2zrA2G1I
jLI6A1mWErWDNZW0iz4o5j1FtkuDIXq57ksEvHp5+O/t02WpL/7ad2o05rbK6pEQ
gG3kxanAkEJGAvlrjFjcqeO7BNfYgfPVqpmBZNnyzWG1hDly6R1aqhZtZ+QjKHH0
IFEPaSIqNk5FaFMhZbRjrFhr3pzHHvTZFtue0mqTeL/4rrbi6FFtsd1PW7vVWWup
0yBcAAlsU+JN1lpzXhZBn0LAXXdpawpH1eAvBm7opyjuPf640Xzfw3eu1G1wUv8q
RwkdJk5fh4ZUMhjkl5Mvini04lq96GVhCusO7avRnQ+CfRJppyPBa+oRUlCWSmXS
SpQIuUhDPBWj32ty5jC0WMymOgoK9dGTm51nuUCEMitXC7cdhh6V8YSAPlV8NYFE
l7pm+XUg8vY3bOP6UfH6gi6ZMTBs3B3sahU/aF5R3B6B5foHIQv3ZTU4CWMZRsH1
yQ9c8xDiEkhodTRKhumSEm/IVfWijn5FmtEoPrTqcQLHlOz3Cfljy4T9dE59y8/a
F5f7q3S+Gm90mPrHq3k9TdyhChz5QZ49LEXz917myl7ZqozjKryX1YErwrTV6s9i
EzEkONYfFT3rsCGC0MXXqLWAIja3NyNfOsLLld3ZhgDrV7x4MsZHhkrwrAoqu1AS
dMDs2okWNxHJgYOZipMv
=jdYg
-----END PGP SIGNATURE-----
Cyril Brulebois
2017-07-17 10:50:04 UTC
Permalink
Raw Message
Post by Rick Thomas
Great! Is there an installer image somewhere I can test this with on my Cubox-i4x4 ?
An installer rebuilt to include this change will be uploaded this week,
and published along with the point release (this weekend).


KiBi.

Loading...