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 21st July 2016
Funkygoby Funkygoby is offline
Fdisk Soldier
 
Join Date: Aug 2015
Posts: 57
Default MultiBoot OpenBSD/Debian

Hello there!

Long description, then problem, then question.

Description:
My main OS is Debian oldstable for now on my main laptop and I used to teach myself OpenBSD with a spare dedicated latptop.
This second laptop as been lend to a friend who was in distress since here macbook had died.

Now, this laptop is back in my house and I can resume my learning.
I was planning to install Debian jessie for android dev and OpenBSD on his disk.

-First I installed Debian. I partitionned the disk like that:
sda1 50GB empty (for OBSD)
sda2 50GB for debian separated in 3 logicals partitions (/,swap and /home)
Installation went smoothly as I am seasonned with debian installation.

-Then, I proceed with OBSD installation (not my first time either but still newbie).
I may not remember exactly what I did but I am pretty sure I choose (e)dit at the partition step, didn't see the layout I was expecting (2 primary partitions), tried to build some layout anyway then cancelled.

At this point, I was expecting the layout to be still intact but I was wrong...

Problem:
On reboot, no os found. So I reinstalled debian 8 and I am waiting for more insight before retrying the OBSD install.

Question:
When does OpenBSD fdisk proceed? I though that any writing on disk wouldn't occur until I say so?
Reply With Quote
  #2   (View Single Post)  
Old 21st July 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

I'm dualbooting Debian Testing with OpenBSD current on an i386 system.

I installed Debian with
/ = /dev/sda1
swap = /dev/sda2
/home = /dev/sda3

Leave space for OpenBSD on /dev/sda4

Use fdisk to label sda4 as an OpenBSD file system (Type A6). Then install OpenBSD into the OpenBSD partition. Do not use the whole disk!

Reboot to debian and add an OpenBSD chain loading command in /etc/grub.d. Run # update-grub

This is a rough overview - I can provide specifics if needed later.

Last edited by shep; 24th July 2016 at 02:42 PM. Reason: Added f/u, corrected update-grub, /etc/grub -> /etc/grub.d
Reply With Quote
  #3   (View Single Post)  
Old 22nd July 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

To answer one very specific question:
Quote:
Originally Posted by Funkygoby View Post
When does OpenBSD fdisk proceed? I though that any writing on disk wouldn't occur until I say so?
In command mode, "quit" will write your changes. You must use "exit". Excerpted from fdisk(8).
Code:
     exit    Exit the current level of fdisk, either returning to the
             previously selected in-memory copy of a MBR, or exiting the
             program if there is none.

     quit    Exit the current level of fdisk, either returning to the
             previously selected in-memory copy of a MBR, or exiting the
             program if there is none.  Unlike exit it does write the modified
             block out.
Reply With Quote
  #4   (View Single Post)  
Old 22nd July 2016
scottro's Avatar
scottro scottro is offline
Real Name: Scott Robbins
ISO Quartermaster
 
Join Date: Apr 2008
Location: NYC
Posts: 652
Default

Shep's way works fine, I've used it frequently. I have a short page that goes into a bit more detail, but basically reiterates what was said in Shep's post.

https://srobb.net/openbsdmultiboot.html

Last edited by scottro; 22nd July 2016 at 08:17 PM.
Reply With Quote
  #5   (View Single Post)  
Old 22nd July 2016
e1-531g e1-531g is offline
ISO Quartermaster
 
Join Date: Mar 2014
Posts: 628
Default

I have Windows and OpenBSD dualboot and I use similar shep's way.
I use Grub-modern (Grub2) from Debian Jessie amd64 Live Standard image as bootloader. I don't have Debian installed and I haven't while installing OpenBSD and/or bootloader. Just booted from Live image and installed Grub2.
Grub2 is far less bloated than Windows boot menu program.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
  #6   (View Single Post)  
Old 23rd July 2016
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 373
Default

Quote:
Originally Posted by shep View Post
I'm dualbooting Debian Testing with OpenBSD current on an i386 system.

I installed Debian with
/ = /dev/sda1
swap = /dev/sda2
/home = /dev/sda3

Leave space for OpenBSD on /dev/sda4

Use fdisk to label sda4 as an OpenBSD file system (Type A6). Then install OpenBSD into the OpenBSD partition. Do not use the whole disk!

Reboot to debian and add an OpenBSD chain loading command in /etc/grub. Run # update-grub

This is a rough overview - I can provide specifics if needed later.
I run a similar set-up dual booting Slackware 14.2 and OpenBSD 5.9. The only difference is that I add the following at the end of /etc/lilo.conf

other = /dev/sda4
label = OpenBSD
table = /dev/sda

After editing /etc/lilo.conf I run # lilo -P fix and reboot. That will do it.
__________________
hitest
Reply With Quote
  #7   (View Single Post)  
Old 23rd July 2016
Funkygoby Funkygoby is offline
Fdisk Soldier
 
Join Date: Aug 2015
Posts: 57
Default

