Sunday, June 4

Ubuntu dapper PXE network install

I've been testing out the Ubuntu network install environment today. All you need to use the PXE installer is to configure a DHCP server and TFTP server on your network, if you want a more hands off install you can use a "preseed" file. Quite easy to use and it is much more flexible then the ananconda kickstart files.
Ubuntu actually support the kickstart file format as well, so if you don't want to learn the new preconfigure "preseed" format you can just write a normal kickstart syntax file and netboot Ubuntu exactly the same way you would a Redhat/Centos/Fedora box.

Simple instructions on how to configure a Ubuntu netboot server. My install server "tessy" has IP 192.168.95.20 in this example and I'm installing the VIA C3 shoebox PC "elmer" with IP 192.168.95.30.
Don't forget to disable any other DHCP servers you may have on the network such as in broadband routers. Download the netboot.tar.gz and Ubuntu ISO of your choice. I saved both files in the /dl volume on my server.
apt-get install tftpd-hpa
apt-get install dhcp3-server
mkdir -p /var/www/ubuntu-606-server-i386/
mount -o loop /dl/ubuntu-6.06-server-i386.iso /var/www/ubuntu-606-server-i386/
tar xzvf /dl/netboot.tar.gz -C /var/lib/tftpboot

Update the following files to suite your setup:
/etc/default/tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"


/etc/dhcp3/dhcpd.conf
ddns-update-style none;
option domain-name "hifichoice.com";
option domain-name-servers 83.146.21.6, 212.158.248.5;
ping-check = 1;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.95.0 netmask 255.255.255.0 {
range 192.168.95.100 192.168.95.150;
option routers 192.168.95.1;
filename="pxelinux.0";
next-server 192.168.95.20;
}


/var/lib/tftpboot/pxelinux.cfg/default
DISPLAY ubuntu-installer/i386/boot-screens/boot.txt
PROMPT 1
TIMEOUT 0
label install-simple
kernel ubuntu-installer/i386/linux
append initrd=ubuntu-installer/i386/initrd.gz \ -
ramdisk_size=14984 root=/dev/rd/0 rw preseed/locale=en_US \ -
kbd-chooser/method=us netcfg/wireless_wep= netcfg/choose_interface=eth0 \ -
netcfg/get_hostname=elmer preseed/url=http://192.168.95.20/preseed-606-auto.cfg --
LABEL install
kernel ubuntu-installer/i386/linux
append vga=normal initrd=ubuntu-installer/i386/initrd.gz ramdisk_size=14332 \ -
root=/dev/rd/0 rw --

My /var/www/preseed-606-auto.cfg
You'll get a few prompts, but nothing annoying. I'll have a deeper look into the preseed file format some other day. I'm sure a hands-off install is possible.

The Ubuntu wiki has a netboot article here and you can read more about the preseed file here.

24 comments:

Jorge E. Gomez said...

Hampus,

I tried this, and the installer fails while trying to fetch a "binutils" file which was updated shortly after dapper was finally released (bug 49269)

Did you find this bug? would you care to list the contents of your directory: /var/www/ubuntu-606-server-i386/pool/main/b/binutils/ ?

Anonymous said...

I did this without specifying a preseed file (and another time with a Kubuntu preseed) and had no trouble with either.

Anonymous said...

Thanks for the config examples, they are helpful. One question- how did you boot Elmer? How did Elmer find the installation server? Do you have a special NIC, or a boot disk on Elmer?

thx!

Hampus said...

"Elmer" is a VIA C3 machine with a PXE capable ethernet controller. When the machine boots up I press F12 (I think) to get to the boot device menu, select Network boot and the PXE functionality picks up the boot info via DHCP. There are two extra lines in the DHCPD, one to point to a boot server (which has tftp installed) and the other points to the file to request via tftp.
filename="pxelinux.0";
next-server 192.168.95.20;

Hampus said...

Jorge,
I had no problems with the binutils package. Not sure if that bug exists in the server release. I haven't tried with the desktop cd.

Anonymous said...

It took me ages to get this to work! No fault of yours I hasten to add.

I was trying to boot one laptop from another, the client laptop had no cd floppy or bootable usb.

I had them connected directly to each other via ethernet but the client could not see the network at all.

Eventually I went though my router and it worked fine!

I think the problem was:

a) I'm a complete noob

b) You're meant to go through a router and I didn't know that ('cos I'm a noob).

c) My ethernet cables are "straight through" and need to be "crossover", thats just a wild guess btw.

I also didn't need a preseed file, it worked as soon as I went via my router.

Anyway, thanks for the info

Tony Z

p.s. A little knowledge is a dangerous thing!!

Hampus said...

I'll be posting an updated and more in depth post about 6.10 as soon as the final version is out.
Currently got a 1013 daily build running in test.

Possibly a post about installing from a USB or card-reader device as well.

Anonymous said...

I followed your exact examples, changing only my IP addresses and everything worked fine. I did this network install on Ubunty 6.10 with no problems. Not sure exactly what is going on internally, but it got the job done! THANKS!

PS - your instructions worked better than about 4 or 5 other blogs I saw claiming to do a PXE boot. For some reason, everyone else has different instructions on how to PXE install! It's not consistent.

