LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-06-2023, 06:58 PM   #1
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Help Building a Menued Mult-Boot USB Drive (Grub2?)


Greetings and thank you in advance for any assistance you might offer.

I am trying to build a bootable USB drive that can work either from Legacy CSM or EFI PCs that will have multiple operating systems displayed as selections in it's menu and I'm guessing Grub2 is probably best for that but I'm a total novice at best for Grub2. I think it would be very useful for installing and maintaining systems on many PCs.

I've partially succeeded by installing Grub2 to a test USB drive which will boot in both modes but I'm failing to get a menu for selecting the 2 operating systems on this pendrive. This one has a Hirens Windows PE type system and a Slackware Install system, and I'd like to add Liveslack as well once it works.

Currently if I select UEFI boot from my Boot Order Menu the PE system boots but directly with no options. So far I can't get the Slackware Installer to show up let alone boot. My totally novice experience with Grub2 is that after manually editing grub.cfg an updater must be run to incorporate the changes. Since I can only get into the Windows PE environment on that pendrive I have no clue how to update grub. I've tried messing with Easy BCD but I'm even less adept at Windows work than Grub2.

All of the guides I find online are for Ubuntu and the like employing some repository to apt-get or whatever package management to configure Grub2 on a portable drive.

Naturally I'd rather do this in Slackware. Can any of you Grub devotees help?
 
Old 02-06-2023, 07:54 PM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
All of the guides I find online are for Ubuntu and the like employing some repository to apt-get or whatever
This is because debian based distros separate grub2 into several smaller packages for efi or legacy booting. Slackware doesn't do this so no additional packages to install. With Slacware the basic install command will be something like this for legacy:
Code:
grub-install --target=i386-pc --boot-directory=xxxxx /dev/<usb drive>
and for uefi
Code:
grub-install --target=x86_64-efi --boot-directory=xxxxx --removable
--boot-directory will be <usb mount point>/boot
For uefi mode the usb will need a fat32 partition mounted at <usb mount point>/boot/efi
before running grub-install

Quote:
I've partially succeeded by installing Grub2 to a test USB drive which will boot in both modes but I'm failing to get a menu for selecting the 2 operating systems on this pendrive.
A grub.cfg file without format/syntax errors in the correct location will give a grub menu.
At the grub prompt
Code:
grub> set
will output information about the grub installation. The prefix line will display where grub points to for the grub.cfg file.

Quote:
My totally novice experience with Grub2 is that after manually editing grub.cfg an updater must be run to incorporate the changes
Assuming you are talking about grub-mkconfig/update-grub. No you do not need to run an updater after editing a grub.cfg. Running an updater will overwrite any edits made to a grub.cfg.

Last edited by colorpurple21859; 02-07-2023 at 05:15 AM.
 
1 members found this post helpful.
Old 02-06-2023, 11:12 PM   #3
tomtomjkw
Member
 
Registered: Jan 2008
Distribution: Slackware64-current
Posts: 154

Rep: Reputation: 43
Do you want to do this as an exercise or do you need it to work?
If it's the latter, maybe there's no need to reinvent the wheel and just use Ventoy?
 
1 members found this post helpful.
Old 02-07-2023, 04:24 AM   #4
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,491

Rep: Reputation: Disabled
As above, Ventoy will do what you want.

https://www.ventoy.net/en/index.html
 
2 members found this post helpful.
Old 02-13-2023, 10:20 AM   #5
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Original Poster
Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Thanks all. Sorry I missed your responses for so long. The consensus seems to suggest at least trying Ventoy so I will happily do exactly that. Looks good!
 
1 members found this post helpful.
  


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
[SOLVED] Buffalo 1 TB usb drive: single or mult partitions? dave_joseph Slackware 6 12-26-2010 01:46 AM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM
Installing mult distros on external usb hd hammanu Linux - Newbie 15 12-17-2007 06:36 PM
mult distro boot help (lilo and grub) cygnus-x1 Linux - General 1 11-08-2007 09:57 PM
Creating mult command alias in BASH labob Linux - Newbie 1 11-18-2004 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:51 PM.

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