Using NeroCmd in Ubuntu 19.10

Dan Bryant
5 min readApr 8, 2020

--

Nero Linux 4

It came up recently on the tsMuxer project I run that open source options for creating UDF 2.5/2.6 disks are currently not great. The functionality has been created in NetBSD but the tools would need to be ported over to Linux.

In fact for Linux there is no kernel support for UDF 2.5 or 2.6 so the situation there is not great at all. On Windows we can use a few different proprietary tools to perform the job. On Linux the only tool I could find that can create UDF 2.6 ISOs is Nero Linux 4.

Edit: recent improvements to tsMuxer mean that we are now creating compliant UDF 2.50 ISOs.

Nero Linux 4 is quite old now. The last update was in 2012, when it was released as freeware. Despite this it appears to require a serial number, the serial is shipped with the software, though. Despite its age it seems to be the only Linux-native program I could find that can create UDF 2.6 Blu-ray ISOs, that tsMuxer requires. So I installed the latest 64-bit version available.

Nero Linux 4 also ships with nerocmd — a command line tool to do anything the GUI can do, just on the command line. The issue was that when trying to do anything it would just report “Internal Error” and refuse to tell me what is happening. With strace I was able to find out what the issue is.

Nero Linux 4 is old enough that it was originally used on distributions that installed 64-bit libraries to /usr/lib64/. This isn’t the case any more, and the program uses some runtime-linking to libraries such as “/usr/lib64/nero/libNeroAudioPluginMgr.so”. This path doesn’t exist — the correct one is “/usr/lib/nero/libNeroAudioPluginMgr.so”.

Luckily I found a workaround, although it is a bit kludgey. First back up nerocmd — we need to edit it.

sudo cp /usr/bin/nerocmd /usr/bin/nerocmd-bkup

Next use a hex editor — such as ghex — to open nerocmd and alter all mentions of /usr/lib64/nero/ to /usr/lib/./nero:

sudo ghex /usr/bin/nerocmd

Finally copy Nero.txt from /usr/share/nero to /usr/lib/nero/:

sudo cp /usr/share/nero/Nero.txt /usr/lib/nero/

What we have done here is alter nerocmd so that when it looks up the hard-coded path for Nero Linux 4 libraries it will get directed to the actual library location, rather than the outdated one. The “./” string means “in the current directory”, it is the easiest way to correct the path while keeping the number of characters the same.

We copy the Nero.txt file as it appears that nerocmd tries to look for it in that folder, for some reason. It doesn’t appear to impact functionality — I just saw it in the strace output. Here is the command output working successfully:

$ echo "ECT-PPT-UDF-BD.iso" | nerocmd --write --drive=-1,0 --bd --udf --udf-revision=2.60 --udf-partition-type=physical --data "PPT - EPM Community Tod@y.zip"
Checking discs
[i] Checking discs
Enter file name to save image to (RETURN to abort): PHASE: Start write nospd
Writing to disc
[i] Burn process started
Writing lead-out
[i] Writing lead-out
PHASE: Done write nospd
[i] Burn process completed successfully
Ok.

And finally here is the output that is saved into neroerr.txt:

9M1K-0098-P3HL-PK6P-T6UA-1E5X-****-****Linux (Ubuntu 19.10 'eoan') 5.3.0-42-generic (x86_64)
Nero API version: 9.7.0.132
Using interface version: 9.0.1.4
Installed in: /usr/lib/./nero/
Application: Nero AG\NeroCMD
Internal Version: 9, 7, 0, 132
Recorder: <Image Recorder> Version: Not Available - HA -1 TA 0 - 0.0.0.0
Adapter driver: <Virtual Device> HA -1
Drive buffer :
Excluded drive IDs:
WriteBufferSize: 83886080 (0) Byte
BUFE : 0
Physical memory : 7494MB (7673940kB)
Free physical memory: 1855MB (1900400kB)
Memory in use : 75 %
Uncached PFiles: 0x0
Global Bus Type: default (0)
Check supported media : Disabled (0)
8.4.2020
NeroAPI
16:48:32 #1 Text 0 File NeroAPI.cpp, Line 6157
No audio track specified for the first session

16:48:32 #2 Text 0 File Burncd.cpp, Line 3647
Turn on Disc-At-Once, using Blu-ray Disc media