Thanks all.

@jggimi:
So fsdisk is the same in the installer and in the base and as such, behave the same way. I'll be more careful when I reach the fdisk step.

@shep, scottro, e1-531g, hitest:
Ok, I will retry this after I format a primary part to OpenBSD type.
After the install a simple os-probe and grub-install will suffice under debian.
Reply With Quote
  #8   (View Single Post)  
Old 23rd July 2016
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 373
Smile

Quote:
Originally Posted by shep View Post
Reboot to debian and add an OpenBSD chain loading command in /etc/grub. Run # update-grub

This is a rough overview - I can provide specifics if needed later.
Hey shep, thanks for the overview! Can you please provide the chain loading command in /etc/grub? I am curious.
__________________
hitest
Reply With Quote
  #9   (View Single Post)  
Old 24th July 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Quote:
Originally Posted by hitest View Post
Hey shep, thanks for the overview! Can you please provide the chain loading command in /etc/grub? I am curious.
I used this guide. Also found in the mailing lists.

My /etc/grub.d/40_custom

Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "OpenBSD Current" {
        set root=(hd0,4)
        chainloader +1
}

Last edited by shep; 24th July 2016 at 02:52 PM.
Reply With Quote
Old 24th July 2016
hitest's Avatar
hitest hitest is offline
Real Name: George Nielsen
VPN Cryptographer
 
Join Date: Sep 2008
Location: B.C., Canada
Posts: 373
Thumbs up

Quote:
Originally Posted by shep View Post
My /etc/grub.d/40_custom

Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "OpenBSD Current" {
        set root=(hd0,4)
        chainloader +1
}
Thanks, shep.
__________________
hitest
Reply With Quote
Old 25th July 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Quote:
Originally Posted by Funkygoby View Post
Thanks all.

@jggimi:
So fsdisk is the same in the installer and in the base and as such, behave the same way. I'll be more careful when I reach the fdisk step.
My understanding is that fdisk has some variations between linux distributions and BSD's

After installing Debian, I installed Debian's fdisk package and used it to label the /dev/sda4 partition as A6. You could probably drop to the command line and run OpenBSD fdisk during the OpenBSD install. I felt more comfortable editing partition tables in Debian's bootloader using Debian's fdisk.
Reply With Quote
Old 25th July 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

OpenBSD's fdisk was rewritten in 1997. Prior to that it used a port of NetBSD's fdisk.
Reply With Quote
Old 28th July 2016
Nureo Nureo is offline
Sam98
 
Join Date: May 2016
Posts: 24
Smile

Well. Here I found a solution. For Debian, through Trisquel (based on Ubuntu: based on Debian). Both uses GRUB2 any way.

For what I heard (just opinions, they depends of hardware), is better to install OpenBSD in a first partition, and in the second a GNU system, if you want the dual boot. But is OK.

You have GNU on the first partition. Did you install OpenBSD in a second? Well, let's configure GRUB2 on Debian:

Quote:
$ sudo nano /etc/grub.d/40_custom
Immediately downside of comments (with those "#") lines. Initial "..." are a “Tab”:

Quote:
menuentry "OpenBSD" {
...set root=(hd0,1)
...chainloader +1
}
If you have OpenBSD on the first partition, this section: “...set root=(hd0,1)” stays like that. If it is not, just change, and put “...set root=(hd0,2)”. If you have troubles, please tell me here.

When you get it, just "Ctrl+X", "Y" (yes), and "Enter". Changes saved.

Like root:

Quote:
# update-grub
And then...

Quote:
# grub-mkconfig -o /boot/grub/grub.cfg
Almost done...

GRUB2 may ask you for a user to log into a Operative System partition. The user will be "grub", but you don't know the password (five numbers).

You can use the password, by knowing it, or you can delete it by editing a configuration text:
Quote:
$ sudo nano /boot/grub/grub.cfg
When it says:
Quote:
### BEGIN /etc/grub.d/01_PASSWORD ###
set superusers=grub
password grub FIVENUMBERS
### END /etc/grub.d/01_PASSWORD ###
If you don't want any more the password requirement, do this (comment this lines):
Quote:
### BEGIN /etc/grub.d/01_PASSWORD ###
### set superusers=grub
### password grub FIVENUMBERS
### END /etc/grub.d/01_PASSWORD ###
"Ctrl+X", "Y" (yes), y "Enter". Changes saved.

NOTE: Do not try then "sudo update-grub" or "sudo update-grub2". If you do it the password may be reestablished.

Well. Reboot, and tell us how it goes!
Reply With Quote
Old 28th July 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Quote:
For what I heard (just opinions, they depends of hardware), is better to install OpenBSD in a first partition, and in the second a GNU system, if you want the dual boot. But is OK.
I've read that a number of factors need to be considered to optimize a partition layout.

The lower numbered partitions occupy a more peripheral, physical location on the disk - more disk area will pass the read/write head per revolution.

