#663 Issue closed: How to create ISO image on s390x?

Labels: enhancement, waiting for info, support / question

phracek opened issue at 2015-09-30 06:50:

Rear works currently only in x86_64 architectures. The ISO file is not created in s390x. ISO file is created in ppc64 and ppc64le, but it is not bootable.

rear-1.17.2-1.el7.noarch

There is output of rear for s390x.

# rpm -q rear
rear-1.17.2-1.el7.noarch
# arch
s390x
#
# rear -v mkbackup
Relax-and-Recover 1.17.2 / Git
Using log file: /var/log/rear/rear-ibm-z10-73.log
Creating disk layout
Creating root filesystem layout
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
# echo $?
0
#
# cat /var/log/rear/rear-ibm-z10-73.log
...
2015-09-29 04:28:42 Including output/default/10_mount_output_path.sh
mkdir: created directory '/tmp/rear.2ps7DRj69iDcJz6/outputfs'
2015-09-29 04:28:42 Including output/default/15_save_copy_of_prefix_dir.sh
2015-09-29 04:28:42 Including output/default/20_make_boot_dir.sh
mkdir: created directory '/tmp/rear.2ps7DRj69iDcJz6/tmp/boot'
2015-09-29 04:28:42 Including output/default/20_make_prefix_dir.sh
mkdir: created directory '/tmp/rear.2ps7DRj69iDcJz6/outputfs/ibm-z10-73'

----->> HERE IS START OF WRONG OUTPUT <<-----
         compared with right output

2015-09-29 04:28:42 Including output/default/25_create_lock.sh
2015-09-29 04:28:42 Including output/default/94_grub2_rescue.sh
2015-09-29 04:28:42 Including output/default/94_grub_rescue.sh
2015-09-29 04:28:42 Including output/default/95_copy_result_files.sh
2015-09-29 04:28:42 Including output/default/95_email_result_files.sh
2015-09-29 04:28:42 Including output/default/97_remove_lock.sh
2015-09-29 04:28:42 Including output/default/98_umount_output_dir.sh
2015-09-29 04:28:42 Finished running 'output' stage in 0 seconds
2015-09-29 04:28:42 Running 'backup' stage
2015-09-29 04:28:42 Including backup/default/00_valid_backup_methods.sh
2015-09-29 04:28:42 Finished running 'backup' stage in 0 seconds
2015-09-29 04:28:42 Finished running mkbackup workflow
2015-09-29 04:28:42 Running exit tasks.
rmdir: removing directory, '/tmp/rear.2ps7DRj69iDcJz6/outputfs'
rmdir: failed to remove '/tmp/rear.2ps7DRj69iDcJz6/outputfs': Directory not empty
2015-09-29 04:28:42 Finished in 13 seconds
2015-09-29 04:28:42 Removing build area /tmp/rear.2ps7DRj69iDcJz6
rmdir: removing directory, '/tmp/rear.2ps7DRj69iDcJz6'
2015-09-29 04:28:42 End of program reached
#
#

There is output of rear for ppc64 and ppc64le.

# rear -v mkbackup
Relax-and-Recover 1.17.2 / Git
Using log file: /var/log/rear/rear-ibm-p8-kvm-03-guest-04.log
Creating disk layout
Creating root filesystem layout
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Making ISO image
Wrote ISO Image /var/lib/rear/output/rear-ibm-p8-kvm-03-guest-04.iso (64M)
#
# file /var/lib/rear/output/rear-ibm-p8-kvm-03-guest-04.iso 
/var/lib/rear/output/rear-ibm-p8-kvm-03-guest-04.iso: # ISO 9660 CD-ROM filesystem data 'RELAXRECOVER                    '
#
# isoinfo -d -i /var/lib/rear/output/rear-ibm-p8-kvm-03-guest-04.iso 
CD-ROM is in ISO 9660 format
System id: LINUX
Volume id: RELAXRECOVER
Volume set id: 
Publisher id: 
Data preparer id: 
Application id: GENISOIMAGE ISO 9660/HFS FILESYSTEM CREATOR (C) 1993 E.YOUNGDALE (C) 1997-2006 J.PEARSON/J.SCHILLING (C) 2006-2007 CDRKIT TEAM
Copyright File id: 
Abstract File id: 
Bibliographic File id: 
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 32729
Joliet with UCS level 3 found
Rock Ridge signatures version 1 found
#
#