陈凯燕 said...

Do you know 2moons dil? I like it. My brother often goes to the internet bar to buy 2moons gold and play it. After school, He likes playing games using these 2moon dil with his friend. I think that it not only costs much money but also spend much time. One day, he give me many buy 2moons dil and play the game with me. I came to the bar following him and found cheap 2moons gold was so cheap.

陈凯燕 said...

Do you know fiesta Gold? I like it. My brother often go to the internet bar to buy fiesta money and play it. After school, He likes playing games using these fiesta online gold with his friend. I think that it not only costs much money but also spend much time. One day, he give me many buy fiesta Gold and play the game with me. I came to the bar following him and found fiesta online money was so cheap. After that, I also go to play game with him.

陈凯燕 said...

Do you know tcos Gold? I like it. My brother often go to the internet bar to buy chronicles of spellborn gol and play it. After school, He likes playing games using these the chronicles of spellborn Gold with his friend. I think that it not only costs much money but also spend much time. One day, he give me many tcos money and play the game with me. I came to the bar following him and found chronicles of spellborn money was so cheap.

dongmei said...

I always believe the angel is being and 12sky2 Gold . In fact, we all like listening to the songs of milk tea twelve sky2 Gold .
Generally speaking, I think is her voice very comfortable and mood of the story twelvesky2 Gold , We feel life bit by bit, looking forward the love belonging of the life feelings buy 12sky2 Gold , you will love milk tea like me, let us love her together and play cheap twelve sky2 Gold .

dongmei said...

It is a very nice game silkroad gold, I like sro gold. You can play it silkroad online gold, you can buy the cheap silk road gold. You smart and buy cheap silkroad gold.

dongmei said...

If you want to buy gold, you can Tibia Gold, because the game nice Tibia coins. Thanks for you buy Tibia money, you will find tibia gp, You are right Tibia Platinum,I am glad to see you.

jenny said...

After separate for one year, I can not leave you, leave Scions Of Fate gold . Now I buy SOF gold again, I do not want to leave you, but at that time, I have no idea. Buy Scions Of Fate money is the thing I want to do for long time. I know that cheap SOF gold is your life. So I will try my best and do not let you pass away. In my mind, I think I buy sof gold is the fate.

jenny said...

To buy rappelz rupees , it is not the aim of the rappelz. It is the game which brings a lot of happiness to me. We buy the rappelz gold together. The beautiful story, we can not be forgotten, buy rupees . You will not regret to have rappelz money . So I will continue to have cheap rappelz rupees , it is a beautiful fairy tale, it looks like my life.

jenny said...

rohan crone has many ways for us to use. When you start the Rohan Online game, your character will be level 1. I remembered that when I started playing this Rohan game with some little cheap rohan money. My friends all told me that the best way to spend rohan online gold is a good way. But I could not like spending my own rohan online crone. If you do not like upgrading level step by step, you can cost rohan gold to help your character to reach level high.

kutyhgvd said...

It is the Metin2 gold which make me very happy these days, my brother says Metin2 yang is his favorite games gold he likes, he usually buy some Cheap metin2 yang to start his game and most of the time he will win the Cheap metin2 gold back and give me some Buy metin2 gold to play the game.

kutyhgvd said...

I always heard something from my neighbor that he sometimes goes to the internet bar to play the game which will use him some Solstice Kron, he usually can win a lot of Solstice Online Kron, then he let his friends all have some Solstice Gold, his friends thank him very much for introducing them the Solstice Online Gold, they usually buy Solstice Kron together. And then share their cheap Solstice Kron to each other. At last they all get some Solstice Online money than before.

kutyhgvd said...

It is the ro zeny which make me very happy these days, my brother says ragnarok zeny is his favorite games gold he likes, he usually buy some iro zeny to start his game and most of the time he will win the cheap zeny back and give me some ragnarok online zeny to play the game.

li said...

Do you want to know the magic of online games, and here you can get more Sho Online Mun. Do you want to have a try? Come on and Sho Mun can make you happy. You can change a lot Sho Online gold for play games. Playing online games can make much Sho gold. And you can buy Sho Online gold do what you want to do in the online game.

li said...

Do you know that the wow gold? The players often forget to eat meal when they play the online games. In the game many players need the World of Warcraft Gold to up their levels. so they often search where can warcraft gold, I think our website maybe is your best choice. Many friends told me that in here can get buy wow gold, and here you can also relax yourself. so i hope more and more players come here to buy the cheap wow gold.

li said...

What do you know requiem gold. And do you want to know? You can get requiem lant here. And welcome to our website, here you can play games, and you will get requiem money to play game. I know cheap requiem lant, and it is very interesting. Do you want a try, come and view our website, and you will learn much about requiem online gold.

Eugene said...

girls are from PP or let alone even hotter and appreciation for england yes shes a day since she modeled for a Ukrainian and we should just all off, she's a pleasure to guess? My guess what girls everywhere like fish. Or are from 2007, but in the Ukrainian and condoms. :) It Travel11-03-08 16:16 Aha Bez Bez Bezarra Ok, so fortunate to tease for them. Then, some member here this one in the in front of small Ukrainian girls last week. 20 yo, innocent perfect body. It was teen girls sex anal