Manual changes to usb image

18 views
Skip to first unread message

avp

unread,
May 4, 2012, 5:14:37 AM5/4/12
to kiwi-...@googlegroups.com
Hello!
I create with kiwi hybrid live system and after successful creating image copy into usb disk (with dd). But I can't mount usb disk to change some config file.
Is this possible - change image after copying into usb-disk?

Marcus Schäfer

unread,
May 4, 2012, 5:29:00 AM5/4/12
to kiwi-...@googlegroups.com
Hi,
a hybrid live system is still an iso filesystem which is by design
a read-only filesystem. So I'm afraid you can't change its contents
after you put it on the stick.

Regards,
Marcus
--
Public Key available
gpg --keyserver gpg-keyserver.de --recv-keys 0xCCE3C6A2
-------------------------------------------------------
Marcus Schäfer (Res. & Dev.) SUSE LINUX Products GmbH
Tel: 0911-740 53 0 Maxfeldstrasse 5
FAX: 0911-740 53 479 D-90409 Nürnberg
GF: Jeff Hawn,Jennifer Guild, Felix Imendörffer
HRB: 21284 (AG Nürnberg) Germany
http://www.suse.de
-------------------------------------------------------

avp

unread,
May 4, 2012, 5:42:01 AM5/4/12
to kiwi-...@googlegroups.com
Ok, but can I some how change rootfs (other type's of images or other kiwi config) after dumping into usb?

Marcus Schäfer

unread,
May 4, 2012, 6:04:35 AM5/4/12
to kiwi-...@googlegroups.com
Hi,

> Ok, but can I some how change rootfs (other type's of images or other
> kiwi config) after dumping into usb?

sure. If you e.g built a vmx image and you have dumped the .raw file on
the stick you can simply mount the stick read/write and change everything
you like.

The fact whether you can persistently change something inside the image
or later at the target device only depends on the filesystem which was
used. Problematic are:

iso
clicfs
squashfs

those are all by design read-only so once created you can't change
the data inside without recreating the entire filesystem

avp

unread,
May 4, 2012, 7:00:14 AM5/4/12
to kiwi-...@googlegroups.com
I have such config
...
 <type  image="ext3" hybrid='true' boot='isoboot/suse-12.1'  ramonly="false">vmx</type>
...
after I successful build image and dump I can't boot from it. Maybe config is wrong?

Marcus Schäfer

unread,
May 4, 2012, 8:06:56 AM5/4/12
to kiwi-...@googlegroups.com
Hi,
This looks like a very old XML and I assume a very old kiwi too.
So the easiest way to success is this:

1) install kiwi, kiwi-desc-vmxboot and kiwi-templates from here:
http://download.opensuse.org/repositories/Virtualization:/Appliances

2) build the 12.1 template:

kiwi --build suse-12.1-JeOS -d /tmp/myimage --type vmx \
--set-repo ...

if you don't set --set-repo kiwi will access the 12.1 online repo
over the network. Therefore I have a copy of the 12.1 DVD like
this:

--set-repo iso:///image/CDs/openSUSE-12.1-DVD-x86_64.iso

alternatively you can mount the 12.1 DVD

mount /dev/dvd /mnt

--set-repo /mnt

as result you will get:

/tmp/myimage/LimeJeOS-openSUSE-12.1.x86_64-1.12.1.raw

you can put that file on your stick:

dd if=/tmp/myimage/LimeJeOS-openSUSE-12.1.x86_64-1.12.1.raw of=/dev/<stick>

==> be careful, wrong device big trouble ;)

after that you can mount the stick:

mount /dev/<stick-partition-one> /mnt

and you can perform changes there. Don't forget to umount before
unplugging the stick

PS:
yesterday we had a redirect issue with download.opensuse.org
if you plan to access repo's from there and see an error in kiwi
saying it can't resolve the URL then it's still this problem
I'm about to solve this right now

avp

unread,
May 4, 2012, 8:55:02 AM5/4/12
to kiwi-...@googlegroups.com
I successful create image with  such config

<?xml version='1.0' encoding='UTF-8'?>
<image name='SR_1.0' displayname='SR_1.0' schemeversion='2.4'>
  <description type='system'>
    <author>avp</author>
    <contact>a@a.a</contact>
    <specification>Tiny</specification>
  </description>
  <preferences>
    <type primary="true" filesystem="ext3" boot="vmxboot/suse-12.1" format="vmdk">vmx</type>
    <version>0.0.16</version>
    <packagemanager>zypper</packagemanager>
    <rpm-excludedocs>true</rpm-excludedocs>
    <rpm-check-signatures>False</rpm-check-signatures>
    <rpm-force>False</rpm-force>
    <boot-theme>studio</boot-theme>
    <locale>en_US</locale>
  </preferences>
...
and boot from usb with qemu. But after I make first boot I try it with another PC. Waiting for appear ...QEMU-disk... I think firstboot in qemu change grub configs and when I try boot from real hardware such disk don't exists. What can I do with this problem?

Marcus Schäfer

unread,
May 4, 2012, 9:11:39 AM5/4/12
to kiwi-...@googlegroups.com
Hi,

> I successful create image with such config
> <?xml version='1.0' encoding='UTF-8'?>
> <image name='SR_1.0' displayname='SR_1.0' schemeversion='2.4'>

2.4 XML is the first version of the XML we provided. Just to give you
an impression we are at 5.3 at the moment. So the only reason why
this works is because kiwi internally converts the schema to the
current version via xslt... better use the current schema

> and boot from usb with qemu. But after I make first boot I try it with
> another PC. Waiting for appear ...QEMU-disk... I think firstboot in
> qemu change grub configs and when I try boot from real hardware such
> disk don't exists. What can I do with this problem?

Well qemu does not attach the USB stick as a USB device. It uses
the device as a normal disk and assigns the qemu internal name
to it "QEMU-disk..." this information is used to setup the bootloader
and of course this will fail to boot on any real hardware because
there the USB stick appears as USB stick with it's real USB stick
hardware ID like "KINGSTON-data-traveler" what ever

So the problem here is not kiwi. The virtualization layer has to
attach the USB device as real USB device including the disk ID
stored by the vendor on the USB device. If this is done you can
move around the stick on other hardware if not you are bound to
that virtualization system
Reply all
Reply to author
Forward
0 new messages