gdha commented at 2015-09-30 07:04:

@mmitsugi @k0da Could you do me a favor and have a look if ISO booting on ppc and ppc64le still works? According RedHat it is broken and I have no HW to test with.
Architecture s390x is still unsupported.

schlomo commented at 2015-09-30 09:23:

Architecture s390x sounds really cool. Please provide pull requests with code for that. For obvious reasons we don't have one of those standing under our desk :-)

mmitsugi commented at 2015-10-06 05:30:

@gdha sorry for my late reply.
Regarding the RHEL distro on Power, there are several versions with 2 architectures(ppc64 and ppc64le).

a RHEL6 / ppc64 (yaboot) : it should work. need to check
b RHEL7 / ppc64 (grub) : not tested yet. still work in progress
c RHEL7 / ppc64le (grub) : tested / worked when I did pull request. need to check

@jayfurmanek could you please check that RHEL6 / ppc64 (you created) still work on current version?

As for RHEL7 / ppc64le, it seems that there is no ppc64le rpm for current version...
so we need to patch of rear.spec for ppc64le rpm at first.
I think ppc64le will be used for OpenSUSE and SLES12, we need to get review from @k0da

mmitsugi commented at 2015-10-06 09:34:

Regarding the RHEL7 / ppc64le, it works fine just by adding ppc64le arch to rpm spec file.
I've created the patch #665.
Tested platform : PowerVM: RHEL7.1 LE

mmitsugi commented at 2015-10-06 09:40:

@gdha After this patch is merged, it would be helpful if your team upload ppc64le rpm into official site.
Please let me know if additional verification or support is needed.

gdha commented at 2015-10-06 14:50:

@mmitsugi On OpenSuse Build Service I've added ppc64le
Let us wait if it build correctly

jsmeix commented at 2015-10-06 15:25:

FYI:
currently OBS shows "RHEL_7 ppc64le excluded" because rear.spec is not yet up to date in OBS (i.e. currently rear.spec still has "ExclusiveArch: %ix86 x86_64 ppc ppc64").

jayfurmanek commented at 2015-10-06 17:18:

I just did a fresh checkout on RHEL6.6 ppc64

$ usr/sbin/rear -V
Relax-and-Recover 1.17.2 / Git
$ uname -a
Linux free146219.austin.ibm.com 2.6.32-504.el6.ppc64 #1 SMP Tue Sep 16 01:52:45 EDT 2014 ppc64 ppc64 ppc64 GNU/Linux

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)

And it created a bootable ISO just fine. The backup and restore to NFS works fine as well.

@phracek
What issues are you seeing? The output of isoinfo on mine looks the same as yours, but the ISO is indeed bootable.

jayfurmanek commented at 2015-10-06 18:36:

@phracek

I notice you running RHEL as a VM under KVM. The console may be a bit different there than under PowerVM. I'll have to give that a shot.

There is one known console bug with RHEL6 when running under KVM on Power (while using a virtual video card and VNC as the transport). The console text displays very dark by default. Workarounds are discussed on this page (Search for 'guest considerations')

https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W51a7ffcf4dfd_4b40_9d82_446ebc23c550/page/IBM%20PowerKVM%202.1.1%20Known%20Issues%20and%20Readme

phracek commented at 2015-10-13 06:57:

I have a question, why rear use Arches (like Exclusive Arch).

I didn't see in code any language or arch specific issues.
In RHEL 7 we are building rear like noarch. Maybe this is a trouble.

phracek commented at 2015-10-13 07:19:

After calling rear -v mkbackup on PPC64LE I see.

