Ubuntu 16.10 installation with root as JFS file system fails

Bug #1630017 reported by bugproxy on 2016-10-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
partman-prep (Ubuntu)
High
Mathieu Trudel-Lapierre

Bug Description

---Problem Description---
Ubuntu 16.10 installation with root as JFS file system fails.

---Boot type---
Net boot

Machine Type = Power8

---Steps---

 From petitboot menu pass kick off installation of Ubuntu 16.10

kernel-->http://ports.ubuntu.com/ubuntu-ports/dists/yakkety/main/installer-ppc64el/current/images/netboot/ubuntu-installer/ppc64el/vmlinux
initrd -->http://ports.ubuntu.com/ubuntu-ports/dists/yakkety/main/installer-ppc64el/current/images/netboot/ubuntu-installer/ppc64el/initrd.gz
Boot arguments-->netcfg/disable_dhcp=true netcfg/confirm_static=true netcfg/choose_interface=98:be:94:05:63:10 netcfg/get_ipaddress=9.47.69.255/20 netcfg/get_gateway=9.47.79.254 netcfg/get_nameservers="9.12.16.2"

Choose JFS as file system for root
  ?????????????????????????? [!!] Partition disks ???????????????????????????
  ? ?
  ? This is an overview of your currently configured partitions and mount ?
  ? points. Select a partition to modify its settings (file system, mount ?
  ? point, etc.), a free space to create partitions, or a device to ?
  ? initialize its partition table. ?
  ? ?
  ? > 1.0 MB FREE SPACE ?
  ? > #1 7.3 MB K ? ?
  ? > #2 959.7 GB K jfs / ? ?
  ? > #3 40.5 GB K swap swap ? ?
  ? > 728.6 kB FREE SPACE ? ?
  ? SCSI5 (0,0,0) (sdk) - 1.0 TB ATA ST1000NX0313 ? ?
  ? > 1.0 TB FREE SPACE ? ?
  ? ? ?
  ? Undo changes to partitions ?
  ? Finish partitioning and write changes to disk ?
  ? ?
  ? <Go Back> ?
  ? ?
  ???????????????????????????????????????????????????????????????????????????

And continue with the installtion.

Installtion fails with below message.

<F1> for help; <Tab> moves; <Space> selects; <Enter> activates buttons

             ?? [!!] Install the GRUB boot loader on a hard disk ??
  ???????????? ? ?????????
  ? ? Unable to install GRUB in /dev/sdj1 ? ?
  ? ? Executing 'grub-install /dev/sdj1' failed. ? ?
  ? ? ? ?
  ? Running "? This is a fatal error. ? ?
  ? ? ? ?
  ???????????? <Go Back> <Continue> ? ?????????
             ? ?
             ??????????????????????????????????????????????????????

<Tab> moves; <Space> selects; <Enter> activates buttons

     ????????? [!!] Install the GRUB boot loader on a hard disk ??????????
     ? ?
     ? Installation step failed ?
     ? An installation step failed. You can try to run the failing item ?
     ? again from the menu, or skip it and choose something else. The ?
     ? failing step is: Install the GRUB boot loader on a hard disk ?
     ? ?
     ? <Continue> ?
     ? ?
     ?????????????????????????????????????????????????????????????????????

<Tab> moves; <Space> selects; <Enter> activates buttons

I see in the following that /dev/sdj1 is reportedly being "wiped"

Oct 3 09:46:30 grub-installer: info: Identified partition label for /dev/sdj2: gpt
Oct 3 09:46:30 grub-installer: info: Wiping PReP partition /dev/sdj1

and then later you see

Oct 3 09:46:33 in-target: grub-install: error: unknown filesystem.^M
Oct 3 09:46:33 in-target: Failed: grub-install --target=powerpc-ieee1275 /dev/sdj1^M
Oct 3 09:46:33 in-target: WARNING: Bootloader is not properly installed, system may not be bootable^M

and then towards the end

Oct 3 09:46:33 os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sdj1
Oct 3 09:46:34 kernel: [ 2476.418986] hfsplus: unable to load nls for utf8
Oct 3 09:46:34 os-prober: debug: running /usr/lib/os-probes/mounted/40lsb on mounted /dev/sdj2
Oct 3 09:46:34 os-prober: debug: running /usr/lib/os-probes/mounted/90linux-distro on mounted /dev/sdj2
Oct 3 09:46:34 os-prober: debug: /dev/sdj3: is active swap
Oct 3 09:46:34 grub-installer: info: Installing grub on '/dev/sdj1'
Oct 3 09:46:34 grub-installer: info: grub-install does not support --no-floppy
Oct 3 09:46:34 grub-installer: info: Running chroot /target grub-install --force "/dev/sdj1"
Oct 3 09:46:34 grub-installer: Installing for powerpc-ieee1275 platform.
Oct 3 09:46:34 grub-installer: grub-install: error: unknown filesystem.
Oct 3 09:46:34 grub-installer: error: Running 'grub-install --force "/dev/sdj1"' failed.

