pxe ubuntu livecd

本文档介绍了如何通过网络启动Ubuntu 12.04 Live CD,包括设置NFS服务器、挂载Ubuntu镜像、配置Cobbler服务器等步骤。适用于希望实现无盘操作系统的用户。

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

  • http://ubuntuforums.org/showthread.php?p=12412325#post12412325
  • http://www.youtube.com/watch?v=m6aq1emO9Kc&list=UUJNtLUBnWo07Ob1fLnbD43g&index=26
阅读(51) | 评论(0) | 转发(0) |
0

上一篇:linux并口编程

下一篇:lzma inird de/compress

给主人留下些什么吧!~~
评论热议
### 关于 LiveCD 的下载与使用指南 #### 什么是 LiveCDLiveCD 是一种特殊的操作系统镜像文件,通常用于通过光盘、USB 或网络启动计算机而不需安装到硬盘。它可以用来测试操作系统、修复系统问题或运行临时环境。 --- #### 如何获取 LiveCD? 可以通过官方渠道或其他可信源下载所需的 LiveCD 镜像文件。以下是几个常见的方法: 1. **Fedora 官方网站** 如果需要 Fedora LiveCD,可以直接从其官方网站下载最新版本的 ISO 文件[^2]。链接如下: [https://getfedora.org/](https://getfedora.org/) 2. **Ubuntu 及其他 Linux 发行版官网** 对于 Ubuntu 用户,可以访问其官网并选择适合自己的 LiveCD 版本[^3]。链接如下: [https://ubuntu.com/download/desktop](https://ubuntu.com/download/desktop) 3. **第三方镜像站点** 若希望寻找更多发行版的 LiveCD 资源,可尝试以下站点: - [DistroWatch](https://distrowatch.com/) 提供了大量 Linux 发行版及其下载链接。 - [SourceForge](https://sourceforge.net/) 上也有许多社区维护的 LiveCD 项目。 --- #### LiveCD 工具介绍 `livecd-tools` 是一组专门设计用于构建基于 DNF 的 LiveCD 的工具集合[^1]。这些工具可以帮助开发者创建定制化的 LiveCD 环境。如果计划制作个人专属的 LiveCD,则可以从以下地址克隆该项目代码仓库: [https://gitcode.com/gh_mirrors/li/livecd-tools](https://gitcode.com/gh_mirrors/li/livecd-tools) 要使用 `livecd-tools` 构建 LiveCD,请按照以下命令操作: ```bash sudo dnf install livecd-tools mkdir /path/to/chroot livecd-creator --config=/path/to/config.ks --fslabel=custom-livecd --cache=/var/cache/live ``` 其中 `/path/to/config.ks` 是 Kickstart 配置文件路径,该文件定义了 LiveCD 中包含的内容和设置。 --- #### 加载 LiveCD 到 iSCSI 服务器并通过 iPXE 启动 为了更安全地保存 LiveCD 镜像,可以选择将其上传至 iSCSI 服务器,并利用 iPXE 进行远程加载和启动[^2]。具体步骤如下: 1. 将 LiveCD 镜像上传至 iSCSI 存储设备; 2. 配置 iPXE 启动脚本以指向 iSCSI 地址; 3. 设置目标机器支持 PXE 网络引导功能。 iPXE 示例配置片段: ```plaintext #!ipxe kernel http://your-server/path-to/vmlinuz ro root=UUID=<iscsi-disk-id> rd.live.image quiet splash initrd http://your-server/path-to/initrd.img boot ``` 此方式特别适用于大规模部署场景下的无介质化管理需求。 --- #### 自定义 LiveCD 环境 当默认提供的 LiveCD 不满足特殊用途时,可通过修改存储库列表来扩展软件包选项[^3]。例如,在 CentOS 或 RHEL 基础之上增加 EPEL (Extra Packages for Enterprise Linux) 支持: 编辑 kickstart 文件中的 `%packages` 部分加入额外依赖项;或者手动指定附加 YUM 源位置。 示例代码片断: ```kickstart repo --name="epel" --baseurl=http://dl.fedoraproject.org/pub/epel/$releasever/$basearch/ %packages @core vim-enhanced tree %end ``` 完成以上更改后重新执行 `livecd-creator` 即可生成更新后的映像文件。 ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值