Chinaunix首页 | 论坛 | 博客
  • 博客访问: 677965
  • 博文数量: 467
  • 博客积分: 8050
  • 博客等级: 中将
  • 技术积分: 14825
  • 用 户 组: 普通用户
  • 注册时间: 2006-09-18 11:00
文章分类

全部博文(467)

文章存档

2009年(8)

2008年(459)

分类: LINUX

2008-05-23 19:48:57

Colin Percival 最近花了几个小时更新了几年前他写的 Depenguinator(名字好酷好温肉^)。 新的 Depenguinator 2.0 可以让无论是linux新手还是 linux骨灰 将自己心爱的linux在很短的时间内不费事地顺利升级成最新版本的freebsd 7.0 。  听起来很让人激动,那就升级吧!

下面以Ubuntu为例:http://www.daemonology.net/blog/2008-01-29-depenguinator-2.0.html



Without further ado, here are the steps I needed to upgrade an Ubuntu 7.10 system to FreeBSD 7.0-RC1:

   1. Install some bits which the depenguinator needs which aren't included in the default Ubuntu install.

      apt-get install curl
      apt-get install bsdtar
      apt-get install libc6-dev
      apt-get install zlib1g-dev

   2. Download the depenguinator and verify its SHA256 hash.

      curl > depenguin-2.0.tar.gz
      sha256sum depenguin-2.0.tar.gz

      The computed SHA256 hash should be aa5d98dd3998545600f5af1d406196832ef8bea59cb022bc3a5efb303ac57cf7.
   3. Extract the depenguination code.

      tar -xzf depenguin-2.0.tar.gz
      cd depenguin-2.0

   4. Create the depenguinator configuration file.

      mv depenguinator.conf.dist depenguinator.conf
      nano depenguinator.conf

      This configuration file contains basic networking configuration parameters, so that the system can get back online after it boots into FreeBSD.
   5. Download the FreeBSD disc1 ISO image and verify its SHA256 hash (change "7.0" and "7.0-RC1" as appropriate.)

      curl > disc1.iso
      sha256sum disc1.iso

      Compare the SHA256 hash against the hash contained in the announcement signed by the FreeBSD release engineer -- we've never found any signs of Evil People deliberately tampering with release ISO images, but a few years ago there was a mirror which was corrupting ISO images due to a faulty network switch.
   6. Create the disk image. Change "7.0-RC1" to the appropriate release name, and replace ~/.ssh/authorized_keys by the path to the SSH public keys you want to be authorized to login as root.

      sh -e makeimage.sh disc1.iso 7.0-RC1 ~/.ssh/authorized_keys

   7. Turn off swapping.

      swapoff -a

   8. Write the disk image to the partition which used to contain the swap space (in my case, /dev/sda2).

      dd if=disk.img of=/dev/sda2

   9. Add FreeBSD to GRUB's list of operating systems, and set it as the default system to boot into. In my case, this meant adding

      title   FreeBSD
      root    (hd0,1)
      makeactive
      chainloader +1

      to /boot/grub/menu.lst and changing the default line to default 3.
  10. Reboot into FreeBSD.

      shutdown -r now

  11. After waiting for the system to reboot, SSH back in; FreeBSD is now running in a memory disk; so now you can slice, partition, and create file systems on the hard drive(s) and install FreeBSD however you wish.
阅读(828) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~