It isn't clear to me that JFS has much to do with this but will mirror this to Ubuntu installer folks. It is also odd that /dev/sdj1 doesn't show any filesystem on the "Partition disks" panel as the partman log shows ext2.

bugproxy (bugproxy) wrote : logs
  • logs Edit (75.6 KiB, application/x-gzip)

Default Comment by Bridge

tags: added: architecture-ppc64le bugnameltc-147167 severity-high targetmilestone-inin1610
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
affects: ubuntu → debian-installer (Ubuntu)
Steve Langasek (vorlon) on 2016-10-03
Changed in debian-installer (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → Mathieu Trudel-Lapierre (cyphermox)

Is this an installation done with manual partitioning? It seems to me like this is an unsupported partitioning scheme.

For ppc64el, GRUB typically expects a small (8Mb) partition at the start of the disk to use as a location to install PReP.

In this kind of cases, we should still have partman-prep warn the user about the lack of a PReP partition, so there is a bug in this case if that doesn't happen, regardless of whether this is manual or automatic partitioning.

FWIW, I know that booting from petitboot is a slightly different subarchitecture for d-i, but I haven't been able to find the special code paths for it at a quick glance in partman; I will dig more once we have the information requested above.

affects: debian-installer (Ubuntu) → partman-prep (Ubuntu)
Changed in partman-prep (Ubuntu):
status: New → Incomplete
importance: Undecided → High
Download full text (3.4 KiB)

------- Comment From <email address hidden> 2016-10-04 01:15 EDT-------
(In reply to comment #6)
> Is this an installation done with manual partitioning? It seems to me like
> this is an unsupported partitioning scheme.
>
> For ppc64el, GRUB typically expects a small (8Mb) partition at the start of
> the disk to use as a location to install PReP.
>
> In this kind of cases, we should still have partman-prep warn the user about
> the lack of a PReP partition, so there is a bug in this case if that doesn't
> happen, regardless of whether this is manual or automatic partitioning.
>
> FWIW, I know that booting from petitboot is a slightly different
> subarchitecture for d-i, but I haven't been able to find the special code
> paths for it at a quick glance in partman; I will dig more once we have the
> information requested above.

Hi,

Yes,this installation is done manually creating 3 partitions as below.

1.8mb-->PowerPC PReP boot partition
2.50 gb-->Swap
3.600 gb-->root as JFS file system

?????????????????????????? [!!] Partition disks ???????????????????????????
? ?
? This is an overview of your currently configured partitions and mount ?
? points. Select a partition to modify its settings (file system, mount ?
? point, etc.), a free space to create partitions, or a device to ?
? initialize its partition table. ?
? ?
? Configure encrypted volumes ?
? Configure iSCSI volumes ? ?
? ? ?
? SCSI4 (0,0,0) (sdj) - 1.0 TB ATA ST1000NX0313 ? ?
? > 1.0 MB FREE SPACE ? ?
? > #1 7.3 MB K ? ============>> PowerPC PReP boot partition
? > #2 50.0 GB f swap swap ?
? > #3 600.0 GB f jfs / ? ?
? > 350.2 GB FREE SPACE ? ?
? SCSI5 (0,0,0) (sdk) - 1.0 TB ATA ST1000NX0313 ?
? ?
? <Go Back> ?
? ?
???????????????????????????????????????????????????????????????????????????

<F1> for help; <Tab> moves; <Space> selects; <Enter> activates buttons

?? [!!] Install the GRUB boot loader on a hard disk ??
???????????? ? ?????????
? ? Unable to install GRUB in /dev/sdj1 ? ?
? ? Executing 'grub-install /dev/sdj1' failed. ? ?
? ? ? ?
? Running "? This is a fatal error. ? ?
? ? ...

Read more...

Oh, indeed. I hadn't seen it initially.

sdj1 shouldn't have any kind of particular filesystem, so I'm not sure what grub-install is trying to check there (I will look in the code now), or if it's directly because the root is formatted in jfs.

In the meantime, when this fails could you try running the following command in a shell? You can access the shell from the debian-installer main menu after the failure.

chroot /target grub-install -v --force "/dev/sdj1"

This doesn't seem to be reproducible with anything but jfs. Given that the errors following the partitioning appear almost random (but here, most often than not I get a failure installing linux-firmware, rather than making it to grub-install... and running the same command again after succeeds); I think we're hitting a kernel issue or some problem with the jfs filesystem driver.

The errors appear to always be some kind of I/O error. I've been doing this on a virtual machine, so I know the disk I've created is good (and the underlying host doesn't have errors).

Oct 10 14:51:44 in-target: Preparing to unpack .../05-linux-firmware_1.161_all.deb ...
Oct 10 14:51:44 in-target: ^M
Oct 10 14:51:44 in-target: Unpacking linux-firmware (1.161) ...
Oct 10 14:51:44 in-target: ^M
Oct 10 14:51:48 in-target: dpkg: unrecoverable fatal error, aborting:
Oct 10 14:51:48 in-target: ^M
Oct 10 14:51:48 in-target: unable to flush updated status of 'linux-firmware': Input/output error
Oct 10 14:51:48 in-target: ^M
Oct 10 14:51:48 in-target: E
Oct 10 14:51:48 in-target: :
Oct 10 14:51:48 in-target: Sub-process /usr/bin/dpkg returned an error code (2)
Oct 10 14:51:48 in-target:
Oct 10 14:51:49 in-target: E
Oct 10 14:51:49 in-target: :
Oct 10 14:51:49 in-target: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.
Oct 10 14:51:49 in-target:
Oct 10 14:51:49 base-installer: error: exiting on error base-installer/kernel/failed-install

bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-10-11 10:49 EDT-------
I gave a try on a baremetal installation with the daily image available on October 9th.
I didn't get the grub error on installation, but after the reboot, petitboot doesn't show the JFS partition (/dev/sda2) to boot from.

I tried another run and just before the reboot, I installed grub manually from a shell. Here a snippet of the error message:

...
grub-install: info: Partition 0 starts from 2048.
grub-install: info: Partition 1 starts from 16384.
grub-install: info: grub-mkimage --directory '/usr/lib/grub/powerpc-ieee1275' --prefix '(,gpt2)/boot/grub' --output '/boot/grub/powerpc-ieee1275/core.elf' --format 'powerpc-ieee1275' --compression 'auto' 'jfs' 'part_gpt'
.
grub-install: info: the total module size is 0x2a14.
grub-install: info: reading /usr/lib/grub/powerpc-ieee1275/kernel.img.
grub-install: info: locating the section .text at 0x0.
grub-install: info: locating the section .rodata at 0xcd0c.
grub-install: info: locating the section .eh_frame at 0xf23c.
grub-install: info: locating the section .data at 0xf2e0.
grub-install: info: locating the section .module_license at 0xffa0.
grub-install: info: locating the section .sdata at 0xffc0.
grub-install: info: locating the section .sbss at 0xffd0.
grub-install: info: locating the section .bss at 0x10038.
grub-install: info: reading /usr/lib/grub/powerpc-ieee1275/jfs.mod.
grub-install: info: reading /usr/lib/grub/powerpc-ieee1275/part_gpt.mod.
grub-install: info: kernel_img=0x10005288b90, kernel_size=0xffce.
grub-install: info: the core size is 0x129e2.
grub-install: info: writing 0x12b24 bytes.
grub-install: info: copying `/boot/grub/powerpc-ieee1275/core.elf' -> `/boot/grub/grub'.
grub-install: info: drive = 0.
grub-install: info: the size of hostdisk//dev/sda is 3907029168.
grub-install: error: the chosen partition is not a PReP partition.

BTW, if I set the partition as ext4 or btrfs instead of JFS, it works. I mean, grub isn't installed (it couldn't as there is no Prep partition / there is no grub msg in dmesg) but petitboot shows the partition and I can boot from it.

bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2016-10-14 04:37 EDT-------
(In reply to comment #8)
> Oh, indeed. I hadn't seen it initially.
>
> sdj1 shouldn't have any kind of particular filesystem, so I'm not sure what
> grub-install is trying to check there (I will look in the code now), or if
> it's directly because the root is formatted in jfs.
>
> In the meantime, when this fails could you try running the following command
> in a shell? You can access the shell from the debian-installer main menu
> after the failure.
>
> chroot /target grub-install -v --force "/dev/sdj1"

Attached the output of chroot /target grub-install -v --force "/dev/sdj1" .

Thanks,
Pooja

bugproxy (bugproxy) wrote : logs
  • logs Edit (68.0 KiB, application/octet-stream)

------- Comment (attachment only) From <email address hidden> 2016-10-14 04:36 EDT-------

How much memory does the system you're installing to have? Is is a partition with less than 2 GB of memory?

I'm doing my testing on virtual machines, and easily get I/o errors on them if they use the default memory allocation on startup. If I specify to use 2GB of memory, then I have no errors and the installation completes normally.

Changed in partman-prep (Ubuntu):
status: Incomplete → New
status: New → Incomplete
Changed in partman-prep (Ubuntu):
milestone: none → ubuntu-17.01

------- Comment From <email address hidden> 2017-01-20 06:07 EDT-------
(In reply to comment #14)
> How much memory does the system you're installing to have? Is is a partition
> with less than 2 GB of memory?
>
> I'm doing my testing on virtual machines, and easily get I/o errors on them
> if they use the default memory allocation on startup. If I specify to use
> 2GB of memory, then I have no errors and the installation completes normally.

Hi,

This happens only on Baremetal, on Virtual machines it works fine.
Memory is more than 2 gb on the system I am trying to install.

~ # free -g
total used free shared buffers
Mem: 133747840 5386304 128361536 248704 3264
-/+ buffers: 5383040 128364800
Swap: 11251648 0 11251648

Thanks,
Pooja

Changed in partman-prep (Ubuntu):
milestone: ubuntu-17.01 → ubuntu-17.02
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2017-04-24 12:05 EDT-------
Seeing as the reporter has confirmed that installing / on JFS in 17.04 does work, closing this bug as fixed in current release. Thanks!

tags: added: targetmilestone-inin1704
removed: targetmilestone-inin1610
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments