Hi,> # Most linux distros dont have `mkisofs'Or they have genisoimage under the name "mkisofs". (e.g. Debian, Archlinux)> mkisofs \ > -o output.iso \ > -no-emul-boot \ > -boot-info-table \ > -boot-load-size 4 \ > -c isolinux/boot.cat \ > -b isolinux/isolinux.bin \ > ISO_rootI would add option -R or -r for Rock Ridge names and file attributes. This will make appear the files with their original names, as in ISO_root, when the ISO filesystem gets mounted on unix-like systems. (Up to 255 characters of 8 bit each. E.g. UTF-8.) Maybe add option -J for Joliet names, so that Microsoft users do not feel discriminated. (Up to 64 UCS-2 characters of 16 bit each.)> # Could anyone give me an example to do this same thing, using > # `genisoimage', or `xorriso'?The options used in your example (as well as R, -r, -J) are supported by genisoimage and by "xorriso -as mkisofs", too. See also http://wiki.osdev.org/El-Torito#Example_of_ISO_Filesystem_Production_Run_for_BIOS genisoimage is a clone of mkisofs as of 2006, enhanced by several new options to serve the needs of Debian CD image production. xorriso is not a mkisofs clone, but offers a compatibility mode. hpa wrote:> xorriso uses a different command line, as it is a lot more capable.As its developer i will not contradict. :)) For clarification: xorriso's native command interface differs much from mkisofs, in order to make it suitable for dialog operation and for serving as online slave for frontends. Among its commands is -as mkisofs ...mkisofs.options... -- The mkisofs options include all those which are mentioned by the ISOLINUX wiki for mkisofs. The end mark "--" may be omitted if no other xorriso commands shall follow. The complete -as mkisofs option list is shown by xorriso -as mkisofs -help and explained in detail in man xorrisofs http://www.gnu.org/software/xorriso/man_1_xorrisofs.html Some of these options are add-ons which you will not find in mkisofs. Vice versa, several mkisofs options are not supported by xorriso -as mkisofs. Most notably: -udf, -hfs. You may also use xorriso to put the ISO image onto optical media on GNU/Linux, FreeBSD, or Solaris: xorriso -as cdrecord -v blank=as_needed -eject output.iso (Documented in man xorrecord.) Send bug reports or enhancement wishes to me directly or to bug-xorriso at gnu.org Have a nice day :) Thomas
On Sun, Feb 2, 2014 at 2:31 AM, Thomas Schmitt <scdbackup at gmx.net> wrote:> Hi, > > > # Most linux distros dont have `mkisofs' ( > > Or they have genisoimage under the name "mkisofs". > (e.g. Debian, Archlinux) >...> I would add option -R or -r for Rock Ridge names and file attributes. > This will make appear the files with their original names, as in > ISO_root, when the ISO filesystem gets mounted on unix-like systems. > (Up to 255 characters of 8 bit each. E.g. UTF-8.) > > Thank you for this ^ .> > http://wiki.osdev.org/El-Torito#Example_of_ISO_Filesystem_Production_Run_for_BIOS >And this ^. man xorrisofs> http://www.gnu.org/software/xorriso/man_1_xorrisofs.html > > Some of these options are add-ons which you will not find > in mkisofs. Vice versa, several mkisofs options are not supported > by xorriso -as mkisofs. Most notably: -udf, -hfs. >This also is perfect, i found `xorriso -as mkisofs' last night, and it worked great. And `xorrisofs' seemed to work even better. But I really want to push xorriso to its limits. And utilize its capability to make a .iso that when written to a USB, one can "claim the extra space" as another partition. As they are using in the current debian-live. So i came up with this: xorrisofs \ -o output.iso \ -no-emul-boot \ -boot-info-table \ -boot-load-size 4 \ -c isolinux/boot.cat \ -b isolinux/isolinux.bin \ -partition_offset 16 \ -partition_cyl_align auto \ ISO_root This works great, but i first have to run `isohybrid output.iso' which seems to reverse or ruin the special .iso partition. I am guessing it is just a matter of grokking xorrisos options. I didn't expect to get the maintainer of `xorriso' so thank you for your time Thomas. Great tool, I am going to proceed to statically compile it like Mattias mentions below, so i always have a copy on hand. I then run: is_not_an_isohybrid() { sudo dd if=output.iso of=/dev/sdX sudo parted /dev/sdX mkpart primary 10MB 100MB -m -s } This of course is no good, because it has not been prepared to be a "isohybrid". But the partitioning is successful. But again, after i prepare it by running `isohybrid' this capability for a second partition is gone, as below: does_not_work() { isohybrid output.iso sudo dd if=output.iso of=/dev/sdb sudo parted /dev/sdb mkpart primary 10MB 100MB -m -s # Creates an error for parted. does not work. } Thank all of you for the help, Sincerely -dean
Mattias Schlenker
2014-Feb-02 18:37 UTC
[syslinux] xorriso or genisoimage syntax assistance
Am 02.02.2014 17:49, schrieb Dean Graff:> This also is perfect, i found `xorriso -as mkisofs' last night, and it > worked great. And `xorrisofs' seemed to work even better. But I really want > to push xorriso to its limits. And utilize its capability to make a .iso > that when written to a USB, one can "claim the extra space" as another > partition. As they are using in the current debian-live. >Xooriso has the option to add another partition beyond the space occopied by the ISO9660 filesystem. This basically just appends (and aligns) the given image and adds an entry to the partition table. This is however static in size and will result in some limitations. A common problem with partitioning tools is that they are not very eager to support nested partitions. Besides ISOhybrid boot I do not see any need for nested partitions, so their decision to treat nested partitions as a kind of error and to delete them is reasonable. I am sure there are some possibities to move the EFI image to the end of the filesystem and build a dual ISO/UDF filesystem with the UDF using the first partition (EFI boot second) and the ISO spanning the whole disk. But this would lead to some failures on some UEFI implementations that cannot cope with EFI boot images located at high LBAs... Since the size of a target thumb drive with an ISOhybrid system is never known and some strange operating systems so only the first no hidden partition on removable devices I decided to put some logic for changing partitioning (to GPT) to the initramfs. On my live systems I basically do upon first boot: 1. zero the first 32k of the ISOhybrid thumb drive - this kills the GPT but leaves the ISO intact and thus avoids confusion for partitioning tools 2. move the ISO to the end of the device (don't forget to remember where you put it) in 8MB blocks beginning from the end keeps RAM used for moving low and allows overlaps between the old position and the new position (eg. if the ISO is ~700MB and the drive is 1GB) 3. Create some partitions (in my case at least four): 1. FAT32 of flexible size, allows to continue using the thumb drive with all operating systems including MS Windows 2. legacy_boot for extlinux and kernel files (do not to put gptmbr.bin to the first sector of the device) 3. boot for EFI boot - I just "dd" the efi.img there 4. system - partition that starts where the moved ISO image starts (on my systems there are actually eight partitions in the end, added are: spare system for easier updates, one for encrypted /home, one for encrypted swap, and one for nonfree binary extensions that can be added by users or customers). If you want to look at the whole process, download this live system: http://download.lesslinux.org/incoming/lesslinux-search-and-rescue-uluru-20140123-134238.iso Boot it, then take a look at the function iso_gpt_convert in: /etc/rc.d/0110-searchsys.sh BTW: Using GPT should be not a problem these days, since only Windows XP is the last operating system to support MBR only. If you really want to support Windows XP with this layout you should probably install a "synced" MBR that just exposes the first partition. Regards, Mattias -- Mattias Schlenker - Redaktion + EDV-Beratung + Linux-CD/DVD-Konzepte August-Bebel-Str. 74 - 04275 LEIPZIG - GERMANY Bitte fuer geschaeftliche Telefonate vorzugsweise die VoIP-Telefonnummer +49 341 39290767 verwenden, da ich diese aufs Mobiltelefon routen kann!