/srv/irclogs.ubuntu.com/2014/03/16/#ubuntu-installer.txt

legogris_Hello! I am trying to setup an automated install on 12.04 using preseeding and it just won't not crash on me right before installing the bootloader22:42
CarlFKlegogris_: what kind of crash?22:46
legogris_CarlFK: syslog: http://pastebin.com/4STvrjjR22:47
legogris_CarlFK: It tells me that the installer crashed and the it proceeds with crafting an error report to submit22:47
legogris_I have no prior experience here, but looking at the end of the syslog I think it looks like something's up with installation of language packs22:48
CarlFKoh.. is this installing from the live cd?22:48
legogris_I am using Black lab imager if you are familiar with it... It's what became of remastersys22:50
CarlFKsorry, no help.  I have been doing preseeded net installs22:53
legogris_Ah, thanks anyway!22:54
=== superm1__ is now known as superm1
legogris_CarlFK: I went with this way because it seemed like a good idea.. But do you have any ideas of better approaches of automating desktop installs?22:54
legogris_Going to have identical edubuntu installs on a couple of hundred computers that need shredding beforehand and custom packages :P22:55
CarlFKhttps://github.com/CarlFK/veyepar/blob/master/setup/nodes/pxe/README.txt22:56
legogris_CarlFK: Thanks, but sadly network does not seem lika an option for us22:58
CarlFKdo exactly that first. it is easy.  boot a box, at post hit F12 or whatever to get it to pxe boot.  let it do the install (about 30 min)  make sure it actually works as is22:58
CarlFKoh.22:58
CarlFKwhy not?22:58
legogris_Because we only have a 100/100 switch and we figured it will just take way too much time compared to using USB sticks23:01
CarlFKI seem to remember 100 being faster than installing from a CD23:03
CarlFKand I suspect most of the time is decompressing and configuring (or whatever is going on after the .deb has landed )23:04
legogris_Hmm, maybe it's worth a try. So what tool should I use to prepare the installation?23:04
CarlFK1. start with a vanallia Ubuntu box.23:05
CarlFKany flavor from the last 5 years.23:05
CarlFKthat just hosts the dhcp and pxe server23:05
CarlFKer.. pxe server = tftp and squid23:05
CarlFKI only run that script once a year, maybe twice23:06
CarlFKYou should have the first full install in 30  - 45 min, and most of that time will be watching the "installing packages" progress bar23:08
legogris_Oh, so it will make clones of the system running the server?23:08
CarlFKno.23:10
CarlFKhttps://github.com/CarlFK/veyepar/blob/master/setup/nodes/pxe/shaz/var/www/d-i/oneiric/preseed_local.cfg23:11
CarlFKthat should look familiar ;)23:11
legogris_indeed!23:11
CarlFKbtw, setup the server on a throw away box.23:13
CarlFKnot your current production server23:13
legogris_of course :)23:13
CarlFKsudo ./install.sh23:15
CarlFKthat will install/config the server.23:15
CarlFKhmm23:16
CarlFKhows your networking skills?23:16
legogris_I guess it's a similar approach to this but with a different setup and using puppet here? http://www.colinmcnamara.com/setting-up-cobbler-pxe-auto-deployment-for-ubuntu-server-12-04-precise/23:17
CarlFK6. disconnect from primary lan ... that's not completely true.  it needs to be a gateway/router to the internet23:17
legogris_Ah, we don't have internet23:17
legogris_Which makes it a bit of a hassle because no packages can be fetched from internet23:18
CarlFKbummer23:18
CarlFKso.. something I have done a total of 2 times: setup the server where you do have net, install one node (target box) and then drop this in squid.conf:23:20
CarlFK"offline_mode" : http://www.squid-cache.org/Doc/config/offline_mode/23:20
CarlFKhmm23:20
CarlFKer, offline_mode=on I guess23:21
CarlFKanyway, it won't call out looking to see if there are updates, it will just use what is in the cache23:21
CarlFKbut we are getting kinda thin now23:22
legogris_so i setup one node where i have net access and then the server will cache the stuff needed? Sounds doable ^^23:24
CarlFKthat's the plan23:24
CarlFKbut..23:24
CarlFKyou are going to want to do a few test installs23:25
CarlFKlike I am guessing you want saucy or trusty23:25
legogris_Nah, we'll go for LTS23:25
CarlFKisn't trusty lts?23:25
legogris_Oh, you're right :)23:26
legogris_But anyway, 12.04 is what we've been rolling with so far so I think that's what will happen23:27
legogris_Most of them won't see internet for years, if ever, anyway23:27
CarlFKis that presice ?23:27
legogris_Yes23:27
CarlFKgood.  you get that out of the box :D23:28
CarlFKhttps://github.com/CarlFK/veyepar/blob/master/setup/nodes/pxe/install.sh#L9523:28
CarlFKshaz/root/bin/getu.sh precise amd6423:28
CarlFKthat gets the precise installer23:29
CarlFKwhen you pxe boot a node, you will get a menu, very much like grub's23:30
CarlFKthis drives that menu:23:30
CarlFKhttps://github.com/CarlFK/veyepar/blob/master/setup/nodes/pxe/shaz/var/lib/tftpboot/pxelinux.cfg/default#L1623:30
CarlFKdefault ubuntu-oneiric-amd64-handsoff23:30
CarlFKappend initrd=ubuntu/precise/amd64/initrd.gz root=/dev/rd/0 rw auto=true netcfg/wireless_wep= interface=auto hostname= DEBCONF_DEBUG=5 url=shaz --23:31
legogris_Ah23:31
legogris_So I basically clone the repo and replace the preseed file with what I want?23:31
CarlFKurl=shaz is what tells the installer to go look for https://github.com/CarlFK/veyepar/blob/master/setup/nodes/pxe/shaz/var/www/d-i/oneiric/preseed.cfg23:32
CarlFKno - shaz/root/bin/getu.sh precise amd64 just wgets these 2 files:23:32
CarlFKhttp://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/23:34
CarlFKlinux and initrd.gz23:34
CarlFKpxe boot a node, those two files get served over tftp to the node, and the kernel gets booted with the above parameters23:36
legogris_I'm actually still quite not sure how I should customize my installation. I've never even successfully remastered an iso yet23:37
CarlFKlol23:38
legogris_That was my problem when I joined the channel, remember :D23:38
CarlFKI tried to do an iso.  I am not sure I ever got something close to working23:38
legogris_So much outdated an contraducting info everywhere online.. If I ever get this working, first thing I'm doing is a blog post about it :P23:39
CarlFKfor a long time I would extract the .deb files from the iso onto the file server and use it like a repo23:39
CarlFKwell.. long time .. make that a long time ago when I first got started with automated installs23:39
CarlFKI love what I have now.  the pxe/preseed is pretty standard and supported23:40
CarlFKand the late_command hook that calls a honken shell script that can do whatever is needed (assuming I can figure  out how to script it)23:41
CarlFKlucky for you I advise throwing out my late.sh script. write your own from scratch if you need to.23:41
legogris_hehe :)23:42
legogris_Thanks for all the advice! I hope I can wrap my head around it and get it working23:42
CarlFKlet me give you a quick run though:23:43
CarlFKoh yeah.. getting a node to pxe boot can be a task23:43
CarlFKoften you need to go into the bios to enable the network card (chips) boot rom23:43
CarlFKwhich means figuring out how to get into bios.  on random boxes... that can take 10 min of boot/hit random keys23:44
CarlFKanyway... one you get it to say "pxe... waiting for dhcp.. "23:44
CarlFKthat is the nic's boot rom which has a full dhcp client and IP stack.  it sends a dhcp request to the lan, the dhcp server responds with an IP/netmask/gatewy (nothing new) and "server=1.2.3.4, filename=something"23:46
CarlFKbootrom code has a tftp client (t=trivial=small = fits in a little rom I guess)23:47
CarlFKit does a connect 1.2.3.4 GET someting; and executes it.23:47
CarlFKthat is kinda like "bios loads boot sector from first hard disk and executes it"23:47
legogris_with you so far :)23:48
CarlFKsomething can be about anything you would expect to boot from boot media.  like grub, or memtest..23:48
CarlFKor something that turns around a gets a menu of more boot options23:48
CarlFKalso, if you have a dhcp server, here is all you need to do to it:23:49
CarlFKhttps://github.com/CarlFK/veyepar/blob/master/setup/nodes/pxe/shaz/etc/dhcp/dhcpd-pxe.conf23:49
CarlFKfilename "pxelinux.0" ;23:49
CarlFKnext-server pc8 ;23:50
CarlFKwhere pc8 is where the boot rom will ftp to, and everything else can be on that box, so you don't need to clutter up your production dhcp server23:50
CarlFKand everyting can be on one lan.23:50
CarlFKanyway...23:50
CarlFKhttps://github.com/CarlFK/veyepar/blob/master/setup/nodes/pxe/install.sh#L3323:51
CarlFKapt-get --force-yes --assume-yes install ... syslinux23:52
CarlFKthat installs /usr/lib/syslinux/pxelinux.023:52
CarlFKand hhttps://github.com/CarlFK/veyepar/blob/master/setup/nodes/pxe/install.sh#L77 moves it into place so the tftp server can serve it up23:53
CarlFKhmm.. I am making a guess now.. I guess it is hardcoded to go back to the server and get23:55
CarlFKhttps://github.com/CarlFK/veyepar/blob/master/setup/nodes/pxe/shaz/var/lib/tftpboot/pxelinux.cfg/default23:55
CarlFKreading the comments, I guess the normal behavior is to sit at a boot: prompt23:56
CarlFKbut I tell it to time out after 1.5 seconds and...23:56
CarlFK# label to use if the user hits Enter  ... UI menu23:57
CarlFKlabel menukernel syslinux/menu.c3223:58
CarlFKwow, I thought I cleaned out all those boot options :p23:58
legogris_hehe23:58
CarlFKsyslinux/menu.c32 gets loaded, which makes a nice menu out of all the options .. so you can arrow up and down and hit Tab to edit kernel params23:59

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!