LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-14-2024, 05:27 PM   #1
cahlucas
Member
 
Registered: Dec 2019
Posts: 41

Rep: Reputation: Disabled
New dual boot system


Hello all,

I am setting up a new dual boot system with Linux mint 21 as primary OS and OpenBSD as secondary OS. The latter OS is installed first and Linux last. When the computer boots, there is no choice, and Linux boots as if there were no OpenBSD. Therefore, grub will have to be configured in such a way that this choice is available. I just don't know how, so I'm asking you for advice. I would like to receive advice from one of you on how to do this job. Kind regards, Karel.
 
Old 03-14-2024, 06:04 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
I don't use any of the BSDs, but a quick search found this which seems a pretty good explanation.
 
Old 03-14-2024, 08:23 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,326
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
It sounds like the grub timeout may be set to zero.

This may help.
 
Old 03-15-2024, 07:46 AM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
If Mint was installed last, I would have expected grub-mkconfig to be run at the end of the install and it would have detected the other OS. You could try booting Mint and running: sudo update-grub to see if you get a BSD entry.

Are both installs UEFI or both Legacy? Are they both on the same physical hard drive? The information on the page linked in post 2 should work for a Legacy install if you get the correct drive and partition.
 
Old 03-15-2024, 01:12 PM   #5
cahlucas
Member
 
Registered: Dec 2019
Posts: 41

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
It sounds like the grub timeout may be set to zero.

This may help.

This gives me a menu with only Linux mint as the only option, OpenBSD is still not available for booting.
 
Old 03-15-2024, 03:49 PM   #6
cahlucas
Member
 
Registered: Dec 2019
Posts: 41

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
I don't use any of the BSDs, but a quick search found this which seems a pretty good explanation.
The installations were performed on an old computer with a BIOS, with 2 hard drives, with Linux mint installed on the primary, and OpenBSD on the secondary hard drive.

Output from update-grub:
Sourcing file `etc/default/grub
Sourcing file `etc/default/grub.d/50_linuxmint.cfg
Sourcing file `etc/default/grub.d/90_custom.cfg
/usr/sbin/grub-mkconfig: 4: /etc/default/grub.d/90_custom.cfg: menuentry: not found

/etc/default/grub.d/50_linuxmint.cfg:
#! /bin/sh
set -e
GRUB_DISTRIBUTOR="Ubuntu"
GRUB_DISABLE_OS_PROBER=false

/etc/default/grub.d/90_custom.cfg:
GRUB_TIMEOUT="5"
GRUB_TIMEOUT_STYLE="menu"
menuentry "OpenBSD" {
set root=(hd1,1)
chainloader +1
}
 
Old 03-15-2024, 09:38 PM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,350

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Delete the /etc/default/grub.d/90_custom.cfg
change these two line in /etc/default/grub to this:
Code:
#GRUB_TIMEOUT_STYLE=HIDDEN
GRUB_TIMEOUT=5
add the following to /etc/grub.d/40_custom:
Code:
menuentry "OpenBSD" {
set root=(hd1)
chainloader +1
}
run
Code:
sudo update-grub
 
Old 03-17-2024, 11:23 AM   #8
cahlucas
Member
 
Registered: Dec 2019
Posts: 41

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
Delete the /etc/default/grub.d/90_custom.cfg
change these two line in /etc/default/grub to this:
Code:
#GRUB_TIMEOUT_STYLE=HIDDEN
GRUB_TIMEOUT=5
add the following to /etc/grub.d/40_custom:
Code:
menuentry "OpenBSD" {
set root=(hd1)
chainloader +1
}
run
Code:
sudo update-grub
Output from update grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/40_custom.cfg'
/usr/sbin/grub-mkconfig: 1: /etc/default/grub.d/40_custom.cfg: menuentry: not found
 
Old 03-17-2024, 11:36 AM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,350

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
The file to edit is not
/etc/default/grub.d/40_custom.cfg
the fille to edit is
/etc/grub.d/40_custom

Last edited by colorpurple21859; 03-17-2024 at 11:38 AM.
 
Old 03-17-2024, 12:05 PM   #10
cahlucas
Member
 
Registered: Dec 2019
Posts: 41

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
The file to edit is not
/etc/default/grub.d/40_custom.cfg
the fille to edit is
/etc/grub.d/40_custom
That does make a difference in scanning its bootable hard drives, but not on the end result. Now I have no menu anymore, and it seems to me that the Partition containing OpenBSD has not been found either.
 
Old 03-17-2024, 12:56 PM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,350

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
Edit /etc/default/grub from this:
Code:
GRUB_TIMEOUT_STYLE=HIDDEN
GRUB_TIMEOUT=0
to
Code:
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5
run update-grub
 
Old 03-17-2024, 01:19 PM   #12
cahlucas
Member
 
Registered: Dec 2019
Posts: 41

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
Edit /etc/default/grub from this:
Code:
GRUB_TIMEOUT_STYLE=HIDDEN
GRUB_TIMEOUT=0
to
Code:
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5
run update-grub
The only difference is that I have my menu back, but there is still no OpenBSD entry visible.
 
Old 03-17-2024, 01:22 PM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,510

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
Since you can boot Mint, why not run sudo fdisk -l to find which drive and partition BSD is seen on from the Mint Grub? Then boot and use the e key on the keyboard to edit the Grub menu to get the correct entry for the drive and partition on which BSD exists. the set root line should show (hd1,1) for the partition on which it resides. If fdisk shows BSD on the first partition of the second drive then (hd1,1) should work. Make a note of what you try. Sees ridiculous to be editing these files and making changes and saving changes and running update-grub when you don't know if anything you are trying will work. Editing from the boot menu is much simpler. Even editing the grub.cfg file and saving the changes is simpler. When you have an entry that works, make the change in the proper file in the grub.d directory.
 
Old 03-17-2024, 01:26 PM   #14
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,350

Rep: Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590Reputation: 1590
One problem fixed.
Post the contents of /etc/grub.d/40_custom

Last edited by colorpurple21859; 03-17-2024 at 01:28 PM.
 
Old 03-17-2024, 02:20 PM   #15
cahlucas
Member
 
Registered: Dec 2019
Posts: 41

Original Poster
Rep: Reputation: Disabled
According to fdisk the OpenBSD root partition is at sdb4, so the set root line should be (hd1,4). For some reason the 40_custom file is not read so the menu cannot be updated. Only the files grub, 50_linuxmint.cfg and init-select.cfg are used. The init-select.cfg file only consists of comments (with #), so it has no significance.

Last edited by cahlucas; 03-17-2024 at 02:29 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual boot Dual hdds, Download of ubuntu 10.1, no vista or dual boot jim d Linux - Newbie 4 11-25-2010 04:18 PM
I want to change from a dual boot system to a single boot system learstar Linux - Newbie 14 07-31-2010 07:40 AM
Dual partition, dual OS, but not dual boot. mikalee Linux - General 7 12-20-2009 10:42 AM
Ubuntu 8.03a3 New Install: GRUB Error 21 after new dual-HDD, dual-boot install tvdxer Ubuntu 1 01-29-2008 01:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration