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 5th August 2020
tingo tingo is offline
Real Name: Torfinn Ingolfsen
Port Guard
 
Join Date: Oct 2008
Location: Oslo, Norway
Posts: 13
Default OpenBSD 6.7 installation add (gpt) partition?

So I'm trying to install OpenBSD 6.7 (amd64) here. I think the last time I installed OpenBSD was 6.0 or something. Much has changed.
Anyway, I'm installing on a machine which has a few operating systems already, so the hard drive (gpt / guid) already has an EFI partition, and a few others. No problem, I'll just add another gpt partition for OpenBSD and let it use that.

The install program dumps me into the fdisk program, which has "help", and even a manual. Great! Except that there doesn't seems to be an "add" (as in add partition) command in fdisk. Ok, let me try with the edit command then; I can say "edit 3" for example.

But - the edit command think it can start with offset at the same place as the first existing partition - that's no good. I can use the print command to see existing partitions; but it only tells me where they start and the size, not where the last partition ends.

Is there a way to add a partition without a calculator?
__________________
Torfinn
Reply With Quote
  #2   (View Single Post)  
Old 5th August 2020
PapaParrot's Avatar
PapaParrot PapaParrot is offline
parrot
 
Join Date: Jul 2015
Location: Durango, Mx.
Posts: 472
Default

I am not really sure, I have never needed a calculator to install OpenBsd, but I must admit I have not tried a "multi boot" install, I would how ever look at:
https://man.openbsd.org/fdisk and https://www.openbsd.org/faq/faq4.html
Quote:
Disk Partitioning
OpenBSD can be installed in as little as 512MB, but using a device that small is something for advanced users. Until you have some experience, 8GB or more disk space is recommended.

Unlike some other operating systems, OpenBSD encourages users to split their disk into a number of partitions, rather than just one or two large ones. Some of the reasons for doing so are: ----snipt---
Read about disklabel's defaults for automatic disk allocation
The Automatic Disk allocation option is what I use, that might be of use to you :
https://man.openbsd.org/disklabel#AU...ISK_ALLOCATION
=================================================
In addition on Multi booting , the FAQ again:
Quote:
https://www.openbsd.org/faq/faq4.html
Multibooting
Multibooting is having several operating systems on one computer, with some means of selecting which OS is to boot. You may want to familiarize yourself with the OpenBSD boot process before you start. A brief introduction to fdisk(8) is in the section on using OpenBSD's fdisk.

If you are adding OpenBSD to an existing system, you will probably need to create some free space before installing OpenBSD. In addition to your existing system's native tools, gparted may be useful for deleting or resizing existing partitions. Preferably use one of the four primary MBR partitions for booting OpenBSD. Extended partitions may not work.

rEFInd is reported to usually work. GRUB is reported to usually fail. In either case, you are completely on your own.
Some one else may be able to give you more details,..
__________________
My best friends are parrots

Last edited by PapaParrot; 5th August 2020 at 06:18 PM.
Reply With Quote
  #3   (View Single Post)  
Old 5th August 2020
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bloaty McBloatFace
 
Join Date: Dec 2015
Location: London
Posts: 201
Default

I just use gdisk (from a Linux distribution) to create a partition of type a600 to hold OpenBSD before loading the installer. It's a bit pathetic but I'm more familiar with that tool.
__________________
Linux is for people who hate Windows. BSD is for people who love UNIX.
Reply With Quote
  #4   (View Single Post)  
Old 5th August 2020
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 257
Default

If I'm not mistaken you can only have four partition table slots. Which is why there is no add command. You simply just edit either of 0, 1, 2, or 3.

Here's what mine looks like:
Code:
 
Disk: wd0       geometry: 19457/255/63 [312581808 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: EE      0   0   2 -     25 127  14 [           1:      409639 ] EFI GPT     
 1: AF     25 127  15 -   6014  25   3 [      409640:    96206848 ] MacOS X HFS+
*2: A6   6030 137  60 -  19457  53  52 [    96880640:   215699456 ] OpenBSD     
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
Maybe this might help (emphasis mine):
Code:
     edit #  Edit a given table entry in the memory copy of the current boot
             block.  Sizes may be adjusted in BIOS geometry mode (MBR only) or
             using sector offsets and sizes.  A unit ‘b’, ‘k’, ‘m’, or ‘g’ may
             be appended to indicate bytes, kilobytes, megabytes, or
             gigabytes.  The special size value ‘*’ will cause the partition
             to be sized to use the remainder of the disk.
Reply With Quote
  #5   (View Single Post)  
Old 5th August 2020
Head_on_a_Stick's Avatar
Head_on_a_Stick Head_on_a_Stick is offline
Real Name: Matthew
Bloaty McBloatFace
 
Join Date: Dec 2015
Location: London
Posts: 201
Default

Quote:
Originally Posted by fvgit View Post
If I'm not mistaken you can only have four partition table slots
That limitation does not apply to GUID partition tables, they can accommodate 128 partitions in the default configuration and that number can be increased.
__________________
Linux is for people who hate Windows. BSD is for people who love UNIX.
Reply With Quote
  #6   (View Single Post)  
Old 5th August 2020
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 257
Default

I don't think OpenBSD's fdisk(1) supports this, or does it?
Reply With Quote
  #7   (View Single Post)  
Old 5th August 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,093
Default

It supports GPT partitions 0 through 127.
Reply With Quote
  #8   (View Single Post)  
Old 7th August 2020
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 257
Default

I feel stupid now, lol. For some odd reason when looking at the manpage I saw the '#' entry under the MBR example (which lists the four slot limitation) and somehow mixed it up with that of the GPT example 36 lines further down (which doesn't list any limitation). That's what you get for sloppily jumping around between browser windows and terminal workspaces.

We really need a facepalm smiley.
Reply With Quote
  #9   (View Single Post)  
Old 7th August 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,093
Default

No, there's nothing in the manual about it. I created a test file, attached a vnode with vnconfig(8), wrote a GPT with fdisk(8), and tested the sector numbers to discover the valid sector range.
Reply With Quote
Old 13th August 2020
tingo tingo is offline
Real Name: Torfinn Ingolfsen
Port Guard
 
Join Date: Oct 2008
Location: Oslo, Norway
Posts: 13
Smile

Since there isn't an "OpenBSD way" to do it, I simply used gpart from FreeBSD to create the partition, like so
Code:
gpart add -t openbsd-data -s 60G da0
. That worked nicely.
__________________
Torfinn
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
Install OpenBSD in more than one disk partition? betweendayandnight OpenBSD Installation and Upgrading 6 17th July 2015 05:51 PM
Mounting a NetBSD partition from OpenBSD daemonfowl OpenBSD General 4 19th July 2012 12:03 PM
FBSD 7.2 installation not seeing partition table correctly Mantazz FreeBSD Installation and Upgrading 0 2nd July 2009 11:36 AM
freebsd 7 installation partition size for 250gb harddrive ijk FreeBSD Installation and Upgrading 17 20th October 2008 07:50 PM
disklabel don't see OpenBSD partition piotrk OpenBSD General 4 25th September 2008 06:14 PM


All times are GMT. The time now is 09:08 AM.


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