Re: Customized images
Send to china Carlos Dario Isaza Zamudio::ConTi Ingeniero Electronico Proyecto Todos @l Computador Celular (57) 300 814 9308 Universidad Nacional de Colombia - Sede Manizales GNU/Linux Registered User #465475 eSSuX - Usuarios y Desarrolladores GNU/Linux UNAL Manizales On Tue, Jan 6, 2009 at 5:59 PM, Erik Garrison wrote: > On Tue, Jan 06, 2009 at 04:12:39PM -0500, Carlos Dario Isaza Zamudio wrote: > > I'm sorry there was a misunderstanding on my part. > > > > The idea with the images is for manufacturing the computers. In my state > we > > want to make a kind of customized image with some configuration and send > for > > manufacturing the computers. > > > > Any ideas? > > Do you mean you want to send an image to the factory in China? > > Or do you mean you want to install a customized image on laptops > locally? > > Erik > ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Cleaning cloned images [was: Re: Customized images]
On Wed, 7 Jan 2009, James Cameron wrote: > On Tue, Jan 06, 2009 at 07:18:28PM -0500, Erik Garrison wrote: >> /etc/udev/rules.d/70-persistent-net.rules > > An entry is added here for every new network interface by MAC address. > An image booted on several systems ends up with several different lines > here. Network interface for the embedded wireless may not be eth0, but > this does not appear to cause any *major* difficulty, except I saw > someone reported that it does not reassociated after suspend. I suggest > removing all the eth lines when cleaning. I've run into this one before (in other systems) it associates a interface name with a mac address on the theory that you don't want to have a physical interface change it's name if you plug a new NIC into the machine. it has the unforunate side effect that if you replace a NIC the new one gets a different name than the old one (replace eth0 and you now have eth1 in what is otherwise an identical machine) I would suggest that for the XO with a single (wireless) NIC and external USB wired NICs, the best thing to do is to just trash this file every bootup/shutdown so that the names of NICs don't change based on what was plugged into the system in the past. the only reason I don't suggest changing the udev rules to not use this file (other than the maintinance issue of forking the rules), is that there may be some value in this to make sure that USB NICs get re-used in the same order through a suspend cycle. David Lang ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Cleaning cloned images [was: Re: Customized images]
On Tue, Jan 06, 2009 at 07:18:28PM -0500, Erik Garrison wrote: > ... /etc/alsa/asound.state ... > Ok. First this appears to be just one file, an alsa state file, which > must be written to by alsa during the first runtime. During shutdown, "alsactl store" writes this file. A cleaning script need only remove the file. The defaults are then used, which are reasonable. Or just restore the original file. > /etc/hosts > > 127.0.0.1 xo-0D-69-70.localdomain xo-0D-69-70 localhost A host name. Derived from the MAC address of whatever eth0 is, IIRC. This used to cause xauth problems, way back. Not sure if it still does. When the image is booted again on a new system, the name used here is different. > /etc/udev/rules.d/70-persistent-net.rules An entry is added here for every new network interface by MAC address. An image booted on several systems ends up with several different lines here. Network interface for the embedded wireless may not be eth0, but this does not appear to cause any *major* difficulty, except I saw someone reported that it does not reassociated after suspend. I suggest removing all the eth lines when cleaning. > /etc/ssh/ssh_host_rsa_key.pub I remove or regenerate this. -- James Cameronmailto:qu...@us.netrek.org http://quozl.netrek.org/ ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Cleaning cloned images [was: Re: Customized images]
On Tue, Jan 06, 2009 at 04:53:19PM -0500, Michael Stone wrote: > On Tue, Jan 06, 2009 at 03:52:44PM -0500, Erik Garrison wrote: >> >> ... >> >> We haven't worked on figuring out what pieces of the system are touched, >> so, as Michael notes, copying the machines can have unintended side >> effects. It seems that nearly everyone who tries to distribute images >> by cloning runs into some oddities. That said, it also seems that this >> method of customization is the most appealing and straightforward. It >> has come up several times recently and I think the time has come to >> properly evaluate it. > > Perhaps someone here could be tempted into writing a "clean-up" script > like we discussed the last time this came up? > > Michael Ok. I've made the first steps. And I've documented them by writing scripts to do most of the typing in the hopes that other developers will test. === Procedure === Attached is a script (mount-jffs2.sh) to mount jffs2 images, which is a pain as you have to do so via a loopback device and the block2mtd driver. Once the image is mounted you have to copy it to another directory, and then mount the one you wish to compare with and do the same to it. You have to do this because it does not seem you can have two jffs2 images mounted via loopback and the block2mtd driver simultaneously. Now that the images have been copied to their own roots you can compare them using recursive diff (diff -r). Redirect the output to some file and then parse it with the other attached script, parse-recursive-diff.sh. This script just sorts things so they are easier to read than the default output. === Results === Below is an annotated sample output of a comparison of the stock 8.2-767 image (0.root) and the results of save-nand on a system that was flashed with the same image, booted once through to Sugar, and then shut down (a.root). It was produced using "diff -r 0.root/ a.root/" and then pushing the results through the attached parse-recursive-diff.sh script. Comments welcome. Other testers even more welcome. It does not seem the differences are so problematic to prevent an easily implemented cleanup script. device files which probably don't matter I omitted these for sanity. files which exist in both trees and differ diff -r 0.root/versions/pristine/767/etc/alsa/asound.state a.root/versions/pristine/767/etc/alsa/asound.state diff -r 0.root/versions/run/767/etc/alsa/asound.state a.root/versions/run/767/etc/alsa/asound.state Ok. First this appears to be just one file, an alsa state file, which must be written to by alsa during the first runtime. files which are only in one tree Home directory stuff: Only in a.root/home: .devkey.html Only in a.root/home/olpc: .boot_time Only in a.root/home/olpc: .dbus Only in a.root/home/olpc: .fontconfig Only in a.root/home/olpc: .gnome2 Only in a.root/home/olpc: .i18n Only in a.root/home/olpc: .library_pages Only in a.root/home/olpc: .olpc-configured Only in a.root/home/olpc: .sugar Security, including ssh keys: Only in a.root/security: .private Only in a.root/security/state: etc Only in a.root/security/state: var /etc/mtab obviously won't be on an unbooted system: Only in a.root/versions/run/767/etc: mtab Written by olpc-configure: Only in a.root/versions/run/767/etc/sysconfig: i18n Only in a.root/versions/run/767/etc/sysconfig: keyboard Only in a.root/versions/run/767/etc/X11: xorg.conf Only in a.root/versions/run/767: .olpc-configured First boot configuration of hald (the fdi data cache) and anacron. Only in a.root/versions/run/767/var/cache/hald: fdi-cache Only in a.root/versions/run/767/var/spool/anacron: cron.daily Only in a.root/versions/run/767/var/spool/anacron: cron.monthly Only in a.root/versions/run/767/var/spool/anacron: cron.weekly Written by the initramfs: Only in a.root/versions: running binary files which differ I don't know which of these might even matter for the cleaning script. Binary files 0.root/versions/pristine/767/etc/avahi/etc/localtime and a.root/versions/pristine/767/etc/avahi/etc/localtime differ Binary files 0.root/versions/pristine/767/var/log/wtmp and a.root/versions/pristine/767/var/log/wtmp differ Binary files 0.root/versions/pristine/767/var/run/utmp and a.root/versions/pristine/767/var/run/utmp differ Binary files 0.root/versions/run/767/etc/avahi/etc/localtime and a.root/versions/run/767/etc/avahi/etc/localtime differ Binary files 0.root/versions/run/767/var/log/wtmp and a.root/versions/run/767/var/log/wtmp differ Binary files 0.root/versions/run/767/var/run/utmp and a.root/versions/run/767/var/run/utmp differ === Notes === In conversation Scott
Re: Customized images
On Tue, Jan 06, 2009 at 04:12:39PM -0500, Carlos Dario Isaza Zamudio wrote: > I'm sorry there was a misunderstanding on my part. > > The idea with the images is for manufacturing the computers. In my state we > want to make a kind of customized image with some configuration and send for > manufacturing the computers. > > Any ideas? Do you mean you want to send an image to the factory in China? Or do you mean you want to install a customized image on laptops locally? Erik ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Customized images
On Tue, Jan 06, 2009 at 03:52:44PM -0500, Erik Garrison wrote: >On Tue, Jan 06, 2009 at 03:23:32PM -0500, Michael Stone wrote: >> >> On Mon, Jan 05, 2009 at 02:27:45PM -0500, Carlos Dario Isaza Zamudio wrote: >> >I have a fully customized XO and i need to take an image from it to be >> >installed on several computers inside the project. The thing is i need it to >> >be separated from the activity pack, like the ones you use to update via >> >USB. >> >> Hi Carlos, >> >> Thanks for the great questions. >> >> >Questions >> >1) When i take the image from this one and install it into another, will i >> >have two computers wchi are exactly the same? >> >> No. Each XO contains unique "manufacturing data", stored in a >> non-volatile memory which is separate from the main (1GB) non-volatile >> memory. >> >> Moreover, when you boot an XO, it runs some software which "dirties" the >> filesystem. You'd want to "clean" the filesystem by undoing some of >> these edits before you clone the image onto lots of other machines. > >Dirty might be too general a word. Specifically there are a number of >changes made to system files during the first boot of the machine >which you might not want to copy between machines. (SSH keys, for >instance, are generated once at first boot on every XO. Also, >hardware-dependent information from the firmware is cached on the NAND >after first boot.) > >We haven't worked on figuring out what pieces of the system are touched, >so, as Michael notes, copying the machines can have unintended side >effects. It seems that nearly everyone who tries to distribute images >by cloning runs into some oddities. That said, it also seems that this >method of customization is the most appealing and straightforward. It >has come up several times recently and I think the time has come to >properly evaluate it. Perhaps someone here could be tempted into writing a "clean-up" script like we discussed the last time this came up? Michael ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Customized images
I'm sorry there was a misunderstanding on my part. The idea with the images is for manufacturing the computers. In my state we want to make a kind of customized image with some configuration and send for manufacturing the computers. Any ideas? Thanks Carlos Dario Isaza Zamudio::ConTi Ingeniero Electronico Proyecto Todos @l Computador Celular (57) 300 814 9308 Universidad Nacional de Colombia - Sede Manizales GNU/Linux Registered User #465475 eSSuX - Usuarios y Desarrolladores GNU/Linux UNAL Manizales On Tue, Jan 6, 2009 at 3:52 PM, Erik Garrison wrote: > On Tue, Jan 06, 2009 at 03:23:32PM -0500, Michael Stone wrote: > > > > On Mon, Jan 05, 2009 at 02:27:45PM -0500, Carlos Dario Isaza Zamudio > wrote: > > >I have a fully customized XO and i need to take an image from it to be > > >installed on several computers inside the project. The thing is i need > it to > > >be separated from the activity pack, like the ones you use to update via > > >USB. > > > > Hi Carlos, > > > > Thanks for the great questions. > > > > >Questions > > >1) When i take the image from this one and install it into another, will > i > > >have two computers wchi are exactly the same? > > > > No. Each XO contains unique "manufacturing data", stored in a > > non-volatile memory which is separate from the main (1GB) non-volatile > > memory. > > > > Moreover, when you boot an XO, it runs some software which "dirties" the > > filesystem. You'd want to "clean" the filesystem by undoing some of > > these edits before you clone the image onto lots of other machines. > > Dirty might be too general a word. Specifically there are a number of > changes made to system files during the first boot of the machine > which you might not want to copy between machines. (SSH keys, for > instance, are generated once at first boot on every XO. Also, > hardware-dependent information from the firmware is cached on the NAND > after first boot.) > > We haven't worked on figuring out what pieces of the system are touched, > so, as Michael notes, copying the machines can have unintended side > effects. It seems that nearly everyone who tries to distribute images > by cloning runs into some oddities. That said, it also seems that this > method of customization is the most appealing and straightforward. It > has come up several times recently and I think the time has come to > properly evaluate it. > > Erik > ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Customized images
On Tue, Jan 06, 2009 at 03:23:32PM -0500, Michael Stone wrote: > > On Mon, Jan 05, 2009 at 02:27:45PM -0500, Carlos Dario Isaza Zamudio wrote: > >I have a fully customized XO and i need to take an image from it to be > >installed on several computers inside the project. The thing is i need it to > >be separated from the activity pack, like the ones you use to update via > >USB. > > Hi Carlos, > > Thanks for the great questions. > > >Questions > >1) When i take the image from this one and install it into another, will i > >have two computers wchi are exactly the same? > > No. Each XO contains unique "manufacturing data", stored in a > non-volatile memory which is separate from the main (1GB) non-volatile > memory. > > Moreover, when you boot an XO, it runs some software which "dirties" the > filesystem. You'd want to "clean" the filesystem by undoing some of > these edits before you clone the image onto lots of other machines. Dirty might be too general a word. Specifically there are a number of changes made to system files during the first boot of the machine which you might not want to copy between machines. (SSH keys, for instance, are generated once at first boot on every XO. Also, hardware-dependent information from the firmware is cached on the NAND after first boot.) We haven't worked on figuring out what pieces of the system are touched, so, as Michael notes, copying the machines can have unintended side effects. It seems that nearly everyone who tries to distribute images by cloning runs into some oddities. That said, it also seems that this method of customization is the most appealing and straightforward. It has come up several times recently and I think the time has come to properly evaluate it. Erik ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Re: Customized images
On Mon, Jan 05, 2009 at 02:27:45PM -0500, Carlos Dario Isaza Zamudio wrote: >I have a fully customized XO and i need to take an image from it to be >installed on several computers inside the project. The thing is i need it to >be separated from the activity pack, like the ones you use to update via >USB. Hi Carlos, Thanks for the great questions. >Questions >1) When i take the image from this one and install it into another, will i >have two computers wchi are exactly the same? No. Each XO contains unique "manufacturing data", stored in a non-volatile memory which is separate from the main (1GB) non-volatile memory. Moreover, when you boot an XO, it runs some software which "dirties" the filesystem. You'd want to "clean" the filesystem by undoing some of these edits before you clone the image onto lots of other machines. >2) In order to do this process does it have to be into a "unblocked" XO or >with developer key? Because if that's the case, i can't do it since these >are the computers we're gonna use for deployment. a) Why do you want the computers to be locked? b) You can temporarily unlock the computers in at least two ways. c) We're designing some software changes over at http://wiki.laptop.org/go/Partial_key_autonomy which might make this easier for you to maintain. >3) Out of the topic question but do you know how can i change the default >page from the Browse activity? You need to edit the Browse source code here-ish: http://git.sugarlabs.org/projects/browse/repos/mainline/blobs/master/webactivity.py#line269 (i.e. search for "load_uri" in webactivity.py) >Thanks for your replies You're very welcome. Please come back with more questions! Michael ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Fwd: Customized images
Carlos Dario Isaza Zamudio::ConTi Ingeniero Electronico Proyecto Todos @l Computador Celular (57) 300 814 9308 Universidad Nacional de Colombia - Sede Manizales GNU/Linux Registered User #465475 eSSuX - Usuarios y Desarrolladores GNU/Linux UNAL Manizales -- Forwarded message -- From: Carlos Dario Isaza Zamudio Date: Mon, Jan 5, 2009 at 2:27 PM Subject: Customized images To: de...@laptop.org I have a fully customized XO and i need to take an image from it to be installed on several computers inside the project. The thing is i need it to be separated from the activity pack, like the ones you use to update via USB. Questions 1) When i take the image from this one and install it into another, will i have two computers wchi are exactly the same? 2) In order to do this process does it have to be into a "unblocked" XO or with developer key? Because if that's the case, i can't do it since these are the computers we're gonna use for deployment. 3) Out of the topic question but do you know how can i change the default page from the Browse activity? I did change the index.html file in /home/olpc/.library_pages/ and set it to redirect to the portal page, but i dont like this "solution". Thanks for your repplies Carlos Dario Isaza Zamudio::ConTi Ingeniero Electronico Proyecto Todos @l Computador Celular (57) 300 814 9308 Universidad Nacional de Colombia - Sede Manizales GNU/Linux Registered User #465475 eSSuX - Usuarios y Desarrolladores GNU/Linux UNAL Manizales ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel
Customized images
I have a fully customized XO and i need to take an image from it to be installed on several computers inside the project. The thing is i need it to be separated from the activity pack, like the ones you use to update via USB. Questions 1) When i take the image from this one and install it into another, will i have two computers wchi are exactly the same? 2) In order to do this process does it have to be into a "unblocked" XO or with developer key? Because if that's the case, i can't do it since these are the computers we're gonna use for deployment. 3) Out of the topic question but do you know how can i change the default page from the Browse activity? I did change the index.html file in /home/olpc/.library_pages/ and set it to redirect to the portal page, but i dont like this "solution". Thanks for your repplies Carlos Dario Isaza Zamudio::ConTi Ingeniero Electronico Proyecto Todos @l Computador Celular (57) 300 814 9308 Universidad Nacional de Colombia - Sede Manizales GNU/Linux Registered User #465475 eSSuX - Usuarios y Desarrolladores GNU/Linux UNAL Manizales ___ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel