Dear Jose,

That fixes it perfectly.  Core124 is working very nicely and it was only that backup iso that was failing for me.
Many thanks for this fix..

Regards
Paul



Paul Titjen



-------- Original message --------
From: Jose Dias <jose.dias@diaslan.com>
Date: 20/10/2018 16:13 (GMT+00:00)
To: 'Paul Titjen' <paul.titjen@ministc.com>, development@lists.ipfire.org
Subject: RE: Core124 - remastering ISO seems to fail.

What you saw was a bad run.  At some point in the recent past /usr/local/bin/backupiso broke.

 

The spaces in the title of the ISO (-V below) had more spaces than the shell could cope with. I added a -r to the mount command to eliminate an error message. I had a “set -vx” in the code that showed me the problem but that’s not strictly required to run normally

 

Here’s my fix:

[root@harold bin]# diff -p backupiso.github backupiso

*** backupiso.github    2018-10-20 08:36:40.788851707 -0400

--- backupiso   2018-10-20 11:06:19.190237170 -0400

*************** makeiso() {

*** 5,11 ****

        local dir="${1}"

        local output="${2}"

 

!       local args="-J -r -V 'ipfire backup ${TS}' \

                -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \

                -c boot/isolinux/boot.catalog"

 

--- 5,12 ----

        local dir="${1}"

        local output="${2}"

 

!       #local args="-J -r -V 'ipfire backup ${TS}'

!       local args="-J -r \

                -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \

                -c boot/isolinux/boot.catalog"

 

*************** makeiso() {

*** 15,21 ****

        fi

 

        # Compose ISO

!       mkisofs ${args} ${dir} > ${output}

 

        # Add DOS paritition table

        if [ -e "${dir}/boot/isolinux/efiboot.img" ]; then

--- 16,22 ----

        fi

 

        # Compose ISO

!       mkisofs -V 'ipfire backup ${TS}' ${args} ${dir} > ${output}

 

        # Add DOS paritition table

        if [ -e "${dir}/boot/isolinux/efiboot.img" ]; then

*************** rm ${ISO}.md5

*** 90,96 ****

 

  echo "Remastering iso"

  mkdir -p backupiso.tmp.${TS}

! mount -o loop ${ISO} backupiso.tmp.${TS}

  cp -pr backupiso.tmp.${TS} backupiso.${TS}

  umount backupiso.tmp.${TS}

  rm -r backupiso.tmp.${TS}

--- 91,98 ----

 

  echo "Remastering iso"

  mkdir -p backupiso.tmp.${TS}

! mount -r -o loop ${ISO} backupiso.tmp.${TS}

!

  cp -pr backupiso.tmp.${TS} backupiso.${TS}

  umount backupiso.tmp.${TS}

  rm -r backupiso.tmp.${TS}

 

Here’s my run after the fix.

 

makeiso backupiso.${TS} $(basename ${ISO} .iso)-${TS}.iso

basename ${ISO} .iso

++ basename ipfire-2.21.i586-full-core124.iso .iso

+ makeiso backupiso.20181020-1024 ipfire-2.21.i586-full-core124-20181020-1024.iso

+ local dir=backupiso.20181020-1024

+ local output=ipfire-2.21.i586-full-core124-20181020-1024.iso

+ local 'args=-J -r             -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table          -c boot/isolinux/boot.catalog'

+ '[' -e backupiso.20181020-1024/boot/isolinux/efiboot.img ']'

+ mkisofs -V 'ipfire backup ${TS}' -J -r -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -c boot/isolinux/boot.catalog backupiso.20181020-1024

I: -input-charset not specified, using utf-8 (detected in locale settings)

Size of boot image is 4 sectors -> No emulation

  1.34% done, estimate finish Sat Oct 20 10:36:28 2018

  2.67% done, estimate finish Sat Oct 20 10:36:28 2018

96.05% done, estimate finish Sat Oct 20 10:36:47 2018

97.39% done, estimate finish Sat Oct 20 10:36:47 2018

98.72% done, estimate finish Sat Oct 20 10:36:48 2018

Total translation table size: 2048

Total rockridge attributes bytes: 7102

Total directory bytes: 14336

Path table size(bytes): 50

Max brk space used 42000

374803 extents written (732 MB)

+ '[' -e backupiso.20181020-1024/boot/isolinux/efiboot.img ']'

+ isohybrid ipfire-2.21.i586-full-core124-20181020-1024.iso

+ return 0

 

echo "Cleaning up"

+ echo 'Cleaning up'

Cleaning up

rm -rf backupiso.${TS}

 

From: Development <development-bounces@lists.ipfire.org> On Behalf Of Paul Titjen
Sent: Tuesday, October 16, 2018 3:47 AM
To: development@lists.ipfire.org
Subject: Core124 - remastering ISO seems to fail.

 

Dear all,

 

The remastering option of the backup seems to fail again for me at least in core124.  It was working in core123.  Now I am getting a remastered ISO 0f 0 size.

Looking at the backups created everything else seems to work except the remastering part.

 

Backup from 20181016-0742.ipf Size 11.46 MB  

Backup from 20181016-0744.ipf Size 13.22 MB  

Backup from 20181016-0804.ipf Size 13.22 MB  

Backup from ipfire-2.21.x86_64-full-core124-20181016-0744.iso Size 0.00 MB    

Backup from ipfire-2.21.x86_64-full-core124-20181016-0804.iso Size 0.00 MB    

Backup from ipfire-2.21.x86_64-full-core124.iso Size 240.00 MB

 

To have a look at it I used command line and change directory to /var/ipfire/backup/bin and run ./backup.pl iso

This is the tail end of the output from  ./backup.pl iso

~~~~~~~~~~~~~~

Remastering iso

mount: /dev/loop0 is write-protected, mounting read-only

Running mkisofs

I: -input-charset not specified, using utf-8 (detected in locale settings)

genisoimage: No such file or directory. Invalid node - 'backup'.

isohybrid: ipfire-2.21.x86_64-full-core124-20181016-0804.iso: read error - 0: Success

Cleaning up

^C

~~~~~~~~~~~~~~

 

The CTRL C is because the script hangs trying to clean up.

 

 

Below is the end of the script that is called - /usr/local/bin/backupiso

~~~~~~~~~~~~~~~~~

echo "Remastering iso"

mkdir -p backupiso.tmp.${TS}

mount -o loop ${ISO} backupiso.tmp.${TS}

cp -pr backupiso.tmp.${TS} backupiso.${TS}

umount backupiso.tmp.${TS}

rm -r backupiso.tmp.${TS}

 

# Copy backup file to disk

cp "/var/ipfire/backup/${TS}.ipf" "backupiso.${TS}/backup.ipf"

 

echo "Running mkisofs"

makeiso backupiso.${TS} $(basename ${ISO} .iso)-${TS}.iso

 

echo "Cleaning up"

rm -rf backupiso.${TS}

~~~~~~~~~~~~~~~~~~

 

 

 

Regards,

Paul


Virus-free. www.avast.com