cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1134
Views
5
Helpful
3
Replies

Cannot create Golden ISO for ASR9k XR

BostjanLa
Level 1
Level 1

Cannot create Golden ISO for ASR9k XR

 

I am trying to create golden ISO image for ASR9k but I am failing every time.

The working directory:

test@ubuntuserverbl:~/gisobuild$

test@ubuntuserverbl:~/gisobuild$ pwd

/home/test/gisobuild

test@ubuntuserverbl:~/gisobuild$ ls -lrth

total 1.6G

-rwxr-xr-x 1 test test  957 Oct 15 09:35 LICENSE

-rwxr-xr-x 1 test test 2.7K Oct 15 09:35 README.md

-rwxr-xr-x 1 test test 6.0M Oct 15 09:35 bzImage-7.1.2

drwxr-xr-x 2 test test 4.0K Oct 18 07:06 RPM_REPO

-rwxr-xr-x 1 test test 1.6G Oct 18 07:07 asr9k-mini-x64-7.1.1.iso

-rwxr-xr-x 1 test test 169K Oct 18 08:12 gisobuild.py

test@ubuntuserverbl:~/gisobuild$

 

The output of the gisobuild.py script:

 

test@ubuntuserverbl:~/gisobuild$ sudo python gisobuild.py -i asr9k-mini-x64-7.1.1.iso -r RPM_REPO/* -l ASR9k_711_GISO




System requirements check [PASS]

Golden ISO build process starting...




 Exception: <class 'RuntimeError'> Error CMD=IFS='[] ' read -a a <<< $(isoinfo -i asr9k-mini-x64-7.1.1.iso -R -l | grep " boot.catalog") && dd bs=2048 skip=${a[8]} if=asr9k-mini-x64-7.1.1.iso | head -${a[4]}c > /home/test/gisobuild/tmpim1rxruj/boot.catalog returned --->/bin/sh: 1: Syntax error: redirection unexpected




Detail logs: /home/test/gisobuild/Giso_build.log-2021-10-18:12:24:04.509877

test@ubuntuserverbl:~/gisobuild$

 

and the log file:

 

test@ubuntuserverbl:~/gisobuild$

test@ubuntuserverbl:~/gisobuild$ cat Giso_build.log-2021-10-18:12:17:58.623369

2021-10-18 12:17:58::  ##############START#####################

2021-10-18 12:17:58::  Tool version is 0.35

2021-10-18 12:17:58::  Info: XR Congifuration file not specified.

2021-10-18 12:17:58::  Info: Golden ISO will not have XR configuration file

2021-10-18 12:17:58::  Info: User script is not specified.

2021-10-18 12:17:58::  Argument passed to gisobuild.py : Namespace(bundle_iso=['asr9k-mini-x64-7.1.1.iso'], rpmRepo=[['RPM_REPO/asr9k-iosxr-infra-64-1.0.0.1-r711.CSCvv51226.x86_64.rpm', 'RPM_REPO/asr9k-sysadmin-mgbl-7.1.1.1-r711.CSCvt54649.x86_64.rpm']], xrConfig=None, ztp_ini=None, script=None, gisoLabel=['ASR9k_711_GISO'], gisoExtend=False, migTar=False, x86_only=False, fullISO=False, skipDepCheck=False, gisoInfo=False, pkglist=None)

2021-10-18 12:17:58:: 

Performing System requirements check...

2021-10-18 12:17:58:: 

System requirements check [PASS]

2021-10-18 12:17:58::  Golden ISO build process starting...

2021-10-18 12:17:58::  Cleaning Iso

2021-10-18 12:17:58::  Exiting with exception

2021-10-18 12:17:58::  TB:

Traceback (most recent call last):

  File "/home/test/gisobuild/gisobuild.py", line 3702, in <module>

    main(args)

  File "/home/test/gisobuild/gisobuild.py", line 3367, in main

    giso.set_giso_info(argv.bundle_iso[0])

  File "/home/test/gisobuild/gisobuild.py", line 2016, in set_giso_info

    self.bundle_iso.set_iso_info(iso_path)

  File "/home/test/gisobuild/gisobuild.py", line 1699, in set_iso_info

    readiso(self.iso_path, self.iso_mount_path)

  File "/home/test/gisobuild/gisobuild.py", line 3665, in readiso

    run_cmd(cmd)

  File "/home/test/gisobuild/gisobuild.py", line 94, in run_cmd

    raise RuntimeError("Error CMD=%s returned --->%s" % (cmd, out))

RuntimeError: Error CMD=IFS='[] ' read -a a <<< $(isoinfo -i asr9k-mini-x64-7.1.1.iso -R -l | grep " boot.catalog") && dd bs=2048 skip=${a[8]} if=asr9k-mini-x64-7.1.1.iso | head -${a[4]}c > /home/test/gisobuild/tmp02rjuspo/boot.catalog returned --->/bin/sh: 1: Syntax error: redirection unexpected




2021-10-18 12:17:58::  Detail logs: /home/test/gisobuild/Giso_build.log-2021-10-18:12:17:58.623369

2021-10-18 12:17:58::  ################END#####################

test@ubuntuserverbl:~/gisobuild$

 

Some ideas what is wrong?

 

 

 

1 Accepted Solution

Accepted Solutions

mivens
Level 1
Level 1

This has already been reported and a workaround at
https://github.com/ios-xr/gisobuild/issues/12#issuecomment-917998098 
is to change the lines

def run_cmd(cmd):
process = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)

 to

def run_cmd(cmd):
process = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True, executable='/bin/bash')

 Or apply the attached patch with the command

patch < gisobuild.py.diff.txt

 

View solution in original post

3 Replies 3

mivens
Level 1
Level 1

This has already been reported and a workaround at
https://github.com/ios-xr/gisobuild/issues/12#issuecomment-917998098 
is to change the lines

def run_cmd(cmd):
process = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True)

 to

def run_cmd(cmd):
process = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, shell=True, executable='/bin/bash')

 Or apply the attached patch with the command

patch < gisobuild.py.diff.txt

 

Thx for the help. Its working now.

 

This is fixed in version 0.36 via commit 6539978.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: