RHEL kiwi image installation fails when built with recovery option

107 views
Skip to first unread message

Jagan

unread,
Jul 15, 2015, 10:46:13 AM7/15/15
to kiwi-...@googlegroups.com

Hi,

we have created RHEL 6.6 image with recovery option, but when we tried to install the image its failing with below error. After selecting the disk for image installation.

        Failed to mount install image container.
Give root password for maintenance
(or type control-D to continue):

recovery option in XML file:
<oem-recovery>true</oem-recovery> 
<oem-inplace-recovery>false</oem-inplace-recovery>

when we go through some of the code we found that when the raw image size is more than 4GB, it will use some additional options for creating ISO image. (additional options: -allow-limited-size -udf -hfs -iso-level 3). When we try to build image with recovery option with less than 4 GB its working without any issues. So the total issue is when we try to create an image with more than 4GB of size with recovery option installation of that image is failing.

we also identified that when we create image with recovery option and raw image size more than 4GB, its creating the ISO image in DOS/MBR boot sector type. But without recovery option ISO image in 'ISO 9660 CD-ROM filesystem data 'KIWI CD/DVD Installation' (bootable) type. Because of the file type DOS/MBR boot sector, during installation, mounting of the the ISO image on CDROM is failing.

Could someone please help us in resolving this issue. 

Thanks & Regards,
Jagan







Marcus Schäfer

unread,
Jul 16, 2015, 5:07:35 AM7/16/15
to kiwi-...@googlegroups.com
Hi,

sorry for the late response, I realized you also contacted me on irc
but I was busy with other work and currently attending a development
workshop in Nuremberg. Thus I apologize for slow responses at the
moment

> Â Â Â Â Failed to mount install image container.
> Give root password for maintenance
> (or type control-D to continue):
> recovery option in XML file:
> <oem-recovery>true</oem-recovery>Â
> <oem-inplace-recovery>false</oem-inplace-recovery>
> when we go through some of the code we found that when the raw image
> size is more than 4GB, it will use some additional options for creating
> ISO image. (additional options:Â -allow-limited-size -udf -hfs
> -iso-level 3).

right, iso-level 3 is used together with udf to allow big files

> When we try to build image with recovery option with
> less than 4 GB its working without any issues. So the total issue is
> when we try to create an image with more than 4GB of size with recovery
> option installation of that image is failing.

ok I'll try to reproduce this

> we also identified that when we create image with recovery option and
> raw image size more than 4GB, its creating the ISO image in DOS/MBR
> boot sector type. But without recovery option ISO image in 'ISO 9660
> CD-ROM filesystem data 'KIWI CD/DVD Installation'
> (bootable) type. Because of the file type DOS/MBR boot sector, during
> installation, mounting of the the ISO image on CDROM is failing.
> Could someone please help us in resolving this issue.Â

I guess you are referencing the hybrid MBR put into the iso to allow
booting the iso as disk and as iso ?

Regards,
Marcus
--
Public Key available via: https://keybase.io
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer (Res. & Dev.) SUSE Linux GmbH
Tel: 0911-740 53 0 Maxfeldstrasse 5
FAX: 0911-740 53 479 D-90409 Nürnberg
HRB: 21284 (AG Nürnberg) Germany
GF: Felix Imendörffer, Jane Smithard
GF: Jennifer Guild, Dilip Upmanyu, Graham Norton
http://www.suse.de
-------------------------------------------------------

Jagan

unread,
Jul 16, 2015, 6:17:19 AM7/16/15
to kiwi-...@googlegroups.com, m...@suse.de
Thanks Marcus,

Thanks for your time to post the reply even in the busy schedule. 
Attaching one screen shot of file command output for with recovery image(>4GB) and without recovery image(<4GB) 

when we tried to install the image with recovery, it is failing at kiwimount in KIWILinuxrc.sh, in kiwimount when it tries to mount this ISO falie it is failing.
 else
        if ! mount -t $FSTYPE $opt $src $dst >/dev/null;then
            return 1
        fi
this piece of code is failing with mount: you must specify filesystem type. when the image in DOS/MBR boot sector format its nota ble to mount it here. Because of this installation is not working.

Thanks & Regards,
jagan
file.jpg

Marcus Schäfer

unread,
Jul 20, 2015, 5:57:59 AM7/20/15
to kiwi-...@googlegroups.com
Hi,

> right, iso-level 3 is used together with udf to allow big files
>
> > When we try to build image with recovery option with
> > less than 4 GB its working without any issues. So the total issue is
> > when we try to create an image with more than 4GB of size with recovery
> > option installation of that image is failing.
>
> ok I'll try to reproduce this

Hmm, I can't reproduce this. I have created some big chunks via /dev/urandom
into the image and created a 6g disk (4.7GB iso) which is installable

The code which does not work on your system is:

if ! mount -o loop /cdrom/$imageName.squashfs $prefix;then
systemException \
"Failed to mount install image container" \
"reboot"
fi

This means the CD/DVD could be found and mounted to /cdrom. The udf
drivers are also included in the kiwi rhel boot descriptions:

