NM config after PXE/NFS live CD install
Sven Ulland
sveniu at opera.com
Wed Apr 10 15:31:32 UTC 2013
On 04/09/2013 03:26 PM, Daniel Manrique wrote:
>> Hi, all. How can I avoid ending up with an unconfigured
>> NetworkManager after installing Ubuntu via a PXE/NFS-booted live CD
>> image?
>
> I've been handling this with a custom success_command entry in the
> preseed. If you're remastering CDs to modify the pxelinux cfg, you
> could also add this to the CD's ubuntu.seed file.
>
> ubiquity ubiquity/success_command string \
> in-target sed -i -e 's/inet manual/inet dhcp/' /etc/network/interfaces; \
> true
Great tip, thanks! I've simply added an url=http://.../ubuntu.seed
parameter to the kernel cmdline. In that file, I first tried to figure
out how to escape things properly with:
ubiquity \
ubiquity/success_command string \
in-target sh -c "echo -e 'auto lo\niface lo inet loopback' >
/etc/network/interfaces"
..but it never seemed to run, possibly due to poor handling of the \n.
I tried escaping it with \\n, \\\n, and so on, but still no success.
It's a pain to wait for the full install to complete every time, so
debugging has been slow. I'm currently testing a silly workaround:
in-target wget -O/etc/network/interfaces http://.../interfaces_lo_only
I'll let you know how it goes. I'd rather get the echo command
working, or at least something simple that doesn't depend on fetching
a file from the outside.
Side notes:
* The preseed docs say 'preseed/url' works like 'url' on the cmdline.
That's not the case:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1167212
* Not having "d-i apt-setup/extras boolean true" (default false) and
"tasksel tasksel/first multiselect ubuntu-desktop" (default none) in
ubuntu.seed seems to have no effect on the end result, even though.
I haven't figured out why.
sven
More information about the Ubuntu-installer
mailing list