Diff for "Installation/LocalNet"


Differences between revisions 7 and 8
Revision 7 as of 2005-07-01 21:38:12
Size: 7211
Editor: cpc2-cdif2-3-1-cust41
Comment:
Revision 8 as of 2005-07-26 02:28:06
Size: 7915
Editor: pool-71-241-131-215
Comment: adding more pxe information
Deletions are marked like this. Additions are marked like this.
Line 88: Line 88:

note: The DHCP server can't pass it, but pretending that the MAC address of your wireless card is 12:CD:56:AB:78:EF you can specify a custom pxelinux.cfg/01-12-cd-56-ab-78-ef (lowercase) instead. It is also possible to use an alphanumeric value that represents the MAC address on a model-specific basis - but I am unaware as to how the conversion works. Basically, say you have three wireless cards where the MAC id translated to caf12d5e, caf12d6b, caf124ea, you could specify pxelinux.cfg/caf12d and pxelinux.cfg/caf12. The first two would match to the first config file and the third would match to the second config file. I'll update on exactly how this works when I figure it out for myself. ~~~

LocalNetInstall

This is a work in progress. It is also a mix of Basic Internet Install and Local Net Install that are similar to just installing from the CD, and Hands Off Install that uses a preseed file to automate the whole thing.

sahara is the server. shaz is the blank box that I am trying to install Hoary on.

  1. Install Trivial File Transfer Protocol server (The default install uses inetd to run tftpd when a connection is made, so don't try to start it manualy.)

    root@sahara:/ # apt-get install tftpd-hpa
  2. Mount the CD (media or image) under the tftpboot dir

    root@sahara:/var/lib/tftpboot # mkdir ubuntu
    root@sahara:/var/lib/tftpboot # mount -o loop /var/lib/tftpboot/ubuntu-5.04-install-i386.iso /var/lib/tftpboot/ubuntu
  3. Setup Apache

    root@sahara:~ # apt-get install apache2
  4. Make a symlink from apache's doc Root to the CD

    root@sahara:/var/www # ln -s /var/lib/tftpboot/ubuntu/
  5. Install dhcp server.

    root@sahara:~ # apt-get install dhcp3-server
  6. Set the dhcp server to tell the clients what to boot. I added a default host name, you don't need it but it comes in handy for other things.

    root@sahara:~ # cat /etc/dhcp3/dhcpd.conf
    ping-check = 1;
    filename="pxelinux.0";
    subnet 192.168.1.0  netmask 255.255.255.0 {
            range 192.168.1.10 192.168.1.254;
             }
    
    root@sahara:~ # /etc/init.d/dhcp3-server restart
    Stopping DHCP server: dhcpd3.
    Starting DHCP server: dhcpd3.
    I #'ed out the DNS - routers to make sure the install didn't figure out how to pull files from the net.
  7. Boot up the client box, config the bios to net boot and you should get the Ubuntu Hoary screen and Boot: prompt. Yippee!

The above steps should give you an interactive setup.

At this point in time my goal has shifted from a typical install like if you just booted from CD to a Hands Off Install where all the questions have been answered and fed to the installer as preseed. I may get back to the interactive setup, but for now I am focused on using preseed.cfg.


My configs to make a Hands Off Install that does not pull anything from the internet.

Right now a handfull of preseed options need to be passed via kernel options. The kernel only supports 255 chars, so things are cramped. To accomodate this, I dumped some of the paths and made symlinks. That gave me just enough space for now. Note that the path/name of the kernel gets appended, so even trimming that helped.

{{{root@sahara:/var/lib/tftpboot # ln -s ubuntu-installer/i386/initrd.gz root@sahara:/var/lib/tftpboot # ln -s ubuntu-installer/i386/linux}}}

/var/lib/tftpboot/pxelinux.cfg/default

# pxelinux.cfg/default

# display u0buntu-installer/i386/boot-screens/syslinux.txt

default menu
prompt 1
timeout 150
ontimeout boothd

label menu
# makes a menu out of this file, allows editing the options on the client
        kernel menu.c32

label boothd
        # boot from the first HD
        # (this is what happens if nothing is pressed for 15 seconds)
        localboot 0

label ubuntu-breezy-normal
# ubuntu instaler
        kernel ubuntu-breezy/linux
        append vga=normal initrd=ubuntu-breezy/initrd.gz ramdisk_size=14984 root=/dev/rd/0 rw  --

label ubuntu-breezy-hands-off
# ubuntu instaler
        kernel ubuntu-breezy/linux
        append initrd=ubuntu-breezy/initrd.gz ramdisk_size=14984 root=/dev/rd/0 rw preseed/locale=en_US kbd-chooser/method=us netcfg/wireless_wep= netcfg/choose_interface=eth1 netcfg/get_hostname= preseed/url=http://192.168.1.7/preseed-breezy.cfg vga=6 --

netcfg/get_hostname= Is blank so that it will pick up the host-name supplied by the DHCP server.

netcfg/choose_interface=eth1 - for laptops, I want it to setup the wifi card, not the wired port. Problem I am having is that some use eth1 and some wlan0. What would be great is if the DHCP server could somehow pass this too.

note: The DHCP server can't pass it, but pretending that the MAC address of your wireless card is 12:CD:56:AB:78:EF you can specify a custom pxelinux.cfg/01-12-cd-56-ab-78-ef (lowercase) instead. It is also possible to use an alphanumeric value that represents the MAC address on a model-specific basis - but I am unaware as to how the conversion works. Basically, say you have three wireless cards where the MAC id translated to caf12d5e, caf12d6b, caf124ea, you could specify pxelinux.cfg/caf12d and pxelinux.cfg/caf12. The first two would match to the first config file and the third would match to the second config file. I'll update on exactly how this works when I figure it out for myself. ~~~

note: this is from my new breezy installer, everything else on this page was from hoary.

Using http://archive.ubuntu.com/ubuntu/dists/hoary/main/installer-i386/current/doc/manual/en/apcs01.html saved to /var/www/preseed.cfg, here are the important changes:

d-i     mirror/country          string enter information manually
d-i     mirror/http/hostname    string 192.168.1.22
d-i     mirror/http/directory   string /ubuntu
d-i     mirror/suite            string hoary
d-i     mirror/http/proxy       string 

Here is my current dhcpd.conf

ping-check = 1;
log-facility local7;

option domain-name "sahara.net";
option time-servers  192.168.1.1;
option broadcast-address 192.168.1.255;

option domain-name-servers 63.240.76.4, 204.127.198.4;
option routers  192.168.1.1;

subnet 192.168.1.0  netmask 255.255.255.0 {
        range 192.168.1.10 192.168.1.254;
         }

# Hoary test boxes
group {
        filename="pxelinux.0" ;
        
        # 192.168.1.2 does not exist on my lan.
        # I am setting it like this to make sure the box doesn't find
        # a repo on the net to pull sources from.
        # It would be good I can figure out how to i
        #  limit these setting to the install phase 
        #  (including the 2nd part after the reboot )
        
        option domain-name-servers 192.168.1.2 ;
        option routers 192.168.1.2 ;

        host dwl650p { 
                hardware ethernet 00:05:5d:5a:81:f0 ; 
                option host-name "dwl650p" ; }
        
        # tsp2 6100 - a=wired, b=wifi
        host tsp2a { 
                hardware ethernet 00:00:39:fa:ff:f3 ;
                option host-name "tsp2a" ; }
        
        host tsp2b { 
                hardware ethernet 00:02:2d:b0:c8:6c ;
                option host-name "tsp2b" ; }

        host tsp1 { 
                hardware ethernet 00:00:39:88:31:a6 ; 
                option host-name "tsp1" ; }

        host e400 { 

                hardware ethernet 00:60:08:b0:62:0d ; 
                # fixed-address 192.168.1.181 ;
                option host-name "e400" ; }

       }


If your box doesn't have the option to boot from lan (like one of mine) you can make a boot disk that will do that part.

http://etherboot.sourceforge.net

I am pleased to say that I was able to read, download, build, run, make the floppy in under 30 min.

"Etherboot does not (yet) offer support for PCMCIA cards." so the older laptops will have to wait.


Pile of PXE related links: http://freshmeat.net/projects/syslinux/

http://syslinux.zytor.com/memdisk.php

http://support.3com.com/infodeli/tools/nic/mba.htm New Universal NDIS Driver for DOS

http://www.qualystem.com/en/dualboot.html

http://unattended.sourceforge.net/step-by-step.php

http://unattended.sourceforge.net/advanced.php#pxe

http://syslinux.zytor.com/archives/2003-June/002185.html

http://www.intel.com/design/network/drivers/int21143.htm

http://www.tux.org/pub/distributions/tinylinux/tomsrtbt/

http://www.winimage.com/winimage.htm

http://www.weird-solutions.com/docs/pxe_booting.pdf

http://www.weird-­solutions.com/bin/util/tftp_root.zip

http://marc.herbert.free.fr/linux/win2linstall.html Install GNU/Linux without any CD, floppy, USB-key, nor any other removable media.

http://osdev.berlios.de/netboot.html - Network-booting Your Operating System - the part I like: "...loads the GRUB, the second-stage loader, off the server."

Installation/LocalNet (last edited 2011-10-03 20:08:53 by chello084115174066)