Using this rationale, I would put the OS that I intend to predominately utilize on the lower numbered, more peripheral partitions.
Reply With Quote
Old 29th July 2016
girarde girarde is offline
Fdisk Soldier
 
Join Date: Nov 2010
Location: NW FL
Posts: 75
Default platter surface speed

If platter surface speed is going to matter very much, either you have pretty old disks or your application is sufficiently time critical that you should rethink dual booting without adding a spindle for the second OS.
Reply With Quote
Old 2nd August 2016
bsd-keith bsd-keith is online now
Real Name: Keith
Open Source Software user
 
Join Date: Jun 2014
Location: Surrey/Hants Border, England
Posts: 344
Default

From what I can remember, it used to be advised to put all BSDs first before Linux, because of a disk size limit for booting. or something, but that used to be about an 8GB limit, & I think that is no longer the case - but I would always put BSD before Linux.
__________________
Linux since 1999, & also a BSD user.
Reply With Quote
Old 2nd August 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Quote:
Originally Posted by bsd-keith View Post
From what I can remember, it used to be advised to put all BSDs first before Linux, because of a disk size limit for booting...
On amd64 and i386, the OpenBSD two-stage bootloader uses BIOS services to load the kernel into memory. The kernel location on disk must be addressable by the BIOS. The specific limitation varies, depending on the individual BIOS implementation and the disk technology being used.

While no longer an issue with modern BIOS and disk drive technologies, one never really knew the address limit without actually testing it. As I recall, the limit could range from as little as 528MB upward into a wide variety of GB limits.

One of the benefits of having a small root directory was to avoid discovering the limit after updating or upgrading, and having a new kernel with sectors outside the BIOS addressing limit.

But with more modern hardware, this is much less of a concern and the "large drive" considerations that discussed the BIOS limit were removed from the FAQ.
Reply With Quote
Old 2nd August 2016
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

Quote:
Originally Posted by bsd-keith View Post
From what I can remember, it used to be advised to put all BSDs first before Linux, because of a disk size limit for booting. or something...
It is a BIOS limitation. One of the better explanations I have seen is at the following:

http://www.dewassoc.com/kbase/hard_d...e_barriers.htm

Reply With Quote
Old 3rd March 2019
hrsetrdr's Avatar
hrsetrdr hrsetrdr is offline
Port Guard
 
Join Date: Jul 2008
Posts: 25
Default

Quote:
Originally Posted by shep View Post
I'm dualbooting Debian Testing with OpenBSD current on an i386 system.

I installed Debian with
/ = /dev/sda1
swap = /dev/sda2
/home = /dev/sda3

Leave space for OpenBSD on /dev/sda4

Use fdisk to label sda4 as an OpenBSD file system (Type A6). Then install OpenBSD into the OpenBSD partition. Do not use the whole disk!

Reboot to debian and add an OpenBSD chain loading command in /etc/grub.d. Run # update-grub

This is a rough overview - I can provide specifics if needed later.
I am planning this very same type install, just wondering if this thread is still relevant for a Debian + OBSD 6.4?
__________________
Supermicro X9DRD-7LN4F-JBOD | (2) Xeon E5-2670 | 32GB DDR3 ECC Registered |OpenBSD 6.4
Endeavoring to resolve my Linux dependancies.
Reply With Quote
Old 4th March 2019
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Quote:
Originally Posted by hrsetrdr View Post
I am planning this very same type install, just wondering if this thread is still relevant for a Debian + OBSD 6.4?
This is still relevant for MBR bootloaders. In the interim GPT/UEFI bootloading has become a newer option for supported hardware. I'm presently running Debian 10(Buster) and OpenBSD 6.4 with a GPT bootloader and this entry in Debian /etc/grub.d/40_custom

Code:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'OpenBSD' {
         insmod part_gpt
         insmod search_fs_uuid
         insmod chain
         chainloader (hd0,gpt1)/BSD_BOOTX64.EFI
}
I renamed BOOTX64.EFI from OpenBSD to BSD_BOOTX64.EFI and copied it over to Debian /boot/efi/.

You can source BOOTX64.EFI from this howto:

https://blog.jasper.la/openbsd-uefi-...der-howto.html

Remember to create a new /boot/grub/grub.cfg file with the root command: update-grub.

Last edited by shep; 4th March 2019 at 12:11 AM.
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
Microsoft has released a Debian Linux switch OS. Repeat, a Debian Linux switch OS J65nko News 9 12th March 2016 11:58 PM
GAG as a multiboot manager? blackhole OpenBSD Packages and Ports 9 23rd December 2014 09:42 PM
Misc. BSD/UNIX Debian Forked Over Systemd J65nko News 10 30th November 2014 12:39 AM
Debian + FreeBSD bsdperson Other BSD and UNIX/UNIX-like 20 22nd August 2011 06:41 PM
Debian 5.0 released ephemera Other BSD and UNIX/UNIX-like 36 26th November 2010 04:50 PM


All times are GMT. The time now is 01:32 PM.


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