Depenguinate Ubuntu 7.10

Yesterday, blog contained an interesting article.

My ThinkPad T43P (2668-H2U) has

Firmware: 1YHT26WW-1.03 is currently running Ubuntu 7.10, but once had FreeBSD 6.2-Stable. I feel almost embarrassed to admit this, but all the hype made me do it! 😉

swinful@thinkpad> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"

Depenguinate to FreeBSD

Thanks to Colin Percival, the Depeguinator will need the following dependencies installed on Linux if they are not already:

swinful@thinkpad> sudo aptitude install curl bsdtar libc6-dev zliblg-dev
[sudo] password for swinful:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
Couldn't find any package whose name or description matched "zliblg-dev"
The following NEW packages will be installed:
  bsdtar
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 95.1kB of archives. After unpacking 225kB will be used.
Writing extended state information... Done
Get:1 http://us.archive.ubuntu.com gutsy/universe bsdtar 2.2.4-1 [95.1kB]
Fetched 95.1kB in 0s (115kB/s)
...edited...
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Building tag database... Done
11.236u 5.196s 0:30.44 53.9%    0+0k 0+0io 392pf+0w

Download, verify, extract the Depeguinator

 swinful@thinkpad> curl http://www.daemonology.net/depenguinator/depenguin-2.0.tar.gz > depenguin-2.0.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  912k  100  912k    0     0   292k      0  0:00:03  0:00:03 --:--:--  317k
swinful@thinkpad> sha256sum depenguin-2.0.tar.gz
aa5d98dd3998545600f5af1d406196832ef8bea59cb022bc3a5efb303ac57cf7  depenguin-2.0.tar.gz

Bon!

 swinful@thinkpad> gunzip < depenguin-2.0.tar.gz | tar xvf -
depenguin-2.0/
depenguin-2.0/mdinit
depenguin-2.0/makeimage.sh
depenguin-2.0/mdinit.conf
depenguin-2.0/loader.conf
depenguin-2.0/bootcode
depenguin-2.0/makefs-20080113.tar.gz
depenguin-2.0/rcconfglue
depenguin-2.0/depenguinator.conf.dist

My depenguinator.conf looks like the following:

swinful@thinkpad> grep -v "^#" depenguinator.conf
hostname="fbsd-thinkpad.goldcoast.com"
defaultrouter="192.168.1.1"
depenguinator_nameserver="192.168.1.1"
depenguinator_interfaces="iwi0 bge0"
depenguinator_mac_external="00:12:F0:4C:80:FA"
depenguinator_ip_external="192.168.1.46"
depenguinator_netmask_external="255.255.255.0"

Download and verify FreeBSD iso

 swinful@thinkpad> curl ftp://ftp.freebsd.org/pub/FreeBSD/releases/i386/ISO-IMAGES/7
.0/7.0-RC1-i386-disc1.iso > disc1.iso
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  509M  100  509M    0     0   332k      0  0:26:08  0:26:08 --:--:--  338k
2.096u 10.384s 26:08.88 0.7%    0+0k 0+0io 1pf+0w
 sha256sum disc1.iso
e7239fcfeb2d48e7d4502978e65af973bb837e5742806600eaf4cff0246c595a  disc1.iso
20.521u 1.516s 0:24.47 90.0%    0+0k 0+0io 1pf+0w

Creating the disk image

If you would like to see what is going on during this process, turn on debugging by adding “set -x” after “#!/bin/sh” in makeimage.sh

Then, Run as root:

swinful@thinkpad> sudo sh -e makeimage.sh disc1.iso 7.0-RC1 ~/.ssh/authorized_keys
...edited...
chattr: Inappropriate ioctl for device while reading flags on mfs/root/.k5login
chattr: Inappropriate ioctl for device while reading flags on mfs/root/.profile
chattr: Inappropriate ioctl for device while reading flags on mfs/root/.cshrc
chattr: Inappropriate ioctl for device while reading flags on mfs/root/.login
chattr: Inappropriate ioctl for device while reading flags on mfs/media
chattr: Inappropriate ioctl for device while reading flags on mfs/libexec
chattr: Inappropriate ioctl for device while reading flags on mfs/libexec/ld-elf.so.1
chattr: Inappropriate ioctl for device while reading flags on mfs/.profile
chattr: Inappropriate ioctl for device while reading flags on mfs/usr.tgz
chattr: Inappropriate ioctl for device while reading flags on mfs/.cshrc
chattr: Inappropriate ioctl for device while reading flags on mfs/COPYRIGHT
+ rm -rf mfs
+ rm -r disk
+ rm -rf makefs-20080113
103.558u 17.345s 3:03.15 66.0%  0+0k 0+0io 102pf+0w

Afterwards, you will have a new file: disk.img

swinful@thinkpad> ls -ltr
total 579309K
-rw------- 1 swinful swinful        45 2003-12-25 19:19 mdinit.conf
-rw------- 1 swinful swinful        89 2003-12-25 19:20 loader.conf
-rw------- 1 swinful swinful    925520 2008-01-13 15:05 makefs-20080113.tar.gz
-rw------- 1 swinful swinful      8192 2008-01-13 18:05 bootcode
-rw------- 1 swinful swinful       367 2008-01-14 11:09 mdinit
-rw------- 1 swinful swinful       408 2008-01-14 15:48 rcconfglue
-rw------- 1 swinful swinful       866 2008-01-14 15:50 depenguinator.conf.dist
-rw------- 1 swinful swinful       884 2008-01-29 23:54 depenguinator.conf
-rw-r--r-- 1 swinful swinful 534556672 2008-01-30 00:23 disc1.iso
-rw------- 1 swinful swinful      3731 2008-01-30 10:37 makeimage.sh
-rwxr-xr-x 1 root    root     57114624 2008-01-30 10:42 disk.img

Turn off swap to be used for disk.img

swinful@thinkpad> sudo swapoff -a
swinful@thinkpad> sudo dd if=disk.img of=/dev/sda5
111552+0 records in
111552+0 records out
57114624 bytes (57 MB) copied, 7.4859 seconds, 7.6 MB/s

Add FreeBSD to GRUB and Reboot!

executed same steps as mentioned on Colin’s site. Now I need to reboot, but since I am executing these commands from work I wonder what will happen.

swinful@thinkpad> sudo shutdown -r now "Depenguinate Ubuntu 7.10"

Broadcast message from swinful@thinkpad
        (/dev/pts/5) at 11:27 ...

The system is going down for reboot NOW!
Depenguinate Ubuntu 7.10

Ok, several minutes later…

swinful@thinkcentre> ping 192.168.1.46
PING 192.168.1.46 (192.168.1.46): 56 data bytes
ping: sendto: Host is down
ping: sendto: Host is down

No ciggar… when I get home later tonight, I’ll see what happened. It could have been I may have screwed up with the grub configuration. Please don’t try the above! 🙂

Advertisements
This entry was posted in *Nix. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s