2015-10-13 03:05:20 Including output/ISO/Linux-ppc64le/80_create_isofs.sh
2015-10-13 03:05:20 Copying kernel
'/boot/vmlinuz-3.10.0-229.ael7b.ppc64le' -> '/tmp/rear.G5bzKw9sxJ94opD/tmp/kernel'
2015-10-13 03:05:20 Starting '/bin/mkisofs'
2015-10-13 03:05:20 Making ISO image
Warning: creating filesystem that does not conform to ISO-9660.
genisoimage 1.1.11 (Linux)
Scanning boot
Scanning boot/grub
Scanning ppc
  28   708 
  29   318 boot
  30   454 grub
  31   334 ppc
Cache hit for '/..'
      37    26431 initrd.cgz
   26432    35201 /tmp/rear.G5bzKw9sxJ94opD/tmp/kernel
Cache hit for 'grub/.'
   35202    35202 boot/grub/grub.cfg
   35203    35373 boot/grub/powerpc.elf
   35374    35374 ppc/bootinfo.txt
Creating 1 PReP boot partition(s)
CHRP boot partition 1
Writing:   HFS volume header                       Start Block 0
Done with: HFS volume header                       Block(s)    4
Writing:   Initial Padblock                        Start Block 4
Done with: Initial Padblock                        Block(s)    12
Writing:   Primary Volume Descriptor               Start Block 16
Done with: Primary Volume Descriptor               Block(s)    1
Writing:   Joliet Volume Descriptor                Start Block 17
Done with: Joliet Volume Descriptor                Block(s)    1
Writing:   End Volume Descriptor                   Start Block 18
Done with: End Volume Descriptor                   Block(s)    1
Writing:   Version block                           Start Block 19
Done with: Version block                           Block(s)    1
Writing:   Path table                              Start Block 20
Done with: Path table                              Block(s)    4
Writing:   Joliet path table                       Start Block 24
Done with: Joliet path table                       Block(s)    4
Writing:   Directory tree                          Start Block 28
Done with: Directory tree                          Block(s)    4
Writing:   Joliet directory tree                   Start Block 32
Done with: Joliet directory tree                   Block(s)    4
Writing:   Directory tree cleanup                  Start Block 36
Done with: Directory tree cleanup                  Block(s)    0
Writing:   Extension record                        Start Block 36
Done with: Extension record                        Block(s)    1
Writing:   The File(s)                             Start Block 37
Total extents scheduled to be written = 35525
 14.11% done, estimate finish Tue Oct 13 03:05:20 2015
 28.16% done, estimate finish Tue Oct 13 03:05:20 2015
 42.26% done, estimate finish Tue Oct 13 03:05:20 2015
 56.31% done, estimate finish Tue Oct 13 03:05:20 2015
 70.41% done, estimate finish Tue Oct 13 03:05:20 2015
 84.45% done, estimate finish Tue Oct 13 03:05:20 2015
 98.54% done, estimate finish Tue Oct 13 03:05:20 2015
Total translation table size: 0
Total rockridge attributes bytes: 1205
Total directory bytes: 6144
Path table size(bytes): 46
Done with: The File(s)                             Block(s)    35338
Writing:   Ending Padblock                         Start Block 35375
Done with: Ending Padblock                         Block(s)    150
Max brk space used 0
35525 extents written (69 MB)
2015-10-13 03:05:20 Including output/default/94_grub2_rescue.sh
2015-10-13 03:05:20 Including output/default/94_grub_rescue.sh
2015-10-13 03:05:20 Including output/default/95_copy_result_files.sh
2015-10-13 03:05:20 Copying resulting files to file location
2015-10-13 03:05:20 Copying files '/var/lib/rear/output/rear-ibm-p8-generic-01-le02.iso' to file location
'/var/lib/rear/output/rear-ibm-p8-generic-01-le02.iso' -> '/home/phracek//ibm-p8-generic-01-le02/rear-ibm-p8-generic-01-le02.iso'
'/usr/share/rear/conf/templates/RESULT_usage_ISO.txt' -> '/home/phracek//ibm-p8-generic-01-le02/README'
2015-10-13 03:05:20 Saved /var/log/rear/rear-ibm-p8-generic-01-le02.log as rear.log

ISO File:

# file rear-ibm-p8-generic-01-le02.iso 
rear-ibm-p8-generic-01-le02.iso: # ISO 9660 CD-ROM filesystem data 'RELAXRECOVER'
#

