一、安装系统

1、硬盘安装

第一步,使用U盘引导进入PE,对目标磁盘进行格式化操作,并分33G为NTFS格式,位于磁盘的最后部分。[此部分涉及用它盘来处理母盘]

第二步,用另一个U盘拷贝硬盘安装系统所必须的文件:mini-10.10.iso以及从/casper/中提取的文件initrd.lz、linux。

第三步,利用U盘中的Grub来引导iso镜像进行硬盘安装。menu.lst的

find /linux

root (hdx,y) 注:(hdx,y) 是在find /linux命令后得出的结果。

kernel /linux iso-scan/filename=mini-10.10.iso ro quiet

initrd /initrd.gz

boot

在安装过程中会问地区,然后会友好的提供对应地区的网络镜像网站,然后从网络上下载软件包的信息,这段时间会因网络的好坏而有所不同。

第四步,分区设置/boot—150M,swap—3G,/--51.6G,/vmos--160G。

2.安装chkconfig

可以方便的实现服务在不同的开启与关闭

sudo apt-get install chkconfig

3.开启SSH

最大的目的是为了在远程调试方便、传输文件方便、使用Clonezilla方便。

sudo apt-get install ssh

4.安装vmaker GUI环境

sudo apt-get install wmaker

5.启动GUI会出现'startx' is currently not installed.

shenzhi@sz08254:/$ startx

The program 'startx' is currently not installed. You can install it by typing:

sudo apt-get install xinit

6.安装xinit

sudo apt-get install xinit

7.压缩与解压支持

增加 rar 软件压缩和解压缩支持

sudo apt-get install rar unrar

增加 zip 格式压缩和解压缩支持[此项不用做,安装完file-roller后就有了]

sudo apt-get install zip unzip

二、安装VM

2.1上传准备

在ubuntu中安装sshfs

sudo apt-get install sshfs

 

挂载当前linux系统的文件夹到ubuntu[在ubuntu中执行命令]

shenzhi@sz08254:~$ sshfs shenzhi@192.168.0.107:/home/shenzhi/vmbak /home/shenzhi/soft

我是通过ssh工具远程登录到ubuntu主机 sz08254上,然后 sshfs shenzhi@192.168.0.107:/home/shenzhi/vmbak 回访当前的Linux系统的目录,将其挂载到ubuntu主机 sz08254的目录/home/shenzhi/soft下。

 

=============sshfs 网络参考资料=============

    sshfs name@server:/path/to/folder /path/to/mount/point

    这条命令可以让你通过 SSH 加载远程主机上的文件系统为本地磁盘,前提是你需要安装 FUSE 及 sshfs 这两个软件。

    卸载的话使用 fusermount 命令:

    fusermount -u /path/to/mount/point

=============sshfs 网络参考资料=============

2.2上传文件-再生龙Clonezilla

clonezilla-disk.rar

 

2.3解压文件

unrar x clonezilla-disk.rar

2.4 ubuntu 10.10显示grub菜单

安装ubuntu10.10后,如果机器上只有一个系统,默认grub菜单是不会显示的,如果想要显示,按如下步骤操作:

1.把/etc/default/grub文件中的GRUB_HIDDEN_TIMEOUT=0的0改为大于0的数字,比如5;

2.把/etc/grub.d/30_os-prober文件中的所有set timeout=0的0改为10,如下:

adjust_timeout () {

  if [ "x${found_other_os}" = "x" ] ; then

    if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then

      if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then

verbose=

      else

verbose=" --verbose"

      fi

 

 

      if [ "x${GRUB_HIDDEN_TIMEOUT}" = "x0" ] ; then

cat <<EOF

if [ /${timeout} != -1 ]; then

  if keystatus; then

    if keystatus --shift; then

      set timeout=-1

    else

      set timeout=10

    fi

  else

    if sleep$verbose --interruptible 3 ; then

      set timeout=10

    fi

  fi

fi

EOF

      else

cat << EOF

if [ /${timeout} != -1 ]; then

  if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then

    set timeout=10

  fi

fi

EOF

      fi

    fi

  fi

}

 

 

来自:http://blog.chinaunix.net/u2/61800/showart_2371499.html

使grub的设置生效

sudo update-grub

三、设置自动脚本

[待续中……]