Chinaunix首页 | 论坛 | 博客
  • 博客访问: 345605
  • 博文数量: 135
  • 博客积分: 4637
  • 博客等级: 上校
  • 技术积分: 1410
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-21 13:22
文章分类

全部博文(135)

文章存档

2013年(12)

2012年(14)

2011年(42)

2010年(22)

2009年(18)

2008年(27)

分类: LINUX

2013-08-22 11:36:02

Setting up PXE boot of Ubuntu 12.04 Live CD

INTRODUCTION

Sometimes it's nice to boot a complete operating system over a network, and not have to install to a drive or use a CD. This allows you to have diskless machines, or perform operations on an installed drive that can't be done whilst it is mounted.

This tutorial assumes you have already set up a cobbler pxe/dhcp server (see previous posts) and teaches you the final steps for adding a live ubuntu12 image. You will also need to have set up an nfs server.

Mount the ubuntu desktop image
sudo mount -o loop /my/iso/location.iso /mnt
Copy the contents (making sure to include the .disk directory) to your NFS location (this may be on another computer/server, so you may need to perform the previous step on that machine).
sudo cp -R /mnt/* /my/nfs/location/. 
sudo cp -R /mnt/.disk/ /my/nfs/location/.
Add the distro to cobbler
sudo cobbler distro add \
--name=ubuntu-desktop-32 \
--kernel=/mnt/casper/vmlinuz \ 
--initrd=/mnt/casper/initrd.lz
If it is a initrd.gz file, you may have to run this on it first:
gunzip --decompress initrd.gz
Add a profile to cobbler
sudo cobbler profile add \ 
--name=ubuntu-desktop-32 \ 
--distro=ubuntu-desktop
Sync cobbler
sudo cobbler sync
Edit the pxelinux boot menu to add a few details (link the nfs)
sudo vi /var/lib/tftpboot/pxelinux.cfg/default
Add the following details to the ubuntu deskto part of the menu, and remove any unnecessary parts.
boot=casper netboot=nfs nfsroot=192.168.1.6:/my/nfs/location

Start up your pxe client, and it should all hopefully go to plan. If it gets stuck on a message like:
Please provide a name for this Disc, such as
Then you didn't copy the hidden .disk directory from the cd correctly in the first step.

POSSIBLE PROBLEMS

Don't forget to have set up your dhcpd server correctly. I have mine set to be mac specific, so you may need to add another host like I did

REFERENCES

阅读(828) | 评论(0) | 转发(0) |
0

上一篇:linux并口编程

下一篇:lzma inird de/compress

给主人留下些什么吧!~~