After mounting to /mnt it contains:

# ls -la
total 70339
dr-xr-xr-x.  4 root root     2048 Oct 13 03:05 .
dr-xr-xr-x. 18 root root     4096 Oct 13 03:04 ..
drwx------.  3 root root     2048 Oct 13 03:05 boot
-rw-r--r--.  1 root root 54055707 Oct 13 03:05 initrd.cgz
-rwxr-xr-x.  1 root root 17960344 Jan 30  2015 kernel
drwx------.  2 root root     2048 Oct 13 03:05 ppc
#

I have tried to mount it via libvirt and result is:

Booting from DVD/CD
Booting failed: Could not read from CDROM (code 0004)
Booting from Hard Disk ...
Boot failed: not a bootable disk

phracek commented at 2015-10-13 07:21:

rear configuration which was used on PPC64LE:

# Default is to create Relax-and-Recover rescue media as ISO image
# set OUTPUT to change that
# set BACKUP to activate an automated (backup and) restore of your data
# Possible configuration values can be found in /usr/share/rear/conf/default.conf
#
# This file (local.conf) is intended for manual configuration. For configuration
# through packages and other automated means we recommend creating a new
# file named site.conf next to this file and to leave the local.conf as it is. 
# Our packages will never ship with a site.conf.

OUTPUT=ISO
BACKUP_URL="file:///root/"

jsmeix commented at 2015-10-13 07:33:

@phracek
regarding your question why rear use Arches (like Exclusive Arch) see the comments in the rear upstream spec file packaging/rpm/rear.spec and https://github.com/rear/rear/issues/629

jayfurmanek commented at 2015-10-13 18:57:

@phracek
It looks like you are testing RHEL7 (grub) ppc64le.
I've reconfirmed that REAR does generate a bootable ISO for RHEL6 (yaboot). It also boots fine as a KVM guest - although there may be a console fix that's needed for KVM.

@mmitsugi
Have you tested the latest REAR version on RHEL7 (grub) ppc64le on KVM?

mmitsugi commented at 2015-10-14 08:12:

@phracek
I checked latest RHEL7 ppc64le (RHEL7.1 LE : RHEL-LE-7.1-20150219.1-Server-ppc64le) on KVM, and it works fine in my environment.
Here is my create_isofs part

2015-10-14 14:09:52 Including output/ISO/Linux-ppc64le/80_create_isofs.sh
2015-10-14 14:09:52 Copying kernel
'/boot/vmlinuz-3.10.0-229.ael7b.ppc64le' -> '/tmp/rear.GcF6eCmHQe7JQgz/tmp/kernel'
2015-10-14 14:09:52 Starting '/bin/mkisofs'
2015-10-14 14:09:52 Making ISO image
Warning: creating filesystem that does not conform to ISO-9660.
genisoimage 1.1.11 (Linux)
Scanning boot
Scanning boot/grub
Scanning ppc
  28   708 
  29   318 boot
  30   454 grub
  31   334 ppc
Cache hit for '/..'
      37    23883 initrd.cgz
   23884    32653 /tmp/rear.GcF6eCmHQe7JQgz/tmp/kernel
Cache hit for 'grub/.'
   32654    32654 boot/grub/grub.cfg
   32655    32825 boot/grub/powerpc.elf
   32826    32826 ppc/bootinfo.txt
