DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st February 2011
Mr-Biscuit Mr-Biscuit is offline
Banned
 
Join Date: May 2008
Posts: 272
Default Dual Booting on Apple PPC hardware. Debian and FreeBSD.

Dual booting these systems will give the user a chance to work with two different FOSS environments.





For this exercise, you will need the following:

Hardware.
Any Apple branded PPC based system which allows you to boot from the option menu.
The open firmware version will be 3.x and greater.
A single disk of 40G minimum size or two disks with a minimum size of 20G.
A processor of 400MHz or greater.
I recommend 374M RAM but you can do with 256M.
Keyboard, mouse, monitor, and the usual.

Software.
A Debian business card iso for the powerpc architecture. http://cdimage.debian.org/debian-cd/...owerpc/iso-cd/
A FreeBSD disk one iso for the powerpc architecture. ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/201102/



Information.
Monitor name, vendor, VertRefresh, HorizSync.
You will need an internet connection for the basic FreeBSD install.


This howto is based on information from kelsoo http://forums.debian.net/viewtopic.php?f=16&t=20481 ,
tingox http://sites.google.com/site/tingox/powermac_g4_freebsd ,
and myself http://forums.freebsd.org/showthread.php?t=13827 .

Let us begin.

Prepare the isos by burning each to a disk using your favorite program.
You are going to erase the entire contents of your drive(s) so be sure to upgrade and save whatever you want.
Reboot the machine and hold down the left option key. This will be the logo key on the keyboard.
Open the tray and place in the Debian CD. From the icon menu, choose the CD.
Click on it , click on the arrow.
Another way would be to place the CD in the drive and hold down the C key while rebooting.
The third way is:
Code:
 > setenv boot-device cd
Open the tray, place the cd, close.
Code:
 >mac-boot
Go through the menu as usual, setting up passwords and ftp servers. Remember, since this is the first step,
you will not be saving the accounts.

For a single disk system.

You will do a manual partition. Delete all entries.
Create a map with the following:
1024K New World Boot block
3G ext3 mounted as /
512M swap
1G /var
2G /tmp
12G /usr
The rest of the disk dedicated to /home.

For a dual disk system.

Follow the above. Be sure that you have /(root file system without var or tmp) at a minimum of 3G.


Optional layout:

18G /
512M swap
The remaining for home.
This is good for the beginner or general use.




Finish by answering yes to accept scheme. Pick a minimal install. let it finish and reboot.
Hold down the option key, open the tray, place in the FreeBSD CD.
Follow the methods for booting from the option menu.

Installing FreeBSD.

This process will take some time. I will only cover the basics.

Let the CD boot and enter the information until you come to the main menu.
Hit F to get to the fixit menu. Hit 5 to choose a shell.
Hit ALT+CTRL+F4 to get to the shell.

Single disk system.

Code:
gpart show
Remember the disk number.
Code:
  gpart modify -i<first apple-ufs partition> -t freebsd ad<disk number from gpartshow>
gpart modify -i<second apple-ufs partition> -t freebsd-swap ad<dsk number>
gpart modify -i<next apple-ufs partition> -t freebsd ad<disk number>
For a dual disk system.

Follow the above, using ad1 and ad0 after gpart show. The modding follows the same rules.

When finished, use ALT+CTRL+F1 to return to the menu.
Hit X and enter. Choose standard.
Select each, hit C, and do the following:
The first should be filesystem, /. The second should be swap.
The third should follow whichever scheme from previous you chose.
Hit Q.

Choose the minimum installation. X and enter.
Choose the CD as the media.
Yes, you want to start a new shell.

When it is finished, go through the menu. You can select yes for SSH.
Do you want to add a user? Yes.
For the group info, type wheel. You will need this for "su to root."
Do not add any packages from the ports collection.

Add root password.
Return to post installation menu. Select setup networking. Select devices.
If on a router, you can make up a domain. If not, it should automatically be filled in.
Exit. Return to the main menu. F for fixit, Enter. 5 for shell.
CTRL+ALT+F4
If it prompts for a new shell, choose yes.

Code:
 dd if=/boot/boot1.hfs of=/dev/ad<disk number>s2
CTRL+ALT+F1 to return to the main menu. Exit Install.


Setting up the base system.


Boot into the option menu.
Reinsert the FreeBSD CD. You will choose the hard disk as the boot device.
On a two disk system, choose the hard disk without an extra icon. This will be the FreeBSD install.
Select and arrow.

Let the system boot up.
Login as user.
Code:
 mkdir cdrom
Su to root.
Code:
 mount -t cd9660 -o ro /dec/acd0 cdrom
cd cdrom/9*
ls
For each directory.
Code:
 cd 
sh install.sh
cd ..
You will not need the base or kernel.
Do not install the ports package from the disk.

For src, you can either do
Code:
 sh install.sh all
or
Code:
 sh install.sh <section>
Code:
 sh install.sh
by itself will give you the source list.

Code:
 cd /home/$USER && umount cdrom

Final system setup.

Follow
http://www.freebsd.org/doc/handbook/ports-using.html and
http://www.freebsd.org/doc/handbook/...-building.html

Be sure to reboot twice.

Installing Debian.

Reboot into the options menu. Load the Debian CD.

Do a normal install with the following exceptions on a single disk system.
All partitons dedicated to FreeBSD must be marked as do not use.

Be sure to setup a NewWorld Boot partition, at least one ext3 with /(root) as the minimum, and a swap partition.

I choose a minimal installation because you can control what goes in the environment for the most part.

The user, user password, and root password will be kept. Make them strong.

From here you can follow: http://forums.debian.net/viewtopic.php?f=16&t=20481
This is a very good guide for setting up the debian environment.

http://forums.freebsd.org/showthread.php?t=13827
For setting up the FreeBSD environment.

http://forums.debian.net/viewtopic.php?t=27227
For basic questions on setting up compatibility between the two.

Whenever you want to boot from either install, do the following:
Hold down the option key until the graphical menu appears.
The normal hard disk icon will be FreeBSD. Linux will be the one with the penguin.
Select then arrow to boot.

Last edited by Mr-Biscuit; 22nd February 2011 at 01:20 AM. Reason: Bad Math
Reply With Quote
  #2   (View Single Post)  
Old 22nd February 2011
Mr-Biscuit Mr-Biscuit is offline
Banned
 
Join Date: May 2008
Posts: 272
Default

In the FreeBSD install, the user can eliminate the /home directory. Such an action would allow /usr/(subdirectories) and /root/(subdirectories) to be more flexible.

Using gpart to partition can be done; however, it may be difficult to repair the partitions later. Gpart can be buggy at times. This is the reason for the Debian disk.
Here is the partitioning scheme that can be done with gpart:
Code:
gpart add -s 800K -t '!Apple_Bootstrap' ad<disk number>
gpart add -s <size> -t freebsd-ufs ad<disk number>
gpart add -s <size> -t freebsd-swap ad<disk number>
gpart add -s <size> -t freebsd-ufs ad<disk number>
Resource: http://sites.google.com/site/tingox/powermac_g4_freebsd
Reply With Quote
  #3   (View Single Post)  
Old 8th March 2011
Mr-Biscuit Mr-Biscuit is offline
Banned
 
Join Date: May 2008
Posts: 272
Default

http://code.google.com/p/powerpc-bit...downloads/list

Everything is according to the letter. I'll have everything uploaded and a package list within a few hours.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
dual booting OS X with Windows dipalina Other BSD and UNIX/UNIX-like 3 13th January 2010 08:46 PM
FreeBSD FreeNAS drops FreeBSD in favor of Debian vermaden News 34 22nd December 2009 11:00 PM
Hardware recommendation: what hardware to buy for my new FreeBSD desktop? Broodjegehaktmetmayo General Hardware 92 11th February 2009 10:43 PM
Kuro5hin: FreeBSD Owes Apple Big quique FreeBSD General 24 22nd November 2008 07:43 PM
Dual-booting WinXP, FreeBSD; unlikely disk geometry ronaldmcdonald9 FreeBSD Installation and Upgrading 6 11th July 2008 06:10 PM


All times are GMT. The time now is 02:45 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick