DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Installation and Upgrading

OpenBSD Installation and Upgrading Installing and upgrading OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 9th October 2008
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Default MultiBooting OpenBSD.

I try to make a multibooting system between openbsd and WinXP but i have some problems. Situation as below...

1: I have total size of 60GB hard disk.
2: Drive C: 26.5GB and i deleted drive D: for openbsd installation of size 29.9GB.
3: This is what the system shows

Disk: wd0
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
#: id C H S - C H S [ start: size ]
------------------------------------------------------------------------
*0: 07 0 1 1 - 3470 254 63 [ 63: 55761552 ] HPFS/QNX/AUX
1: 00 3471 0 1 - 7294 254 63 [ 55761615: 61432560 ] Extended LBA
2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused

offset:55761615 Signature:0xAA55

Until this step, i'm not sure how to continue with. How do i install openbsd in the freespace 29.9GB? I don't understand how Starting and Ending C H S works. please help.
Reply With Quote
  #2   (View Single Post)  
Old 9th October 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by bsdnewbie999 View Post
Disk: wd0
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
#: id C H S - C H S [ start: size ]
------------------------------------------------------------------------
*0: 07 0 1 1 - 3470 254 63 [ 63: 55761552 ] HPFS/QNX/AUX
1: 00 3471 0 1 - 7294 254 63 [ 55761615: 61432560 ] Extended LBA
2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused

offset:55761615 Signature:0xAA55
Recognize that OpenBSD 4.3 must be installed into a primary partition. 4.3 cannot be installed into an extended partition. OpenBSD 4.4 will allow installation to be made into extended partitions.

Be sure to study Section 4.8 of the FAQ which describes the steps needed to create a multibooted environment with Windows using Windows' boot manager:

http://openbsd.org/faq/faq4.html#Multibooting
Reply With Quote
  #3   (View Single Post)  
Old 9th October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by bsdnewbie999 View Post
1: I have total size of 60GB hard disk.
That is approximately 117 million sectors. (You did not show the complete fdisk output, which includes the number of sectors and the disk geometry.) Your two MBR partitions on the drive extend through LBA 61432560, so only about 30GB of your 60GB is allocated in MBR partitions.

Disk geometry (cylinder / head / sector ) is no longer as critical as it once was long ago, as all modern drives have on-board electronics that manage their own physical geometry, which vary greatly. Most EIDE/ATA/SATA drives inform their controllers they have a cylinder geometry containing 255 read/write heads and 63 sectors per track, which has nothing to do with their internal physical geometries.

Even so, many BIOSes and OSes rely on MBR partitions starting on cylinder boundaries. However, note that Partition #0 does not start at the beginning of cylinder #0, but starts at the beginning of the second track. The first track (63 sectors) is reserved for the MBR and related structures. If the disk has a BSD disklabel, it can be found in here as well.

OpenBSD's fdisk(8) gives you complete control of MBR partitioning. You must set your OpenBSD MBR partition to start on a cylinder boundary.

Primary partition #0 is your Windows NTFS C: drive
Primary partition #1 is an area reserved for extended partitions. I can only guess that your "deleted" D: drive may have been configured as an extended partition. If so, be aware that deleting the extended partition does not delete this reserved area.

If you have no extended partitions any longer, or do not need any, you may delete this extended partition (editing any partition and setting its ID to 0 will mark the partition unused. You may also reuse the partition and/or resize it.

OpenBSD MBR partitions use Partition ID A6.

You may keep Partition #1 as is, or reuse it, or mark it unused and select another primary partition for OpenBSD. In all cases, you will want to edit in CHS mode. (See the -e option in the fdisk(8) man page.)

Partition #0 uses cylinders 0-3470, and Partition #1 uses cylinders 3471-7294.

If you are replacing Partition #1 with an OpenBSD partition, edit the partition, set the partition ID to A6, request editing in CHS mode, and leave its starting cylinder as 3471. Set its ending cylinder wherever you want. The partition editor will show you the ending cylinder number, and, if you select it, will show you the final head/sector numbers, which may be shorter than 255/63.

If you are keeping Partition #1, edit Partition 2 or 3, and set its starting cylinder to 7295.
Reply With Quote
  #4   (View Single Post)  
Old 9th October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I did not mention flagging an MBR partition for booting. This is done with Windows by setting a partition "Active" -- with OpenBSD's fdisk, you "flag" a partition.

You may wish to flag your OpenBSD partition (#1 or #2/#3) so that OpenBSD boots each time, until you are ready to set up multibooting.

For setting up multibooting... some Windows users like to do it with the Windows bootloader. GAG is also a popular multibooter. (I use it on one of my laptops.)
Reply With Quote
  #5   (View Single Post)  
Old 10th October 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by jggimi View Post
I did not mention flagging an MBR partition for booting. This is done with Windows by setting a partition "Active" -- with OpenBSD's fdisk, you "flag" a partition.
For today's history lesson, this was the original intent of the MBR.

For numerous reasons, hard drives in the mid-'80's to early '90's were logically partitioned into smaller logical block devices. Partitions were used to keep the size of logical devices to within MS-DOS' restrictions, & allow other operating systems to be installed on the same block device. MS-DOS restricted the number of primary partitions to four, & this legacy persists today. Extended partitions was a hack added later to allow more logical devices to be configured. Even if it was a hack, it was a clever hack. Extended partitions were implemented by having the MBR partition entry point to yet another table specifying the logical partitions within that particular extended partition.

When a Wintel computer first boots, it will go through POST & initialize all devices found in the system. Once stasis of the overall system has been reached (including spinning up the hard drive(s)...), the BIOS will search for its configured primary boot block device, & the last thing done before relinquishing control is determine whether the MBR signature, 0xAA55 (also called boot sector's magic number...) has been written to 0x01FE & 0x01FF in the first sector of the boot device. If this value is found, it then loads the boot sector into memory, & begins to execute instructions.

The first instructions found in the MBR checks the validity of the four partitions. Only one partition can be marked active, & execution is intended to abort if this criteria is not met.

This is the role OpenBSD's fdisk(8) (or any other operating system's fdisk(8)-like utility...) plays in the installation process. It will initialize the boot sector with the appropriate instructions, & provide an editor for manipulating the MBR's partition table. If a partition is to be marked active, fdisk(8) will ensure that only one is marked active.

More exciting information can be found in Section 14.6 of the FAQ:

http://openbsd.org/faq/faq14.html#Boot386

Class dismissed.

Reply With Quote
  #6   (View Single Post)  
Old 10th October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Excellent review, ocicat!
Reply With Quote
  #7   (View Single Post)  
Old 22nd October 2008
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Default

jggimi, thanks for your explanation. I'm still a newbie and for my current knowledge that's way too complicated for me... I would like to install openbsd on the partition #1(deleted drive D); how should start?

It will be great if u help me.
Reply With Quote
  #8   (View Single Post)  
Old 22nd October 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by bsdnewbie999 View Post
I would like to install openbsd on the partition #1(deleted drive D); how should start?
I'm not jggimi, but the following are the steps you need to perform:
  1. Back up all important data found on the disk.
  2. Next, study Section 4.5.2 of the FAQ:

    http://openbsd.org/faq/faq4.html#Disks

    Studying the fdisk(8) manpage will be helpful as well.
  3. As the FAQ section points out, you will need to create a primary partition of type A6 via the command:

    # fdisk -e wd0

    You should also make sure that fdisk(8) shows that there is no overlap in sectors used by Windows & OpenBSD.
  4. Once you have saved changes made to the MBR, look at the entries via:

    # fdisk wd0

    ...to ensure that the changes made are actually in place.
  5. At this point, install OpenBSD as discussed in Section 4 of the FAQ.
Reply With Quote
  #9   (View Single Post)  
Old 22nd October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

The OpenBSD install script runs the fdisk(8) program for you. If you answer the question, "Do you want to use *all* of <drive> for OpenBSD?" with the default "no", the install script places you in an interactive fdisk console session (# fdisk -e <drive>). If you answer the question with "yes", it will issue an fdisk reinit, rewriting the MBR table, creating a single A6 MBR partition the spans the entire drive.

After the fdisk program (interactive or the entire drive), the install script then places you in an interactive disklabel(8) session to create the BSD partitions.
Reply With Quote
Old 22nd October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Step by step, to use the existing MBR Partition #1 for OpenBSD, without changing its size (Untested, but may be helpful as a general guide):
  1. Back up your C: drive and your registry. Be prepared to reinstall Windows, in case you make a mistake.
  2. Boot OpenBSD install media.
  3. At the "Do you want to use *all* of <drive> for OpenBSD?" prompt, reply with the default "no". You will enter an interactive fdisk session.
  4. Edit partition #1 ("e" command). Change the partition type to "a6". Press the Enter key for all other options, which should leave all starting and ending positions exactly the same.
  5. Flag partition #1 ("flag" command). This will mark partition #1 as the boot partition.
  6. Write the MBR ("w" command).
  7. quit ("q" command).
  8. The install script will place you in an interactive disklabel session. Set up your bsd partitions as you want them. You need at least an "a" partition, if nothing else.
  9. After installation completes, reboot, using the hard drive as your boot device. OpenBSD should boot. Complete your initial boot, log on as root.
  10. To boot Windows, run the fdisk program and flag partition #0, write the MBR, exit fdisk, and reboot. To boot OpenBSD, use the Windows disk manager to flag the OpenBSD partition as "Active".
Many people with Windows NT-based systems use Windows boot loader for multibooting, as described in the FAQ. I don't. I prefer a multibooter called "GAG." It is more flexible and easier to set up. You can configure all of your booting partitions on a diskette before committing your GAG configuration to hard drive, too. http://gag.sourceforge.net

Last edited by jggimi; 22nd October 2008 at 11:54 AM.
Reply With Quote
Old 23rd October 2008
Oko's Avatar
Oko Oko is offline
Rc.conf Instructor
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 1,102
Default

The Jggimi howto is fantastic. I agree with Jggimi about boot loader. I also prefer GAG over Windows boot loader. I have only one multiboot machine. The story of that machine goes something like this. I got a laptop from my University as my official personal computer. The laptop was pre-installed with Windows XP professional.
I took GParted and moved the Windows XP about 7 GB forward towards extended partition. I installed the GAG and added Windows XP to its menu. Then I did installation along Jggimi description on the first 7GB of the hard drive. I added the OpenBSD to GAG menu and I have now dual boot laptop.
It is interesting to see that my default OpenBSD desktop installation including all of multimedia, TeXLive and a full web-browser is less than 2GB. On the another hand my
minimal Windows XP installation is 19GB.
Reply With Quote
Old 26th October 2008
sysfu sysfu is offline
Port Guard
 
Join Date: Jun 2008
Posts: 36
Default

Does anyone happen to know if the OpenBSD root partition must still be installed within the first 8GB of the disk? Or is that a thing of the past?

Been a while since I've done an OpenBSD/Windows multiboot installation.
Reply With Quote
Old 26th October 2008
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by srf21c View Post
Does anyone happen to know if the OpenBSD root partition must still be installed within the first 8GB of the disk?
Limits to the size of the root partition is due to the age of the BIOS, not the operating system itself. For a good discussion on this issue, study the following:

http://www.dewassoc.com/kbase/hard_d...e_barriers.htm
Reply With Quote
Old 26th October 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

It is true that OpenBSD had an 8GB (8.4GB, actually) limitation; that was lifted at 3.5-release.
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
multibooting OpenBSD 4.4 through Vista's boot manager ocicat Guides 12 8th June 2010 04:28 PM


All times are GMT. The time now is 08:31 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