Creating 1 PReP boot partition(s)
CHRP boot partition 1
Writing:   HFS volume header                       Start Block 0
Done with: HFS volume header                       Block(s)    4
Writing:   Initial Padblock                        Start Block 4
Done with: Initial Padblock                        Block(s)    12
Writing:   Primary Volume Descriptor               Start Block 16
Done with: Primary Volume Descriptor               Block(s)    1
Writing:   Joliet Volume Descriptor                Start Block 17
Done with: Joliet Volume Descriptor                Block(s)    1
Writing:   End Volume Descriptor                   Start Block 18
Done with: End Volume Descriptor                   Block(s)    1
Writing:   Version block                           Start Block 19
Done with: Version block                           Block(s)    1
Writing:   Path table                              Start Block 20
Done with: Path table                              Block(s)    4
Writing:   Joliet path table                       Start Block 24
Done with: Joliet path table                       Block(s)    4
Writing:   Directory tree                          Start Block 28
Done with: Directory tree                          Block(s)    4
Writing:   Joliet directory tree                   Start Block 32
Done with: Joliet directory tree                   Block(s)    4
Writing:   Directory tree cleanup                  Start Block 36
Done with: Directory tree cleanup                  Block(s)    0
Writing:   Extension record                        Start Block 36
Done with: Extension record                        Block(s)    1
Writing:   The File(s)                             Start Block 37
Total extents scheduled to be written = 32977
 15.20% done, estimate finish Wed Oct 14 14:09:52 2015
 30.34% done, estimate finish Wed Oct 14 14:09:52 2015
 45.53% done, estimate finish Wed Oct 14 14:09:52 2015
 60.66% done, estimate finish Wed Oct 14 14:09:52 2015
 75.82% done, estimate finish Wed Oct 14 14:09:52 2015
 91.01% done, estimate finish Wed Oct 14 14:09:52 2015
Total translation table size: 0
Total rockridge attributes bytes: 1205
Total directory bytes: 6144
Path table size(bytes): 46
Done with: The File(s)                             Block(s)    32790
Writing:   Ending Padblock                         Start Block 32827
Done with: Ending Padblock                         Block(s)    150
Max brk space used 0
32977 extents written (64 MB)

file size seems to be slightly different, but almost same as yours.
rear configuration is same as well.

libvirt xml description is like following:

    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/rear-mmRHEL71LEk.iso'/>
      <target dev='sdc' bus='scsi'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>

I have several questions:

  • Could you provide the contents of ppc/bootinfo.txt in your iso?
    The bootinfo.txt in my iso is following.
<chrp-boot>
<description>Relax-and-Recover</description>
<os-name>Linux</os-name>
<boot-script>boot &device;:\boot\grub\powerpc.elf</boot-script>
</chrp-boot>
  • size of boot/grub/powerpc.elf in your env seems to be different from that in my env.
    So could you let me know exact RHEL7.1 version you are using?

phracek commented at 2015-10-14 12:22:

My ppc/bootinfo.txt is the same:

<chrp-boot>
<description>Relax-and-Recover</description>
<os-name>Linux</os-name>
<boot-script>boot &device;:\boot\grub\powerpc.elf</boot-script>
</chrp-boot>

Tested platform: 8 CPUs (virt Power8), 12 GB RAM, KVM guest
System is RHEL-7.2, though

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.2 Beta (Maipo)
#

# uname -a
Linux ibm-p8-generic-01-le02.lab.eng.brq.redhat.com 3.10.0-229.ael7b.ppc64le #1 SMP Fri Jan 30 12:03:50 EST 2015 ppc64le ppc64le ppc64le GNU/Linux
#

mmitsugi commented at 2015-10-14 15:26:

@phracek
Thanks for your quick answer. OK, I will check with RHEL7.2 LE Beta.

mmitsugi commented at 2015-10-15 07:59:

@phracek
I tested RHEL-7.2-20150820.0-Server-ppc64le and it seems to work fine.

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.2 Beta (Maipo)

# uname -a
Linux mmR72LEbeta 3.10.0-306.0.1.el7.ppc64le #1 SMP Wed Aug 19 16:06:58 EDT 2015 ppc64le ppc64le ppc64le GNU/Linux

So it might be possible that your RHEL beta is too early and has a problem...
Please let me know if you have chance to try with other GA version like 7.1 LE and still have a problem.

phracek commented at 2015-10-16 07:50:

Well I will try it soon definitely.

And of course I will keep you inform.

mmitsugi commented at 2015-10-20 06:16:

a RHEL6 / ppc64 (yaboot) : it should work. need to check
b RHEL7 / ppc64 (grub) : not tested yet. still work in progress
c RHEL7 / ppc64le (grub) : tested / worked when I did pull request. need to check

Regarding the b RHEL7 / ppc64 (grub), I've created the pull request #672 to support.

gdha commented at 2015-11-13 09:27:

@phracek Any updates from your side?


[Export of Github issue for rear/rear.]