[cobbler] Cobbler 2.4.0, Ubuntu 12.04.1 64bit server == not using local repo?

Zack Perry zack.perry at sbcglobal.net
Wed Nov 14 04:49:26 UTC 2012


Hi Andrew,
[...]

(1) PXE booting Ubuntu does need to use the {linux, initrd.gz} in netboot subdirectory. I finally dug out enough Ubuntu documentation on Ubuntu Web site to confirm what we have learned from trials and errors.


This makes sense. Perhaps the Ubuntu distro import needs to be updated to properly pull in the netboot kernel and ramdisk. 

Indeed! This follow-up is cc-ed to James.


On the other hand, I still have a few other issues with my home lab setup (where dnsmasq acts as a proxy, not authoriative DHCP server), e.g.:



(a) d-i netcfg/get_hostname string $hostname doesn't take effect. Instead, the randomly assigned device name by 2Wire 3600HGV is used

Unfortunately this is how Debian preseed currently works. See here: http://www.debian.org/releases/squeeze/example-preseed.txt and search for "hostname and domain names"
I know why now.  With Debian, I see no way of getting around it.  I can use -kopts to put a boot parameter to disable the DHCP server's network interface autoconfiguration, but in my home lab, debian-installer started prompting for IP address etc, despite the fact that I had got all these defined and getks shows such info :-( 
So, at least for me, the best option seems to use the 'Template Files' in either profile or system, together with the use of the the preseed/late_command to overwrite what the 2Wire DHCP fed to debian-installer.




(b) I am still struggling with the use of the last two snippets in the preseed file, i.e.



   [...]
    d-i preseed/late_command string chroot /target sh -c ' \   $SNIPPET('download_config_files_deb')   $SNIPPET('post_run_deb')
   '; \   $SNIPPET('kickstart_done')


Despite what I set for the 'Template Files' and rendered seed file from cobbler system getks, none of the files got into the installed system.



I will simplfy it, do more tests after work, and see if I can find a clue...


I deleted the following in the sample.sed:
   130  d-i preseed/late_command string chroot /target sh -c ' \   131  $SNIPPET('download_config_files_deb')   132  $SNIPPET('post_run_deb')   133  '; \   134  $SNIPPET('kickstart_done')
and replaced them with the following: 
d-i preseed/late_command string wget http://192.168.1.3/cblr/svc/op/template/system/nb1/path/_etc_hosts.new -O /target/etc/hosts;...
and it worked!  
Many thanks for your hints below. They are really useful! It would have taken me much longer to discover such info from Debian's manual set! 
I also found that in the bundled sample.seed, the following are potentially confusing to preseed newbies like me:
   115  # This first command is run as early as possible, just after preseeding is read.   116  # d-i preseed/early_command string [command]   117  d-i preseed/early_command string \   118  $SNIPPET('kickstart_start')   119  # This command is run immediately before the partitioner starts. It may be   120  # useful to apply dynamic partitioner preseeding that depends on the state   121  # of the disks (which may not be visible when preseed/early_command runs).   122  # d-i partman/early_command \   123  #       string debconf-set partman-auto/disk "\$(list-devices disk | head -n1)"
IMHO, they should be placed before these:
    43  # Disk Partitioning    44  # Use LVM, and wipe out anything that already exists    45  d-i partman-auto/method string lvm    46  d-i partman-lvm/device_remove_lvm boolean true    47  d-i partman-md/device_remove_md boolean true    48  d-i partman-lvm/confirm boolean true    49      50  # You can choose one of the three predefined partitioning recipes:    51  # - atomic: all files in one partition    52  # - home:   separate /home partition    53  # - multi:  separate /home, /usr, /var, and /tmp partitions    54  d-i partman-auto/choose_recipe select atomic    55      56  # This makes partman automatically partition without confirmation, provided    57  # that you told it what to do using one of the methods above.    58  d-i partman-partitioning/confirm_write_new_label boolean true    59  d-i partman/choose_partition select finish    60  d-i partman/confirm boolean true    61  d-i
 partman/confirm_nooverwrite boolean true    62      63  # If you just want to change the default filesystem from ext3 to something    64  # else, you can do that without providing a full recipe.    65  # d-i partman/default_filesystem string ext4Try substituting the 'chroot /target' with 'in-target'. Also make sure that there isn't a line break between the snippets or else they will be interpreted as a new line. Some times it also helps to download a script and place it in /target/tmp and then run in-target bash /tmp/<script.sh> so then you don't need to worry about newlines. Also, all of your SNIPPET entries should either be on a single line or have their newline characters escaped prior to templateing. For example

 d-i preseed/late_command string chroot /target sh -c ' \   $SNIPPET('download_config_files_deb') \   $SNIPPET('post_run_deb') \
   '; \   $SNIPPET('kickstart_done')
If you have access to the system while it is installing you can press Alt-F2 and get a shell or Alt-F4 to get the logging console. With the shell you can go to /var/log and look at the preseed file to see how it renders on the system. It is also useful to sometimes "break" the preseed so that the installation hangs at a certain point and run your snippets by hand to see if you receive any errors.

Regards,
AndrewBest Regards,
-- Zack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/cobbler/attachments/20121113/98887e84/attachment-0001.html>


More information about the cobbler mailing list