制作ubuntu 14.04镜像

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了制作ubuntu 14.04镜像相关的知识,希望对你有一定的参考价值。

先以root用户登录:

技术分享

 

2.编辑以dhcp的方式获取ip

[email protected]:~# vim /etc/network/interfaces 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
[email protected]:~# 

重启除lo网卡的所有网卡

ifdown --exclude=lo -a && sudo ifup --exclude=lo -a

 

编辑/etc/ssh/sshd_config

#PermitRootLogin without-password
PermitRootLogin yes

 重启 ssh  服务

[email protected]:~# sudo service ssh restart

 

在/etc/apt/sources.list添加条目:

deb http://cn.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

 

关机,编辑xml文件

virsh edit ubuntu14.04-raw
<channel type=‘unix‘>
      <source mode=‘bind‘ path=‘/var/lib/libvirt/qemu/org.qemu.guest_agent.0.ubuntu14.04-raw.sock‘/>
      <target type=‘virtio‘ name=‘org.qemu.guest_agent.0‘/>
      <address type=‘virtio-serial‘ controller=‘0‘ bus=‘0‘ port=‘1‘/>
</channel
 

 注意:这个文件我在考虑要不要注释掉

<source mode=bind path=/var/lib/libvirt/qemu/org.qemu.guest_agent.0.ubuntu14.04-raw.sock/> 

 

安装和配置qemu-guest-agent:

[email protected]:~# sudo apt-get update
[email protected]:~# sudo apt-get install qemu-guest-agent
[email protected]:~# /etc/init.d/qemu-guest-agent start
[email protected]:~# /etc/init.d/qemu-guest-agent status
 * qemu-ga is running

 

 

 

以上是关于制作ubuntu 14.04镜像的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu14.04使用Remastersys打包整个镜像制作iso

ubuntu14.04搭建scikit-learn环境及pydev

Win7 + ubuntu14.04 双系统

tiny4412 busybox制作根文件系统rootfs nfs 挂载 ubuntu 14.04

win7下装ubuntu14.04双系统

docker镜像ubuntu:14.04内mkisofs: command not found