16:48:32 #3 Phase 74 File APIProgress.cpp, Line 259
Checking discs

16:48:32 #4 Text 0 File DlgWaitCD.cpp, Line 313
Total disc capacity: 24780800 48400MB
User data to be written: 18016 35MB
Free space on disc: 0 0MB

16:48:32 #5 Text 0 File DlgWaitCD.cpp, Line 325
Write in overburning mode: NO

16:48:32 #6 Text 0 File DlgWaitCD.cpp, Line 500
>>> Protocol of DlgWaitCD activities: <<<
=========================================

16:48:32 #7 Text 0 File ThreadedTransferInterface.cpp, Line 734
Setup items (after recorder preparation)
0: TRM_DATA_MODE1 ()
2 indices, index0 (150) not provided
original disc pos #0 + 18016 (18016) = #18016/4:0.16
relocatable, disc pos for caching/writing not required/ required
-> TRM_DATA_MODE1, 2048, config 0, wanted index0 0 blocks, length 18016 blocks [Image Recorder]
--------------------------------------------------------------

16:48:32 #8 Text 0 File ThreadedTransferInterface.cpp, Line 936
Prepare [Image Recorder] for write in CUE-sheet-DAO
DAO infos:
==========
MCN: ""
TOCType: 0x00; Session Closed, disc fixated
Tracks 1 to 1: Idx 0 Idx 1 Next Trk
1: TRM_DATA_MODE1, 2048/0x00, FilePos 0 0 36896768, ISRC ""
DAO layout:
===========
___Start_|____Track_|_Idx_|_CtrlAdr_|_____Size_|______NWA_|_RecDep__________
0 | lead-in | 0 | 0x41 | 0 | 0 | 0x00
0 | 1 | 0 | 0x41 | 0 | 0 | 0x00
0 | 1 | 1 | 0x41 | 18016 | 0 | 0x00
18016 | lead-out | 1 | 0x41 | 0 | 0 | 0x00

16:48:32 #9 Text 0 File Burncd.cpp, Line 4354
Caching options: cache CDRom or Network-No, small files-Yes (<32KB)

16:48:32 #10 Phase 65 File APIProgress.cpp, Line 275
Burn process started

16:48:32 #11 Text 0 File ThreadedTransferInterface.cpp, Line 2690
Verifying disc position of item 0 (relocatable, disc pos, no patch infos, orig at #0): write at #0

16:48:32 #12 Text 0 File ThreadedTransfer.cpp, Line 273
Pipe memory size 590400

16:48:32 #13 Text 0 File CUDFTransferItem2.cpp, Line 689

GenUDF2 FS Layout:
=-=-=-=-=-=-=-=-=-=-
Sectors to be written: 18016
Session Start: Sector 0
Volume Structure: Sector [0, 287] (288 Sectors)
Before Meta Data: Sector [288, 319] (32 Sectors)
Meta Data: Sector [320, 351] (32 Sectors)
Data: Sector [352, 17639] (17288 Sectors)
After Data: Sector [17640, 17695] (56 Sectors)
Trailer Track: Sector [17696, 18015] (320 Sectors)

GenUDF2 Parameters:
=-=-=-=-=-=-=-=-=-=-
PrepTime: 04-08-2020 16:48:32
UDF Revision: 2.60
UDF Partition Type: Physical
UDF Special Mode: None
Bytes per Sector: 2048
Session Start: 0
Physical Partition Start: -1
Total Capacity: 24780800
Multi Session Mode: Begin
Disc Type: BD-R|BD-RE|BD-R DL|BD-RE DL|BD-R|BD-RE|BD-R DL|BD-RE DL
OS Class: 5
Volume ID: New
Allow Unicode Labels: 1
Duplicate Meta Data: 1
MS Info File: 0
VMS Rollback File: 0
Create ISO bridge: 0
ECC Block Length: 32
Sparing Packet Length: 32
Allocation Unit Size: 32
Alignment Unit Size: 32
Make Writable: 0
Access Type: Read-only

16:48:32 #14 Text 0 File WriterStatus.cpp, Line 245
<Image Recorder> start writing Lead-Out at LBA 18016 (4660h), length 0 blocks

16:48:32 #15 Phase 43 File APIProgress.cpp, Line 259
Writing lead-out

16:48:32 #16 Phase 66 File APIProgress.cpp, Line 275
Burn process completed successfully

--

--