I need to correct myself:
(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.
(2) Once said pair is used, the three magic variables, $http_server:$http_port and $install_source_directory, work as anticipated.
So, James, there is no need to waste your time to double check these. Apologies for the false alarm!
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 (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...
Regards,
-- Zack
That's very odd, these work fine for me when using the master branch which should not be that divergent from the release24 branch currently. I'm going to be merging the signature branch in with master and release24 soon, and that branch definitely seems to work great with Ubuntu, so I'll double check for this popping up at that time.
Hi,
On Tue, Nov 13, 2012 at 2:27 PM, Zack Perry zack.perry@sbcglobal.netwrote:
I need to correct myself:
(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.
(2) Once said pair is used, the three magic variables, $http_server:$http_port and $install_source_directory, work as anticipated.
So, James, there is no need to waste your time to double check these. Apologies for the false alarm!
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"
(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...
Try 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,
Andrew
Regards,
-- Zack
That's very odd, these work fine for me when using the master branch which should not be that divergent from the release24 branch currently. I'm going to be merging the signature branch in with master and release24 soon, and that branch definitely seems to work great with Ubuntu, so I'll double check for this popping up at that time.
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%C2%A0and 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
On Tue, Nov 13, 2012 at 10:49 PM, Zack Perry zack.perry@sbcglobal.netwrote:
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.
Another user recently pointed me towards this github repo:
https://github.com/jtopjian/cobbler-admin
I haven't gone through all of it, but there might be more items in there that might help you out. Specifically, there are some snippets to do static networking, which I was actually working on separately from this.
I've also merged my signature branch into my master repo on github:
https://github.com/jimi1283/cobbler
This is the branch I have been using to primarily test out ubuntu support, and I have done 12.04 and 12.10 successfully with it. So if you're comfortable with installing from source or if you have another system you could install it on for testing, you might want to give it a test.
Hi James,[...] Indeed! This follow-up is cc-ed to James.
Another user recently pointed me towards this github repo: https://github.com/jtopjian/cobbler-admin
I haven't gone through all of it, but there might be more items in there that might help you out. Specifically, there are some snippets to do static networking, which I was actually working on separately from this.Thanks for the pointer. I took a quick look of his snippets. Yes. The overall approach is very similar to what I came up: let the DHCP server do whatever it wants, and use the preseed/late-command to do what "we" want. After all, Cheetah engine will do templating for us, and cobbler has a light-weight built-in configuration management capability. But this user's approach is more sophisticated. I will study it more.
I've also merged my signature branch into my master repo on github: https://github.com/jimi1283/cobbler
This is the branch I have been using to primarily test out ubuntu support, and I have done 12.04 and 12.10 successfully with it. So if you're comfortable with installing from source or if you have another system you could install it on for testing, you might want to give it a test. Sure. In this week, let me see how far I can go with the 2.4.0 from epel-testing in my evenings. After that, I will switch to yours. One thing that I feel sorely missing: the ability to log a Ubuntu installation progress like what anamon does for RH alike systems. Sure, Alt-F4 allows me to watch the log on the fly, but that's not so convenient when things scrolling by rapidly. Also, after the first post-install reboot, there are no traces left. If there are ways to generate and save logs for Ubuntu install, I would love to have a pointer or two. Best Regards, -- Zack
Hi,
On Wed, Nov 14, 2012 at 9:03 AM, Zack Perry zack.perry@sbcglobal.netwrote:
Hi James,
[...]
Indeed! This follow-up is cc-ed to James.
Another user recently pointed me towards this github repo:
https://github.com/jtopjian/cobbler-admin
I haven't gone through all of it, but there might be more items in there that might help you out. Specifically, there are some snippets to do static networking, which I was actually working on separately from this.
Thanks for the pointer. I took a quick look of his snippets.
Yes. The overall approach is very similar to what I came up: let the DHCP server do whatever it wants, and use the preseed/late-command to do what "we" want.
After all, Cheetah engine will do templating for us, and cobbler has a light-weight built-in configuration management capability.
But this user's approach is more sophisticated. I will study it more.
We have built some Debian/Ubuntu snippets here locally but there is some hard coded entries currently so we haven't released them publicly.
Be wary when he says that the RAID and LVM stuff is broken in preseed. It really isn't broken, it just takes some getting used to. I've written a bit about dealing with partman (Shameless plug) on my blog (http://bit.ly/ZKBkdJand http://bit.ly/SYoSHe) if you need some examples on how to use some of the advanced features disk features.
I've also merged my signature branch into my master repo on github:
https://github.com/jimi1283/cobbler
This is the branch I have been using to primarily test out ubuntu support, and I have done 12.04 and 12.10 successfully with it. So if you're comfortable with installing from source or if you have another system you could install it on for testing, you might want to give it a test.
Sure. In this week, let me see how far I can go with the 2.4.0 from epel-testing in my evenings. After that, I will switch to yours.
One thing that I feel sorely missing: the ability to log a Ubuntu installation progress like what anamon does for RH alike systems.
Sure, Alt-F4 allows me to watch the log on the fly, but that's not so convenient when things scrolling by rapidly. Also, after the first post-install reboot, there are no traces left. If there are ways to generate and save logs for Ubuntu install, I would love to have a pointer or two.
The logs are saved in /var/log/installer on the newly installed system so that you can view them after the installation.
Regards,
Andrew
Best Regards,
-- Zack
Hi Andrew, We have built some Debian/Ubuntu snippets here locally but there is some hard coded entries currently so we haven't released them publicly.
Be wary when he says that the RAID and LVM stuff is broken in preseed. It really isn't broken, it just takes some getting used to. I've written a bit about dealing with partman (Shameless plug) on my blog (http://bit.ly/ZKBkdJ and http://bit.ly/SYoSHe) if you need some examples on how to use some of the advanced features disk features.Thanks for the great blogs. Well written, clear, and understandable.
[...]
The logs are saved in /var/log/installer on the newly installed system so that you can view them after the installation. Again, thanks for the tip. Now it's much better. Look at busybox's command list http://www.busybox.net/downloads/BusyBox.html, upon seeing the nc command, my eyes lit up ;-) There should be a way to transfer the log during installation to the cobbler server or any other server in a streaming fashion - a basis for building something like anamon for RH alike systems. Comments to the above idea welcome. I need to get to know about Debian installer to see if there is a way to cook up something ...
Regards, Andrew
Best, -- Zack
cobbler@lists.fedorahosted.org