Automatic Preseeding oem-config on the Nexus7
Dmitrijs Ledkovs
dmitrij.ledkov at ubuntu.com
Wed Feb 20 01:36:46 UTC 2013
Dear all,
I have pushed lp:~ubuntu-nexus7/ubuntu-nexus7/preseed which allows to
automatically pressed oem-config on the nexus7 to the point where
default desktop is started fully unattended.
In short the steps are:
- extract bootconfig, kernel and initrd from daily .bootimg
- patch the preseed file into initrd image (very minimal just the
user/timezone setup adjust as needed)
- patch in wifi network settings (takes wifi.cfg or grabs currently
active network manager wifi connection)
- adjust bootconfig to include "automatic-oem-config" kernel arg
- repack initrd / recreate bootimg
At this point one can use: fastboot or usb-creator to flash stock .img
+ this modified bootimg, trigger a reboot with fastboot oem-config and
ejoy the show of oem-config getting auto-preseeded all the way through
to desktop.
All of the above is accomplished with a script "./prepare-preseed" [1]
The copying of the wifi settings is not part of
ac100-tarball-installer yet, but the patched installer can be grabbed
from lp:~xnox/ubuntu/raring/ac100-tarball-installer/wifi
While the settings file is copied across, network manager failed to
automatically connect to my wifi.
I will try different wifi hotspot in the office tomorrow and will get
ac100-tarball portion merged when it's known to work.
When wifi is working & network is established it should be fairly
trivial to preseed success_commands / hooks to install other useful
packages like openss-server, utah, etc.
I haven't look at how to reboot back into fastboot mode unattended.
But google hints that adbd (the daemon that is typically running on
the android device that responds to adb client side calls) has adb
reboot bootloader command and it should be possible to get that up and
running on the Ubuntu image. This way one will manage to do a complete
unattended redeploy cycle.
This can also be integrated as a user-facing feature: usb-creator will
be able to fully provision / customize nexus7 for the user, based on
the current desktop settings such that one doesn't need to fiddle and
answer oem-config questions.
Regards,
Dmitrijs.
[1] at first i thought to have multiple targets etc, hence I used
make. now it's there mostly to easily override download URL
More information about the Ubuntu-installer
mailing list