<file name="fs/udf/*"/>

I suggest we debug this part outside of the initrd. Please try the
following test:


mkdir -p /mnt /mnt2

mount your-install.iso /mnt
mount /mnt/your-image.raw.squashfs /mnt2

The last call should fail, but it does not on my systems. I guess the
udf support in the rhel kernel does not exist or has a problem because
you mentioned it is working if the size is below 4g

Regards,
Marcus
--
Public Key available via: https://keybase.io
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer (Res. & Dev.) SUSE Linux GmbH
Tel: 0911-740 53 0 Maxfeldstrasse 5
FAX: 0911-740 53 479 D-90409 Nürnberg
HRB: 21284 (AG Nürnberg) Germany
GF: Felix Imendörffer, Jane Smithard
GF: Dilip Upmanyu, Graham Norton
http://www.suse.de
-------------------------------------------------------

Jagan

unread,
Jul 24, 2015, 3:57:35 AM7/24/15
to kiwi, m...@suse.com
Hi Marcus,

Thanks for your help.  Now we are able to install our image with recovery, after including  <file name="fs/udf/udf.ko"/>  in kiwi xml file. 
But after that, when we tried to enter into recovery menu, its going into grub, as kiwi is giving only this in grub.conf file.

title Recovery
rootnoverify (hd0,2)
chainloader +1

once we entered into the grub, we are loading our kernel and initrd using below commands.
kernel /boot/vmlinuz root=/dev/sda3(this is my recovery partition)
initrd /boot/initrd
boot

after i ran boot its not booting, and coming out with some error. screen shot attached.
could you please help me in resolving this issue?

tell me if i am missing some basic thing in this? 

even i tried to change Recovery entry in grub.conf as below
title Recovery
 kernel (hd0,2)/boot/vmlinuz root=/dev/sda3  disk=/dev/sda vga=normal  LOCAL_BOOT=yes quiet showopts
 initrd (hd0,2)/boot/initrd

after changing grub.conf, if i enter into Recovery menu, its failing with kernel panic error.

I understood that something very basic we are missing here. could you please help us?

Thanks & Regards,
Jagan
grub_error.JPG

Marcus Schäfer

unread,
Jul 28, 2015, 7:03:34 AM7/28/15
to jagan, kiwi-...@googlegroups.com
Hi,

ok I got this to work with RHEL too. I have tested RHEL 6.6 Server (Santiago)
and the recovery system worked for me so far.

Unfortunately "dialog" and also "fbiterm" have bugs which makes it
hard to interact with the console dialogs. You should consider to bring
in newer versions for those tools

I have submitted kiwi v7.03.10 which contains the patches

Jagan

unread,
Jul 29, 2015, 6:25:45 AM7/29/15
to kiwi, m...@suse.com
Hi Marcus,

Thanks much for your help!!!
now we are able to see the recovery grub menu with options like Recovery/Repair and Restore.
But once i selected Recovery/Repair its failing with below error: after this recovery is in hung state. 
 Failed to backup zypp database

In linuxrc file i can see below code:
if [ -z "$RESTORE" ];then
            for i in passwd shadow group;do
                if ! cp etc/$i tmp/$i;then
                    cd / ; umountSystem; rm -f tmp/passwd tmp/shadow tmp/group
                    Echo "Failed to store $i"
                    exit 1
                fi
            done
            if ! cp -a etc/zypp etc/zypp.backup;then
                rm -rf etc/zypp.backup; cd / ; umountSystem
                Echo "Failed to backup zypp database"
                exit 1
            fi
            if ! cp -a var/lib/rpm var/lib/rpm.backup;then
                rm -rf var/lib/rpm.backup; cd / ; umountSystem
                Echo "Failed to backup RPM database"
                exit 1
            fi
        fi

if my understanding is correct,
In RHEL, we are not using zypper so there will be no /etc/zypp fodler. but here it looks like it tried to copy etc/zypp folder. Because of that its failing. 

screen shot attached for the error message. 

Thanks & Regards,
Jagan

recovery_zypp_error.JPG

Marcus Schäfer

unread,
Jul 29, 2015, 8:23:06 AM7/29/15
to Jagan, kiwi
Hi,

> Â Failed to backup zypp database

Hrm, bad idea to do this on rhel :)

I fixed that. new kiwi packages will land by the end of this week latest

PS:
I was able to build rhel images with dice too. Started working
yesterday late evening ;)

Regards,
Marcus
--
Public Key available via: https://keybase.io
keybase search marcus_schaefer
-------------------------------------------------------
Marcus Schäfer (Res. & Dev.) SUSE Linux GmbH
Tel: 0911-740 53 0 Maxfeldstrasse 5
FAX: 0911-740 53 479 D-90409 Nürnberg
HRB: 21284 (AG Nürnberg) Germany
GF: Felix Imendörffer, Jane Smithard
GF: Jennifer Guild, Dilip Upmanyu, Graham Norton
http://www.suse.de
-------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages