Entry tags:
UNetbootin Command Line Options
UNetbootin Command Line Options
Commands can optionally be used to pre-specify options, and/or automate installations with UNetbootin. They are available only from version 372 onwards. These are primarily of usage to people writing scripts that invoke unetbootin or people creating custom version of UNetbootin for deployment (see Bundling together a script, a disk image, and UNetbootin into a single executable); average users can just use the GUI instead.The general format of each command is: unetbootin option="value"
The quotes are unneeded when there are no spaces; for example:
unetbootin distribution=UbuntuWorks fine, but for Parted Magic, you'd need:
unetbootin distribution="Parted Magic"Multiple commands should be specified one after another, like:
unetbootin lang=es distribution="Parted Magic" version=2.1_Live installtype=HDD autoinstall=yes
List of Commands
The order of commands does matter, as they are evaluated in order from first to last. They should be specified in the following order:lang
Specifies language to show interface in. If not provided, this is determined based on locale.Possible values: es, fr, zh_CN, zh_TW, etc
Examples:
unetbootin lang=es
rootcheck
Specifies whether or not to check and prompt for root privileges if needed.Possible values: yes, no
Examples
unetbootin rootcheck=no
method
method=distribution checks the radio button for the download and install option, method=diskimage checks the radio button for the suppy your own disk image option, while method=custom checks the radio for the maually specify your kernel, initrd, and options.Possible values: distribution, diskimage, custom
Examples:
unetbootin method=custom
distribution
This pre-sets the distribution to download and install. Should be used together with "method=distribution".Possible values: Ubuntu, Fedora, "Arch Linux", "Parted Magic", etc
Examples:
unetbootin distribution=Ubuntu unetbootin method=distribution distribution="Arch Linux"
version
When used with "method=distribution" and "distribution", this pre-sets the particular version of the distribution to download and install.Possible values: depends on what distribution was specified for Ubuntu: 9.04_Live, 9.04_Live_x64, 9.04_Netinstall, 9.04_Netinstall_x64
Examples:
unetbootin method=distribution distribution=Ubuntu version=9.04_Live_x64
isofile
Specifies a path (file or http/ftp url) to an CD image file (.iso) to install from. If only a filename is provided, it is assumed to be relative to the unetbootin executable. Needs to be nested with quotations if the path has spaces. Also use "method=diskimage" if you want to have the diskimage option be selected by default.Examples:
unetbootin method=diskimage isofile="/home/geza/Ubuntu 9.04.iso" unetbootin method=diskimage isofile="http://mirror.switch.ch/ftp/mirror/slitaz/iso/cooking/slitaz-cooking.iso"
imgfile
Specifies a path (file or http/ftp url) to an floppy disk image file (.img) to install from. If only a filename is provided, it is assumed to be relative to the unetbootin executable. Needs to be nested with quotations if the path has spaces. Also use "method=diskimage" if you want to have the diskimage option be selected by default.Examples:
unetbootin method=diskimage imgfile="/home/geza/Super Grub Disk.img"
kernelfile
Specifies the path (file or http/ftp url) to a kernel file to load; should be used with the "method=custom" option. If only a filename is provided, it is assumed to be relative to the unetbootin executable. You'll probably also need to specify "initrdfile" unless your kernel doesn't need an initrd.Examples:
unetbootin method=custom kernelfile="vmlinuz"
initrdfile
Specifies the path (file or http/ftp url) to an initrd file to load; should be used with the "method=custom" option. If only a filename is provided, it is assumed to be relative to the unetbootin executable. You'll also need to specify the kernel file with "kernelfile".Examples:
unetbootin method=custom kernelfile="/home/geza/vmlinuz" initrdfile="/home/geza/initrd.img"
kernelopts
Specifies parameters to be passed to the kernel. Should be used with "method=custom", "kernelfile", and "initrdfile".Examples:
unetbootin method=custom kernelfile="/home/geza/vmlinuz" kernelfile="/home/geza/initrd.img" kernelopts="ro splash quiet noapic"
cfgfile
Serves the same purpose as kernelopts, but instead you specify a path to a syslinux.cfg or grub menu.lst file which it will read options out of.Examples:
unetbootin method=custom kernelfile="/home/geza/vmlinuz" kernelfile="/home/geza/initrd.img" cfgfile="/home/geza/syslinux.cfg"
installtype
Specifies which type of device you are installing to; HDD if you want to chainload off your existing OS bootloader (that is, have a UNetbootin entry be added to your Windows/GRUB boot menu), or USB if you're installing to an external device. If you want to make your external USB hard drive bootable, use USB, not HDD.Possible values: HDD or USB
Examples:
unetbootin installtype=HDD
targetdrive
Specifies the target device to install to. This option must be specified after installtype if you specified installtype as well.Possible values: varies depending on OS: on Linux: /dev/sdc1, /dev/sdb on Windows: D:\, E:\, F:\
Examples:
unetbootin installtype=USB targetdrive=/dev/sdc1
nocustom
This option is no longer available after version 480, as the custom options aren't shown by default; see showcustom.If y, hides the custom option (where the kernel, initrd, and parameters can be manually specified).
Possible values: y, n
Examples:
unetbootin nocustom=y
showcustom
This option was introduced in version 480; for older versions see nocustom.If y, shows the custom option (where the kernel, initrd, and parameters can be manually specified).
Possible values: y, n
Examples:
unetbootin showcustom=y
nodistro
If y, hides the distribution selector.Possible values: y, n
Examples:
unetbootin nodistro=y
message
Replaces the introductory message with some html text.Examples:
unetbootin message="<b>hello world</b><br/><p>Welcome to UNetbootin</p>"
persistentspace
The number of MB of space to reserve for the Ubuntu Live USB's persistency feature (space used to store files across reboots). A value of 0 means no persistency disk will be created. If this option isn't specified, 0 (no persistency) is assumed. Available in release 549 onwards.Examples:
unetbootin persistentspace=2000
autoinstall
If y, automatically starts installation without prompting, as though you had immediately pressed the OK button. If specified, should be the very last option in the arguments list. Dangerous option; use with care.Possible values: yes, no
Examples:
unetbootin method=distribution distribution=Ubuntu version=9.04_Live installtype=USB autoinstall=yes unetbootin method=diskimage isofile="http://mirror.switch.ch/ftp/mirror/slitaz/iso/cooking/slitaz-cooking.iso" autoinstall=yes
Bundling together a script, a disk image, and UNetbootin into a single executable
These directions are oriented towards deployment on Windows, but those deploying on Linux can use makeself
http://megastep.org/makeself/ in a similar fashion.
A similar procedure is described on the Creating a Standalone Plugin page as well as http://www.msfn.org/board/lofiversion/index.php/t39048.html
Begin by creating a 7-zip SFX configuration file "config.txt" which invokes unetbootin.exe with your specified options, such as:
;!@Install@!UTF-8! RunProgram="unetbootin.exe method=diskimage isofile=slitaz.iso nocustom=y nodistro=y message='Press OK to install Slitaz to USB'" ;!@InstallEnd@!Now download the file 7zS.sfx; this can also be found on the 7-zip website.
Then, download the Latest Release for Windows and rename it to unetbootin.exe
Also place the file "slitaz.iso" (change the "isofile" option in config.txt above if using a different name) in the same directory.
Then, create an archive "unetbootin.7z" containing the files "unetbootin.exe" and "slitaz.iso". On Windows, this can be done via the 7-zip GUI, or if on Linux, install the package p7zip-full or your distribution's equivalent, and enter the command:
7z a unetbootin.7z unetbootin.exe slitaz.isoThen, if on Windows, open a command line and enter:
copy /b 7zs.sfx + config.txt + unetbootin.7z unetbootin-customsfx-windows.exeOr, if on Linux, enter:
cat 7zS.sfx config.txt unetbootin.7z > unetbootin-customsfx-windows.exeNow, you should have a standalone, self-extracting executable where UNetbootin is invoked with your custom options, and your iso file is embedded inside.
See Also
Using a UNetbootin Plugin
Building a Custom UNetbootin Version
List of Custom UNetbootin Versions and Plugins (publicly editable)
Download in other formats:
http://sourceforge.net/apps/trac/unetbootin/wiki/commands