openSUSE / fuel-ignition

Easily generate new or edit existing Ignition configs. No more fiddling around with JSON or Butane.
GNU General Public License v2.0
23 stars 7 forks source link

The mkisofs command for ignition is wrong #26

Closed grisu48 closed 3 weeks ago

grisu48 commented 3 months ago

The provided mkisofs command on the page does not produce a valid ignition disk image:

# mkisofs -full-iso9660-filenames -o ignition.iso -V ignition config.ign

The problem is that the expected layout assumes the config file config.ign to be in the ignition subdirectory but this command creates the config file in the root directory.

This results in a iso file, that does not work as expected.

grisu48 commented 3 months ago

The only solution I came up with is to create the subdirectories but then it's not a one-liner anymore.

Also careful, when passing a directory to mkisofs, the program creates an iso with the contents of that directory. So e.g.

# ls ignition
config.ign
# mkisofs -full-iso9660-filenames -o ignition.iso -V ignition ignition

Will also not work, because here config.ign is again in the root. One would need to do

# mkdir -p iso/ignition
# cp config.ign iso/ignition/config.ign
# mkisofs -full-iso9660-filenames -o ignition.iso -V ignition iso

or something like this.

schubi2 commented 3 weeks ago

Hm, sorry I cannot reproduce your issue. The file will be generated in the ignition directory:

root@localhost:tmp (0) $ l insgesamt 4 drwxr-xr-x 1 root root 20 17. Jun 13:39 ./ drwxr-xr-x 1 schubi users 36 17. Jun 13:39 ../ -rw-r--r-- 1 root root 1842 17. Jun 13:37 config.ign root@localhost:tmp (0) $ mkisofs -full-iso9660-filenames -o ignition.iso -V ignition -root ignition config.ign Setting input-charset to 'UTF-8' from locale. Total translation table size: 0 Total rockridge attributes bytes: 0 Total directory bytes: 2048 Path table size(bytes): 26 Max brk space used 0 176 extents written (0 MB) root@localhost:tmp (0) $ mount -o loop ignition.iso /mnt mount: /mnt: WARNUNG: die Quelle ist schreibgeschützt und wird daher im Nur-Lese-Modus eingehängt. root@localhost:tmp (0) $ ls -R /mnt /mnt: ignition

/mnt/ignition: config.ign root@localhost:tmp (0) $

grisu48 commented 2 weeks ago

Indeed, this works now as expected. I somehow missed the -root ignition parameter. With that present it works indeed as expected.

I checked also the https://opensuse.github.io/fuel-ignition/edit page, and there the -root parameter is also present.

Sorry for the noise.