I'm trying to edit the default username/hostname for a a custom Ubuntu 22.04.1 LTS LiveCD.
I'm understanding I need to edit the
/etc/casper.conf file that resides inside
$ISO_MEDIA/casper/initrd, which I need to decompress first - where
$ISO_MEDIA is the directory the original ISO contents were extracted into.
But in all the tutorials I've found, this file has an extension such as
.gz, which is not my case.
I tried anyway following those tutorials, decompressing the file as instructed:
(cd $ISO_MEDIA/casper/tempinitrd && lzma -dc -S .lz $ISO_MEDIA/casper/initrd | cpio -imd --no-absolute-filenames)
However I get an error stating that the file has an invalid format:
lzma: /iso/custom/media/casper/initrd: File format not recognized
And when I run
file $ISO_MEDIA/casper/initrd I have this output:
initrd: ASCII cpio archive (SVR4 with no CRC)
So I figured running only
cpio only would perhaps be enough, such as in:
(cd $ISO_MEDIA/casper/tempinitrd && cpio -imd --no-absolute-filenames < $ISO_MEDIA/casper/initrd)
It seemed to work, but now I have a file structure like the following:
casper.conf is nowhere to be found.
I feel like I'm walking in circles at this point. Any help figuring this out is appreciated.
Some of the tutorials I found were: