Create Two Bootable FreeBSD on a single HDD

Status
Not open for further replies.
I

iic2

Guest
This seems to ONLY WORKS FOR FreeBSD 8.0-CURRENT-amd64 on newer machine. I don't want to keep messing up my notes so this section is final.

I zero-FILL my disk. I suggest that you at lease fdisk and format your entire drive the old-fashion way before attempting this. SysInstall is not design to do all of that so if you don't I wish you well.

This section assume you have partitioned your drive with Dos or Partition Magic. At the end of this section it show you how to do it all using only FreeBSD.

INSTALL FreeBSD-1 TO PRIMARY UNIX [C-DRIVE]

Ok, create at lease two primary partitions and format them. I read somewhere you may have up to 26 installs. Up to a dozen should be no sweat.

1:
Place FreeBSD install disk in CD drive and reboot

2:
Go to standard installation and make your way to FDISK Partition Editor

3:
Stroll up to ad0s1
Type S (Set Bootable)
Type T (Change Type)
Type Q (Finish)

4:
Under Boot Manager Screen be sure that (Install FreeBSD Boot Manager) is selected. Hit ENTER. You'll get a Message Screen. Review it than Hit ENTER

5:
Freeze. Take a look at what you have. At the top of the screen you will see the selected ad0 Partition name: ad0s1. This mean you will be installing FBSD-1 on Primary UNIX [C].

The next line ad0s2 is in the waiting for an latter install. For now, simply ignore it but know why it is there.

6:
Type C and start creating your BIOS type slices for your Logical drive.

7:
Finish up

8:
On your very first boot don't wait ... Hit the F1 key, immediately!
Pull first trigger .. If not you may receive a Non-System disk error message.

F1 - FreeBSD
F2 - ?

F6 PXE
F1 - Boot

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INSTALL FreeBSD-2 TO PRIMARY UNIX [D-DRIVE]

1:
Place FreeBSD install disk in CD drive and reboot

2:
Go to standard installation and make your way to FDISK Partition Editor

3:
Stroll up to ad0s2

No need to (Set Bootable) and we don't touch the Boot Record so by right they should be in [C] but that may not be true. Move on to the next line.

Type T (Change Type)
Type Q (Finish)

4:
Under Boot Manager Screen be sure that (Leave Master Boot Record untouched) is selected. Hit ENTER. You'll get a Message Screen. Review it than Hit ENTER

5:
Freeze. Take a look at what you have. At the top of the screen you will see the selected ad0 Partition name: ad0s1. If ad0s2 in not selected STROLL DOWN and select ad0 Partition name: ad0s2. This mean you will be installing FBSD-2 on Primary UNIX [D].

The next group of lines are your previously installed slices. Do not delete them unless you are ready to do an re-install. "YOU HAVE BEEN WARN". Until then, simply ignore them. Now you know why they are there.

6:
Type C and start creating your BIOS type slices for your Logical drive.

7:
Finish up

8:
On your very first boot don't wait ... Hit the F2 key, immediately!
Pull first trigger .. If not you may receive a Non-System disk error message.

F1 - FreeBSD
F2 - FreeBSD

F6 PXE
F1 - Boot

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Anything known to be incorrect, I will fix it. Anything new, I will find it.

Enjoy


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

FREEBSD WITH NO HELP FROM DOS AND OTHERS
FREEBSD WITH NO HELP FROM DOS AND OTHERS
FREEBSD WITH NO HELP FROM DOS AND OTHERS

For AMD-64 use FreeBSD 8.0-CURRENT-amd64
For INTEL use FreeBSD 7.2

If you are installing for AMD you got it made
If you are installing for INTEL it may get tricky but it can be done.

I finally got i386 to work. So I re-formatted the drive so I could re-document all of my move cause I did not that time. The thing crashed on me again. It got to be my out-dated machine with its tiny HDD. But I only proved to myself that it does work.

I did it backwards than use I used the command-line for 2nd install.


INSTALL FreeBSD-2 ON PRIMARY UNIX [D-DRIVE]

1:
Place FreeBSD install disk in CD drive and reboot

2:
Go to standard installation and make your way to FDISK Partition Editor

Code:
DISK name: ad0 Disk Geometry: 610 cyls/255 head/63 sectors = 9799650 sector (4784MB)

Offset	Size(ST)	End	Name		Desc		Subtype	Flag
0	9809100		98099099		-		unused	0

If you see more than one line under OFFSET than you need to clear them out. Don't use

undo. Stroll to lines and delete all you can until there is ONLY ONE.

3:
Type C (Create Slice)
Hit the back-space key to remove that number.
Type 4000m
Hit ENTER
Type 165
Hit ENTER again
You just created ad0s1 as your first UNIX slice.

4:
Type C (Create Slice)
Don't changes a thing.
Hit ENTER
Type 165
Hit ENTER again
You just created ad0s2 as your second UNIX slice.

5:
Type Q (Finish)

Under Boot Manager Screen be sure that Install FreeBSD Boot Manager is selected.

Hit ENTER. Hit ENTER again.

6:
At the top of the screen you will see ad0s1 and ad0s2. We are going to do things backward. Make sure ad0s2 is always selected.

7:
Type C and start creating your BIOS type slices

8:
Type Q for Finish.

9:
Choose [A] Minimal install and install it.

10:
F1 FreeBSD
F2 FreeBSD

F1

Don't miss ... Hit the F2 Key IMMEDIATELY!

|||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||||||||||||

INSTALL FreeBSD-1 ON PRIMARY UNIX [C-DRIVE]

1:
DON'T SHUT DOWN.
TYPE sysinstall on the COMMAND LINE.
Place FreeBSD install disk in CD drive

2:
Go to standard installation and make your way to FDISK Partition Editor

Don't do a thing.
Type Q (Finish)

3
Under Boot Manager Screen be sure that Leave Master Boot Record untouched is
selected. Hit ENTER. Hit ENTER again.

4:
At the top of the screen you will see ad0s1 and ad0s2. This time we make sure ad0s1 is
selected. Be careful not to delete anything.

5:
Type C and start creating your slices

6:
Type Q for Finish.

7:
Choose install EVERYTHING.

8:
This time you will have to re-boot from previous installation.

The End
 
iic2 said:
First we will install FreeBSD to our Extended-Logical
The (D) Drive


(1) Create your two partitions using a MsDOS floppy or a partition tool like Partition Commander. Create two partitions. Format both the Primary and Extended Logical drives using standard fat32. You should have a C and D drive sized to your preference. Now shut down.

(2) Place FreeBSD install disk in CD drive. I used 8.0 but this should work for all versions.

(3) Go to standard installation.

(4) This is your first "MOST IMPORTANT" move: In the install screen stroll up to ad0s1 and type S (S=SET BOOTABLE)

(5) Now stroll down to extended DOS, LBA and type T (T=CHANGE TYPE). Now type 165 than hit ENTER. Your Logical partition "D drive" is now set to freebsd format and is bootable from your Primary partition "C drive". Now type Q for (Finish)

These instructions are misleading and unnecessary. In step 5 you are changing your extended partition into a primary FreeBSD partition. And you don't need to use a DOS floppy to create these partitions - precisely what you're doing can be done from the FreeBSD installer alone.

FreeBSD can NOT boot off an extended logical partition. Further more, when FreeBSD sees a logical partition, it numbers it from 5 upward. If your ad0s2 were a logical partition it would be ad0s5.
 
These instructions are misleading and unnecessary.
Thank for pointing this out. I'll correct it tonight. But for now if some miss this it's nothing more than a safe way of doing it and it works perfectly, long winded but perfect. So no need to be afraid. A few extra tiny more only give you time to think.

And you don't need to use a DOS floppy to create these partitions -
Post your example. For me, I love dosing and zero-Fill. It keep me safe for over 20 years. Besides, I don't how to SANITIZE disk before FBSD get install. Newfs is for emergency or simply child play to me, recreate new partitions over old one. Stacking up until death do them part. So I'll keep my suggestion about dos.

precisely what you're doing can be done from the FreeBSD installer alone.
Your way is required and needed by many. This is How-To. We await your instructions. Can't wait to see your post.

FreeBSD can NOT boot off an extended logical partition.
My logical did go back into being part of Primary.

v9.01a. Here you are 100% correct. What was once two bars is now only one. But everything is 100% perfect in the end.

But one thing is bugging me notice both partitions are active. Remember my instruction said to save both Boot-Record for each drive to C drive only.
Well, how in the heck can D show Active under P-Commander when it boot-record are on C drive. First install was to D. Something more changed. How could this possible happen ?

Better yet, where are the files that contains these records? Are they readable? I need to see what directory both boot-records went to.

C - Location In Tack:
Code:
Primary	Partition
Active	UNIX
Size	150.25 GB
OS	BSD

D - Location No Longer:
Code:
Primary	Partition
Active	UNIX
Size	781.25 GB
OS	BSD

Further more, when FreeBSD sees a logical partition, it numbers it from 5 upward. If your ad0s2 were a logical partition it would be ad0s5

Actually I did this on my AMD machine and it in fact reads from df -m:
Code:
For FBSD-1 = ad4s1a
For FBSD-2 = ad4s2a
Yes FBSD didl default back to Primary. That's fine. Now I know more of what's really going on behind the scenes.

Thank aragon
The only thing missing after tonight might be your example. It the only thing that will make this thread complete.
 
iic2 said:
Post your example. For me, I love dosing and zero-Fill.
You're using the MS-DOS fdisk utility, when there's a FreeBSD fdisk(8) utility, both within sysinstall(8) and as a stand-alone utility.
No need for more explaining, all the information you need is in these (and other) man pages and the entire setup process is described in 7 pages in the official handbook.

iic2 said:
I don't how to SANITIZE disk before FBSD get install
You don't particularly NEED to do that since every time you create a new file system (newfs(8)), the old metadata is overwritten and the new metadata is used.
If you still absolutely need to "sanitize" your disks, then just run dd(1) from the livefs and cover the entire disk with /dev/null.

iic2 said:
Newfs is for emergency
It's done every single time you install FreeBSD or add a new disk or re-format an old one.

iic2 said:
or simply child play to me
Uh-huh...

iic2 said:
So I'll keep my suggestion about dos.
What about people who never used MS-DOS, or don't trust it for some reason, or simply don't want to use closed-source, commercial (or illegal/pirated) software?
FreeBSD already has all the needed tools, just use them.

iic2 said:
We await your instructions.
Here, here. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install-steps.html

iic2 said:
But everything is 100% perfect in the end.
So why not simply create 2 primary BIOS partitions in the first place... using sysinstall(8) or fdisk(8)?

iic2 said:
Better yet, where are the files that contains these records?
You mean the active byte? It's in the MBR, i.e. sector 0 LBA in your boot disk. The partition table is at 0x1BE, after the boot manager code. It has 4 16-bytes long entries. The first byte in each entry is 0x80 for active and 0x00 for inactive.
And BTW, you can change any of this using FreeBSD's fdisk(8).
 
boot0cfg(8)

aragon, you have been fired for a WEEK and 14 minutes :)
Note that what are referred to here as "slices'' are typically called "partitions'' in non-BSD documentation relating to the PC. Typically, only non-removable disks are sliced.

Wow! What FreeBSD is saying is that boot0 is in-fact a build-in FLOPPY.

Give me some time please. i DON'T WANT TO RUSH THIS.

THANKS

Please forgive me for the font change for round2, but this is like WOW ! to me.

Like Terminator-2, i will be B-A-C-K!
 
Sorry people I got bad news. I read all of the docs mentioned above but when I got around to 2.6 Allocating Disk Space, unfortunately like before it only speaks of one install and if you want more you have to attach another HDD an figure it out from there. I quickly lost interest again but I did read on to complete in its entirety for the very first time ever for any documentation.

Anyway, to match the average user who runs INTEL machines I been trying to do this on my old DELL 7500 laptop using 7.2-Release and 8.0-CURRENT-200906-i386 and all I got was warning messages no matter what I do for the disk (dos or not. Zero_Fill or not) and I did all of the above in the HOW-TO forever and a day:

Code:
Unable to find device node for /dev/ad0s1b in /dev!
The creation of filesystems will be aborted.

Now I see I why people don't know what I be talking about. I always thought it was possible to have two FBSD installs for any machine until now. It seems to ONLY WORKS FOR 8.0-CURRENT-amd64, including Beta1 - Beta2 on modern machines i guest. I hope this is not the case. It should work for all AMD at the very lease I hope.

I never thought to try this on my INTEL first. I thought it was all the same. Than when I brought my very first AMD machine back in June I went for it cause it was to be dedicated to FreeBSD and it WORK!

I am an INTEL user since it was invented. Now I only have one AMD machine and here are the specs.

Code:
AMD Phenom II X4 -2.6Ghz -TRUE - 6.0mb total-Cache; AM3 
BI-STAR - TA790GX A3+ mother board with TV tuner - 4 slot mem 
2 sticks - Viper - DDR3 4 gig ram 
Seagate Sata-Barracuda 1 TB/Go

I don't know if this will work for other AMD's. If someone has test machines maybe they could let us know. I would hope this HOW_TO at lease works for all AMD-64, if it unless and would mean Phenom and FreeBSD-amd-64 8.0 was invented only for ME.


It seems like this world of massive new agricultures is going to screw us all up long before Quantum comes about to replace them ALL anyway. For now AMD may be the underdog but it seems they just kick INTEL to the curb, and it's all 8.0-CURRENT-amd64 fault for un-leaching these new possibility.

But like i said I think my machine is out-dated.
 
Very funny:e
I used to have 3 FreeBSDs on the same HDD + EP with bunch of Linuxes on 7y.o. P4 machine. Now I have 2 there (pcbsd - for kids).
It's just my fortune that this howto didn't exist at that time...or it's an ad for amd sake?
 
It's just my fortune that this howto didn't exist at that time...or it's an ad for amd sake?

I think i'm really giving FreeBSD 8.0 all the credit. It's the only one that works for my AMD machine. But it do seems like AMD got something special going on these days. No this is not a ad. I would never do that unless I was 100% certain and I would only suggest to friends since I don't get paid. But you give credit where credit due regardless of who like it or not.

INTEL has a new processor rolling out the door every other week. I don't trust nothing anymore and I don't favor one over the other. There's too much out there all at once and things get changed over-night breaking my code under Windows. I can only imagine what the FreeBSD developers are going through. You know INTEL and the rest works in Microsoft favor. If it was not for 8.0 I would have just wasted my money. I'm not into games or TV. That's what AMD was once mostly good for. But now they have many satisfied customers and I see it as the best thing going for FreeBSD. So now they have a friend too.

So it will work on INTEL i386. Where were you when I needed you. I been asking and searching forever.
 
Status
Not open for further replies.
Back
Top