Monday, July 28, 2008

FreeBSD: Finally! I made a working FreeBSD 7 amd64 DVD! Here's how!

HAHAHA! Finally I got it! I made it woohoo! Ok I've successfully made a working FreeBSD 7.0 AMD64 DVD! But (there's a but..) not just using Nero, I used mkisofs to make an iso image, then burn it with Nero. Here's the important steps.

Step #1: Get the FreeBSD iso.
Fer this I downloaded all 4 isos. I downloaded all AMD64 version. You can get the isos here. Remember to get it from FreeBSD's mirror sites to ease off the load on FreeBSD's main ftp site. I downloaded:
7.0-RELEASE-amd64-disc1.iso
7.0-RELEASE-amd64-disc2.iso
7.0-RELEASE-amd64-disc3.iso
7.0-RELEASE-amd64-docs.iso


After I'm done downloading, I created a folder named FreeBSD in "c:\" so it'll look like c:\FreeBSD. Then I use 7-zip to extract all the isos into c:\FreeBSD starting from bottom up (x-docs.iso -> x-disc3.iso -> x-disc2.iso -> x-disc1.iso). Sure you can extract whichever combination you want but I just want to be sure. Then browse c:\FreeBSD\boot\ to see if there's a file call cdboot. We'll need that later. NOTE: If you found a folder named [BOOT] (not boot, you can safely delete that.

Now inside c:\FreeBSD, edit the file cdrom.inf. I use GVim Portable. You'll find something like:

CD_VERSION = 7.0-RELEASE
CD_VOLUME = 1


You can safely delete all the other line and JUST LEAVE the CD_VERSION = 7.0-RELEASE. Then save the file.

Now browse to c:\FreeBSD\packages\. I use GVim Portable and edit the file INDEX. This part is a bit tricky is you don't read carefully. Using your text editor "replace" function, delete all occurance of the words:

|1
|2
|3


To be sure, using your text editor's "search" function, find the word |1, |2 and |3 to see if there's any left. If there's none, good. We can continue.

Step #2: Get the cdrtool (we need mkisofs):
I downloaded all this tools stated below:

cdrtools-2.01-win32-bin.zip
dlls.zip
cygwin1.dll (version 1.5.25)


Then, using 7-zip, I extracted mkisofs.exe from cdrtools-2.01-win32-bin.zip into c:\WINDOWS folder. Then I extracted the file cygiconv2.dll and cygintl-8.dll from dlls.zip into c:\WINDOWS\system32. Finally I extracted cygwin1.dll into c:\WINDOWS\system32 folder.

Why can't I just extract the files to anywhere I wanted? Well, because I can use command prompt and run mkisofs from any folder I wanted. More on this below.

Step #3: Now the hard part begins. Well not so hard.
Now go open up the command prompt. You can use either "Start > All Programs > Accessories > Command Prompt" or "Start > Run" and type "cmd" then press Enter. Then type in:

cd c:\FreeBSD

to get into the FreeBSD folder. If you're using another folder name, go to that folder instead. Now we need to test out mkisofs. In the same command prompt, just type:

mkisofs

And you'll see something like:

mkisofs: Missing pathspec.
Usage: mkisofs [options] file...


If there's anything about missing cygwin1.dll, that means you didn't read the step #1. Ok now we know mkisofs is working. Let's roll. In the same command prompt, type this command:

mkisofs -o ../FreeBSD7.iso -R -J -V "FreeBSD7" -b boot/cdboot -no-emul-boot .

Remember to type it IN 1 (ONE) LINE. And yes the command ends with a "." (dot). See the -o ../FreeBSD7.iso? It means to create a file name FreeBSD7.iso in top folder, in this case c:\ root folder. Why? because I tried just -o FreeBSD7.iso and in the final iso, I see a file name, well guess what, FreeBSD7.iso in it. Drats. Now you can take a break while mkisofs is doing it's job. It'll take a while. Be sure to have enough hard disk space fer this sort of things but I tried this with only 3Gb empty space left. So fer most of us, it's nothing to worry about.

After a while, the job is done and the command prompt will display:

c:\FreeBSD>

again. So, congratulate yourself. Your iso is ready to be burn with any dvd burner program you have. In my case, Nero. Put in a blank DVD-R in your DVD-RW drive, and burn away the FreeBSD7.iso. Next. Boot and install FreeBSD. Enjoy it. You earn it friends.

Q: Why didn't you use growisofs? Well you're using mkisofs aren't you?
A: Because I don't know how. And heck I'm doing all this in XP x64.

Q: Why didn't you only use Nero to create the bootable dvd? Nero can do that.
A: Done it and the dvd can't boot the kernel. Read my previous post.

Q: Your mkisofs command is different from what I've read on the internet.
A: If you're talking about Dru's tutorial, I used her tutorial as a base, but I just can get her mkisofs command right on my pc. I guess her tutorial is just fer people using *BSD / linux. In my case, it's fer people using windows. Most importantly, this is fer me to remind meself on how I did it.

Q: Have you tested the FreeBSD dvd you've created?
A: Yes I have. I even tested using sysinstall to install some packages. Tested installing links and all the dependencies have no issue whatsoever. And installing from a dvd is great! The speed is awesome. Anyway, that's the only test I've done so far today, didn't do any full installation though but I'm sure it's fine. Just to add a note, I sacrifice 2 dvd-r before I made the final working FreeBSD 7.0 dvd. Quite a loss, in my current state but well worth the effort and knowledge.

Q: I need to know..
A: Go away!

Haha. Later then. Good luck!

p/s: I'm not done with OpenBSD though. I'll be back fer more testing. I MUST have a working OpenBSD installation up a running no matter what.

No comments:

6.5 amd64: Modify existing certbot certificates.

Hi, It's been quite some time eh. As you can see, I still upgrade my OpenBSD system regularly but currently I do not have the time to ...