您的位置:首页 > 其它

Ubuntu for Arm根文件系统制作与SPICE安装

2014-08-28 15:28 211 查看
参考:https://wiki.ubuntu.com/ARM/RootfsFromScratch

1.安装rootstock软件

rootstock是一个用来制作Ubuntu根文件系统的工具,可以使用apt-get install rootstock获取,也可以在官网直接下载:https://launchpad.net/project-rootstock

若选择前者:直接使用rootstock命令

若选择后者:解压下载文件rootstock-0.1.99.4.tar.gz得到rootstock可执行文件,可以将其拷贝到系统bin目录下

2.rootstock创建根文件系统

sudo rootstock -f localhost --login ubuntu --password ubuntu --imagesize 1G --notarball
得到文件系统压缩文件qemu-armel-201408271515.tar.gz

创建一个空镜像:

dd if=/dev/zero of=ubuntu-arm.img bs=1MB count=0 seek=1024
在镜像上创建文件系统:

mkfs.ext4 -F ubuntu-arm.img
挂载镜像:

sudo mount -o loop ubuntu-arm.img /home/xxx/giayee
将文件系统解压到挂载目录:

sudo tar -C /home/xxx/giayee -zxf qemu-armel-201408271515.tar.gz
这时可以修改挂载目录中的东西了:

若该修改
最后是得到最后的文件系统镜像:

sudo umount /home/xxx/giayee


3.模拟器中运行根文件系统

下载模拟器qemu:

wget http://ports.ubuntu.com/ubuntu-ports/dists/lucid/main/installer-armel/current/images/versatile/netboot/vmlinuz[/code] 
在2中的“若干修改”中执行:

sudo cp $(which qemu-arm-static) /home/xxx/giayee/usr/bin/


在仿真环境中访问文件系统

sudo chroot /home/xxx/giayee /bin/bash


此时在仿真环境下就可以安装SPICE了:

安装SPICE
安装完SPICE后保存文件系统:

sudo umount /home/xxx/giayee
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