Using moblin-image-creator
Configuration of images is based on kickstart, the format used for unattended installation in Fedora and Redhat.
Super user privileges are needed. The tool is more or less self-documenting. Use the --help option to see options.
Examples can be found:
- if you have installed the package, in the /usr/share/doc/mic2/examples
- if you are getting the code from git, in the local source directory or in the source tree
Examples for netbook, that can be easily modified to your needs, are provided as part of the package. You are advised to create a local copy of the examples and edit them as you wish.
Three example kickstart configuration files, for the netbook platform, can be found in the /usr/share/mic2 directory, after installing the package:
- 2.0-final.ks is for early users
- 2.1-final.ks is for end users
- 2.1-developer-final.ks is for developers with a selection of development packages.
You should not edit the installed example files directly. MIC2 can be pointed to any file and does not require the files to be in a certain location.
Copy the netbook.ks file to somewhere else in your home directory. If needed, add or remove packages or customizations, and save them. Here are details about the kickstart format. Note that not all directives and options are supported for creating images. An overview of the supported options will be listed here. The default options in the example should do in most cases.
To create an image, using the Moblin development repository (which is pre-configured in the kickstart file), run the following:
moblin-image-creator -c 2.1-final.ks -f livecd --cache=/tmp/mycacheThis tells image-creator to use the 2.1-final.ks kickstart file to obtain info about which packages to download and include in the image. --cache is the directory on your local machine, which will host a cache of these packages. The cache is very useful, if you are remote to the server, and reduces the amount of downloaded packages next time you create an image. Next time the command is run, if there are changes, this cache will simply be 'updated', rather than re-downloading from the repositories again.
See below for more command line examples.
Creating Live CD Images
Run the following command:
sudo moblin-image-creator --config=2.1-final.ks --format=livecd --cache=mycacheThe output of this command will be a file named: moblin-2.1-final-XX.iso.
This ISO image is a hybrid image and can be either written to a disk device or burned to a CD.
To burn it onto a USB stick, just run the following command, assuming the USB stick is /dev/sdb in your system:
sudo dd if=moblin-2.1-final-XX.iso of=/dev/sdbCreating Live USB Images
Run the following command:
sudo moblin-image-creator --config=2.1-final.ks --format=liveusb --cache=mycacheA file named moblin-2.1-final-XX.usbimg will be created. To burn it into an USB stick, run the following command, assuming USB stick is /dev/sdb in your system:
sudo dd if=moblin-2.1-final-XX.usbimg of=/dev/sdbThis image has a FAT file system and can be mounted easily on Windows and other operating systems.
Creating Live USB Images Interactively
Run the following command:
sudo moblin-image-creator --config=2.1-final.ks --format=liveusb --interactive --cache=mycacheThis command will create an image and attempt to write it directly onto available and suitable devices.
Creating Loop Image
Run the following command:
sudo moblin-image-creator --config=2.1-final.ks --format=loop --cache=/tmp/mycacheA file named moblin-2.1-final-XX.img is created. You can use the commands below to mount it and chroot into it.
sudo mount -o loop moblin-2.1-final-XX.img /mnt
sudo chroot /mnt su –Creating KVM/Raw Image
Run the following command:
sudo moblin-image-creator --config=2.1-final.ks --format=raw --cache=/tmp/mycacheA file named moblin-2.1-final-XX folder with a moblin-2.1-final-XX-sda.raw image is created. For optimal results, use this feature in a machine with VT support and enable it in BIOS.
If you use Fedora or Opensuse, run the following command to launch the image into a KVM virtual machine:
sudo qemu-kvm -m 512 -boot c -hda moblin-2.1-final-XX-sda.raw If you use Ubuntu, run the following command launch image:
sudo kvm -m 512 -boot c -hda moblin-2.1-final-XX-sda.raw -std-vgaCreating Vmware Images (VMDK)
To create a Vmware image, run the following command:
sudo moblin-image-creator --config=2.1-final.ks --format=vmdk --cache=mycacheA file named moblin-netbook-XX folder with both moblin-2.1-final-XX-sda.vmdk image and moblin-2.1-final-XX-sda.vmx is created. Just run Vmware or Vmware player and select the generated vmx file.
Creating Nand Image (mrstnand)
To create a mrstnand image, run the following command:
sudo moblin-image-creator --config=mrst.ks --format=mrstnand --cache=mycachemrstnand image includes two .bin files, *-boot.bin and *-sda.bin. *-boot.bin is the boot image. It should be burned to boot flash RAM. *-sda.bin is root file system image but contains *-boot.bin inside of it. *-sda.bin should be burned to root fs flash RAM. Some special packages are required for this kind of image, so only Intel partners can get the special kickstart file to create it.
Creating VirtualBox Image(.vdi)
To create a VirtualBox image, run the following command:
sudo moblin-image-creator --config=2.1-final.ks --format=vdi --cache=mycacheA moblin-2.1-final-*.vdi file is created. You can boot it using VirtualBox.
- Printer-friendly version
- Login or register to post comments
Comments (25 total)
i need it for 9.10. any
i need it for 9.10. any chance?
It's ok
Moblin image creator 2 can work on Ubuntu 9.10 now, please pull the latest git tree code to try:
git clone git://git.moblin.org/moblin-image-creator-2
sudo ./tools/moblin-check-alldeps
sudo make install
Kickstart file for Moblin Image Creation
Can anybody please tell me in what way does a kickstart file help us in creating an image? Is it really necessary to specify the kickstart file during image creation?
Moblin V2 image creation
I had downloaded kernel-2.6.31.5-10.1.moblin2.src.rpm from moblin repository. I am trying to create a Moblin live USB image with it. I built the downloaded source rpm on Fedora system and created a bzimage(vmlinuz) on fedora. I also have MIC-2 installed on my system. Can I use this bzimage along with MIC-2(Moblin Image Creator) in the creation of moblin image? Or is there any method to directly create an image(of the source rpm) with the help of MIC-2? I had given the following command as mentioned above for creating the image, and it gave me the following error. Please let me know if what I am doing is right or wrong.
Command: ./moblin-image-creator --kernel-path=/Data/vmlinuz0 --config=/Data/moblin-image-creator-2/examples/netbook-core.ks --format=liveusb
where --kernel-path=/Data/vmlinuz0 is the path of the bzimage created on fedora system.
--config=/Data/moblin-image-creator-2/examples/netbook-core.ks is the kickstart file specified.
and --format=liveusb is for creating a live USB image.
When running the above command,i get this error.
Error:Unable to create image:failed to loopback mount '/var/tmp/imgcreate --EYV86/tmp-AmiXUH/ext3fs.img':Failed to mount '/dev/loop0' to 'var/tmp/imgcreate --EYVB6/install_root
Is there problem due to the selection of the kickstart file? Please help.
Thanks in advance.
fedora 11 / 10 dependencies
Hi,
I try to build a moblin image using fedora repos, I have dependencies problem with both 10 and 11.
In the kickstart, I added Fedora Everything and Fedora Updates
any idea ?
Time taken for creation of live usb image using mic-2
Hi,
Can someone help me to know how much time is taken to create a live usb image using mic-2. After installation of MIC-2,
I have used the following command:
sudo moblin-image-creator --config=netbook-core.ks --format=liveusb --cache=mycache
It has already taken more than 15 hours and is still retrieving files from the repository.Please help..
bandwidth
It depends on your bandwidth
Unable to create image : Unable to download from repo : near "re
I am also having the following issue:
jdavis@jdavis-ubuntu904-vm:~/moblin-image-creator-2$ sudo moblin-image-creator --config=./examples2/examples/netbook-core.ks --format=liveusb --cache=mycache
/usr/lib/python2.6/dist-packages/iniparse/ini.py:46: DeprecationWarning: the sets module is deprecated
from sets import Set
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=netbook-core-i68
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
96000 inodes, 384000 blocks
3840 blocks (1.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=394264576
12 block groups
32768 blocks per group, 32768 fragments per group
8000 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.4 (27-Jan-2009)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Retrieving http://repo.moblin.org/moblin/development/core/ia32/debug/repodata/repom... ...OK
Retrieving http://repo.moblin.org/moblin/development/core/ia32/debug/repodata/prima... ...OK
Retrieving http://repo.moblin.org/moblin/development/core/ia32/os/repodata/repomd.xml ...OK
Retrieving http://repo.moblin.org/moblin/development/core/ia32/os/repodata/primary.... ...OK
Unable to create image : Unable to download from repo : near "release": syntax error
Any help is appreciated.
Thanks,
Jacob
Error in Image creator...
Could you get this issue solved? I am also facing the same issue.
Help Needed
I am also facing same problem while building VirtualBox (.vdi) image, Can any one help on this issue? Thanks in anticipation.
Anybody have solved this
Anybody have solved this problem?
occuring error while create an image via MIC2
I want to create an image with format of vmdk. but when i run the following command, encountered some error.
sudo moblin-image-creator --config=/usr/share/doc/mic2/examples/netbook-core.ks --format=vmdk --cache=mycache
error message:
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
tune2fs 1.41.3 (12-Oct-2008)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Unable to create image : Unable to download from repo : Cannot retrieve repository metadata (repomd.xml) for repository: debug. Please verify its path and try again
how can i fix this problem?
can someone give me a help?
Using an alternative kernel in a liveusb image
Hi,
I can use moblin-image-creator to create an image just fine. I'm able to write the image and boot it up on my netbook just fine. I can also download sources for the netbook kernel and build it just fine.
Here's what I want to do next:
- Create a liveusb image that includes and uses my custom built kernel.
I notice in moblin-image-creator there are options, --kernel-rpm-path, that may provide the functionality I want. However, these seem to be under the category of -f nand options. What is a nand format?
Any ideas on how to do what I want?
Thanks, Max
Create an image failed!
Run the command :
moblin-image-creator -c netbook-core.ks -f livecd --cache=/tmp/mycache
the console display some error:
Traceback (most recent call last):
File "/usr/share/yum-cli/callback.py", line 196, in callback
UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-6: ordinal not in range(128)
error: python callback > failed, aborting!
why?
Thanks!
Problem with chrooting
Hello everybody,
I've got some problem with chrooting...
I wish to create an image ( using mic2 ) and then modify that image.
But:
- if I create a liveusb image ( i need that type of image to install into my device - Benq S6 ) I cannot mount it and so I cannot modify; is there a way to mount the liveusb image ?
- if I create a loop image I can mount it but I cannot install anything ( yum complains the lack of /proc/info ); in case I would be able to install something, how do I obtain a liveusb image from the loop one ?
- if I create a kvm image and I modify it using qemu, how do I get a liveusb image from that ?
So:
How may I create an image, modify it and then have it in liveUSB ?
Thank you all
MoblinV2 interactive USB image not working correctly
I have been trying to use MIC2 to create an interactive bootable USB drive and have had problems upon trying to install a couple of programs. I am currently using a Compal device, although I have also tried the development image on my Lenovo T61 laptop. I am able to create a simple text file, save it to the desktop, and reboot with the text file still in place.
However, once I try to copy some files from another disk onto the USB drive, I get an error which eventually crashes the system. When I reboot the system, I get the error message "dropping down to a shell, good luck!" and I get a bash 3.2 command line. From that point, almost no commands work and I wind up having to reinstall the image on the USB drive. I incrementally increased file sizes and found that files approx. 1MB and bigger that are created on Moblin wind up totally crashing the entire system.
Please help, as this has been creating several problems for me. All I need is a bootable version of windows so I can run a simple program on Moblin, and it feels as if I have tried everything. I can also provide more error details, if needed. Thanks!
Static IP in kickstart file does not work
I wanted to set the network to a static IP so I modified the example netbook-core.ks file with the following:
network --bootproto=static --device=eth0 --ip=192.168.1.221 --netmask=255.255.255.0 --gateway=192.168.1.254 --nameserver=202.188.1.5all in one line as explained in the Fedora kickstart documentation. But nothing happened. It is still booting with the default dhcp configuration. Is this option activated in MIC2? The example kickstart file has this option commented out.
Testing multiple email
Testing multiple email notifications from comments, please ignore.
The temporary folder mounted during creating image isn't umount
The temporary folder mounted during creating image isn't being umount after finish the image creating, bellow is the mount command output from my PC:
/dev/loop0 on /var/tmp/imgcreate-P_sJJt/install_root type ext3 (rw)
/sys on /var/tmp/imgcreate-P_sJJt/install_root/sys type none (rw,bind)
/proc on /var/tmp/imgcreate-P_sJJt/install_root/proc type none (rw,bind)
/dev/pts on /var/tmp/imgcreate-P_sJJt/install_root/dev/pts type none (rw,bind)
/tmp/mycache on /var/tmp/imgcreate-P_sJJt/install_root/var/cache/yum type none (rw,bind)
reported a bug in moblin2 bugzilla:
http://bugzilla.moblin.org/show_bug.cgi?id=752
Reboot fails in KVM mode
I tested "reboot" and "shut down" in the KVM. Shut down can work successfully. But Reboot has some problems. When you click Quit --> Restart, you will meet:
1. One crash happened soon after first grub loading. Then it will load grub twice, this time it can go on to boot OS.
2. After system is rebooted, the mouse can not work (just leaves in the center).
This issue only exists in KVM mode.
Can you please use bugzilla?
Thank you for reporting the bugs. Can you please use bugzilla in the future for reporting such issues? (bugzilla.moblin.org)
Thanks,
Anas
Terminal appears abnormally in QEMU-KVM
In Fedora9, I boot up the image by qemu-kvm successfully.
But when I open a terminal, it has jumbled appearance. Other applications (such as "Editor", "Browser" and "File Manager"...) have good appearance. this is only in KVM mode.
chkconfig error during creating image
I tested "livecd", "liveusb", "interactive usb", "loop image" modes. They work well, but during the image creating process, two chkconfig errors outputed unexpectly:
Installing: ntpdate ##################### [136/426]
service ntpdate does not support chkconfig
...
Installing: ntp ##################### [155/426]
service ntpd does not support chkconfig
Need one more interface for http proxy
In case someone may need a http_proxy to connect with http://repo.moblin.org/moblin/releases/test/alpha1/os (in the ks file).
People has to export http_proxy=xxx:xx in the console manually, and then run "moblin-image-creator ...". Since there is a ks file, it is better to add the proxy configuration in kickstart file. Thanks!
examples location
The correct location of the examples (for the current version 0.5) is
/usr/share/doc/mic2-0.5/
So the instruction for creating a livecd is:
$ moblin-image-creator --config=/usr/share/doc/mic2-0.5/examples/netbook-core.ks --format=livecd --cache=mycache