Curtin installer failed with 4096 byte logical sector on UEFI boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
High
|
Ryan Harper |
Bug Description
[Ubuntu version]
$ uname -a
Linux maas-17 3.16.0-33-generic #44~14.04.1-Ubuntu SMP Fri Mar 13 10:33:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_
DISTRIB_
DISTRIB_
[MAAS version]
1.7.1+bzr3341-
[Other information]
- Target node is configure as UEFI boot and 4K sector
- In case of changing boot mode to BIOS/legacy, both 12.04 and 14.04 can be provisioned by MAAS via fastpath installer. At BIOS/Legacy mode, sda is recognized as 512 sector.
[Symptom]
When target node is configured as UEFI boot, acquire & start always failed due to sgdisk failed.
The attachment is relevant log (actually this is SoL output) while enlist, commissioning, acquire & start.
The following snip is key message.
(When the node is boot as BIOS/legacy mode, sda is recognized as "584843264 512-byte logical blocks: (299 GB/278 GiB)")
I suspect that curtin installer assumes 512-byte logical sector, but it is 4096-byte logical block and total number of sector is 219594752. While, sgdisk attempts to create root partition with end sector is specified as 1756755968 which exceeds actual size (219594752).
...(snip)...
[ 17.836143] scsi 0:0:0:0: Direct-Access LSI MR9362-8i 4.22 PQ: 0 ANSI: 5
[ 17.843631] scsi 0:2:0:0: Direct-Access LSI MR9362-8i 4.22 PQ: 0 ANSI: 5
[ 17.847214] sd 0:2:0:0: [sda] 219594752 4096-byte logical blocks: (899 GB/837 GiB)
[ 17.847227] sd 0:2:0:0: Attached scsi generic sg0 type 0
[ 17.847250] sd 0:2:0:0: [sda] Write Protect is off
[ 17.847276] sd 0:2:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 17.847357] sd 0:2:0:0: [sda] 219594752 4096-byte logical blocks: (899 GB/837 GiB)
[ 17.847816] sda: unknown partition table
[ 17.847871] sd 0:2:0:0: [sda] 219594752 4096-byte logical blocks: (899 GB/837 GiB)
[ 17.847916] sd 0:2:0:0: [sda] Attached SCSI disk
[ 17.865199] ipmi_si 00:09: Found new BMC (man_id: 0x000077, prod_id: 0x0683, dev_id: 0x88)
...(snip)...
Cloud-init v. 0.7.5 running 'modules:final' at Tue, 17 Mar 2015 01:12:23 +0000. Up 31.47 seconds.
Creating new GPT entries.
Could not create partition 1 from 133120 to 1756755968
Could not change partition 1's type code to 8300!
Error encountered; not saving changes.
failed to sgdisk for uefi to /dev/sda
Could not stat /dev/sda1 --- No such file or directory
The device apparently does not exist; did you specify it correctly?
Unexpected error while running command.
Command: ['mkfs.ext4', '-q', '-L', 'cloudimg-rootfs', '/dev/sda1']
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'block-meta', 'simple']
Exit code: 3
Reason: -
Stdout: "Creating new GPT entries.\nCould not create partition 1 from 133120 to 1756755968\nCould not change partition 1's type code to 8300!\nError encountered; not saving changes.\nfailed to sgdisk for uefi to /dev/sda\nCould not stat /dev/sda1 --- No such file or directory\n\nThe device apparently does not exist; did you specify it correctly?
Stderr: ''
...(snip)...
Related branches
- Server Team CI bot: Approve (continuous-integration)
- Scott Moser: Pending requested
-
Diff: 947 lines (+381/-112)9 files modifiedcurtin/block/__init__.py (+15/-2)
curtin/block/mkfs.py (+17/-1)
curtin/commands/block_meta.py (+28/-10)
examples/tests/uefi_basic.yaml (+1/-1)
tests/unittests/test_block_mkfs.py (+8/-1)
tests/vmtests/__init__.py (+55/-15)
tests/vmtests/test_uefi_basic.py (+53/-0)
tools/launch (+61/-27)
tools/xkvm (+143/-55)
Changed in curtin: | |
assignee: | nobody → Ryan Harper (raharper) |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in curtin: | |
status: | Confirmed → Fix Committed |
tags: | added: curtin-sru |
Just in case, the attachment is SoL output of BIOS/legacy mode installation.