DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 10th December 2013
DaBSD DaBSD is offline
Shell Scout
 
Join Date: Jan 2013
Location: Russia/Iceland
Posts: 102
Default Multi-ISO boot

I'm wondering whether it's possible to make a multiboot USB drive without making a separate partition for each distro, but running them from a (bootable) ISO file. In other words, if I wanted to have 20 live distros on the drive, I'd just make two partitions (instead of 1+20), the one for bootloader and the other for containing all the 20 ISOs. Is this possible, theoretically and practically?
Reply With Quote
  #2   (View Single Post)  
Old 11th December 2013
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

You can't boot/load an ISO file directly, at least, I wasn't able to figure out a way when I looked for it a bunch of years ago. However, you achieve the same effect using syslinux. I created a DOS/WinPE/FreeBSD/Linux/Memtest multiboot drive with syslinux.

Syslinux is a bootloader, like grub. The name is slightly confusing, it doesn't really have anything to do with Linux (the kernel or OS) as such, I believe the name stems from the fact that it was originally written to boot Linux, but it can boot pretty much anything.

I also needed to format my USB drive using BOOTICE, I don't quite remember which options worked best, so you'll need to look that up or experiment. Some USB drives may also work out-of-the-box.

Using isolinux, you can also make a bootable CD/DVD with this, the only difference is that the config file is named /boot/isolinux/isolinux.cfg

It's been a few years since I did this, I believe there's been a major rewrite of syslinux, so this example might not work with the newer version, but it should give you an idea on how to proceed. Also, back then the FreeBSD port of syslinux was seriously broken, I don't know if this is still the case or if it's fixed.

Anyway, here's my config:

/boot/syslinux/syslinux.cfg
Code:
PROMPT 0
TIMEOUT 30
DEFAULT main

LABEL main
KERNEL /boot/syslinux/menu.c32
APPEND /boot/syslinux/menu.cfg
/boot/syslinux/menu.cfg
Code:
DEFAULT freedos

MENU TITLE Anduril 1.3

# MENU COLOR element ansi foreground background shadow
MENU COLOR TITLE 1;37;44
MENU COLOR TABMSG 37;40

MENU MARGIN 2
MENU ROWS 19
MENU TABMSGROW 25
MENU CMDLINEROW 25
MENU HELPMSGROW -1

label freedos
MENU LABEL ^1 FreeDOS
KERNEL /boot/syslinux/memdisk
APPEND initrd=/boot/freedos.gz

label freebsd
MENU LABEL ^2 FreeBSD
#KERNEL /boot/syslinux/mboot.c32
#APPEND /boot/freebsd/kernel --- /boot/freebsd/mfsroot.gz
KERNEL /boot/syslinux/memdisk
APPEND initrd=/boot/freebsd.gz harddisk raw

label parted
MENU LABEL ^3 Parted Magic 5.9
LINUX /boot/pmagic/bzImage
INITRD /boot/pmagic/initramfs
APPEND edd=off noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791 loglevel=0 max_loop=256 keymap=us directory=/boot/

label win7pe
MENU LABEL ^4 Win7PE
#KERNEL /boot/loader.bin
KERNEL /boot/grub.exe
APPEND --config-file="chainloader /boot/BOOTMGR"

MENU SEPARATOR

label memtest
MENU LABEL ^5 Memtest86+ 4.20
KERNEL /boot/memtest

label memtest_probe
MENU LABEL ^6 Memtest86+ 4.00 Probe method (Might work if the default doesn't)
KERNEL /boot/memtest_probe

label hpmemtest
MENU LABEL ^7 HP Vision Diagnostics Memory Test 1.7
KERNEL /boot/syslinux/memdisk
APPEND initrd=/boot/hp_memtest.gz

# http://pciids.sourceforge.net/v2.2/pci.ids.gz
label hdt
MENU LABEL ^8 System Information (HDT)
TEXT HELP
ENDTEXT
KERNEL /boot/syslinux/hdt.c32

MENU SEPARATOR

LABEL hdd1
MENU LABEL ^9 Boot first hard disk
LOCALBOOT 0x81
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #3   (View Single Post)  
Old 12th December 2013
DaBSD DaBSD is offline
Shell Scout
 
Join Date: Jan 2013
Location: Russia/Iceland
Posts: 102
Default

Thank you Carpetsmoker, it does do the thing! Even though it's been my first experience with syslinux which in fact didn't go down too well.. could you please show me your menu.c32 too? Cause I couldn't activate the boot menu and it just booted straight into the default option.

I made 2 memory stick versions of ISO installs of NetBSD-6.0.1 and ..-6.1.1 via mkmemstick in order to try them on my old eMachines netbook, so I used them on that USB drive. To my disappointment none of them could load further than their internal boot menu.
Reply With Quote
  #4   (View Single Post)  
Old 8th March 2014
DaBSD DaBSD is offline
Shell Scout
 
Join Date: Jan 2013
Location: Russia/Iceland
Posts: 102
Default

Quote:
Originally Posted by Carpetsmoker View Post
You can't boot/load an ISO file directly, at least, I wasn't able to figure out a way when I looked for it a bunch of years ago.
Well, I've just found out that GRUB2 does support booting from ISO, at least in Ubuntu Linux with its numerous derivatives, Gentoo and some other.

The grub.cfg entry would look similar to the following:

Code:
menuentry "Ubuntu Live" {
set root=(hd0,7)
loopback loop /ubuntu-11.04-desktop-amd64.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu-11.04-desktop-amd64.iso noeject noprompt --
initrd (loop)/casper/initrd.lz
}
P.S. I haven't tried this method myself, just copypasting.
Reply With Quote
  #5   (View Single Post)  
Old 12th December 2013
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Quote:
could you please show me your menu.c32 too
menu.c32 is a binary that's shipped with syslinux. By default, syslinux only has a commandline interface & programming API, menu.c32 will actually provide the menu.

I would encourage you to go to the syslinux website and read the documentation, start with a simple example which boots only one system, and add more later. My config is just an example which may or may not work for you.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #6   (View Single Post)  
Old 12th December 2013
DaBSD DaBSD is offline
Shell Scout
 
Join Date: Jan 2013
Location: Russia/Iceland
Posts: 102
Default

Quote:
Originally Posted by Carpetsmoker View Post
menu.c32 is a binary that's shipped with syslinux. By default, syslinux only has a commandline interface & programming API, menu.c32 will actually provide the menu.

I would encourage you to go to the syslinux website and read the documentation, start with a simple example which boots only one system, and add more later. My config is just an example which may or may not work for you.
Yes, I read the main help page on the Syslinux website, but it wasn't quite illustrative on that issue. (BTW, menu.c32 shipped with the newest version of syslinux gets rejected by the loader, which according to Google happens not only to myself.) But anyway, even when I made a menu-free boot config and the syslinux stage was overcome, it didn't work any further, so the problem must be not with syslinux, but with the images made via NetBSD's mkmemstick tool. Checked this USB stick on two computers with the same result, or rather lack of it.
Reply With Quote
  #7   (View Single Post)  
Old 21st December 2013
DaBSD DaBSD is offline
Shell Scout
 
Join Date: Jan 2013
Location: Russia/Iceland
Posts: 102
Default

I've tried to boot a few other OS images with Syslinux (non-BSD) and they worked fine (among them KolibriOS, booted in 2-3 seconds, fantastic!). It seems to me that the root of the above-mentioned problem might be that for some reasons NetBSD images don't play well together with Syslinux, that's the conclusion I've come to.
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
Altq on multi wan and multi zone environment apsaras OpenBSD Security 0 26th May 2012 11:19 PM
Parted Magic update brings multi-boot CD changes J65nko News 0 25th November 2011 01:38 PM
Multi-boot system with Mac aleunix Other BSD and UNIX/UNIX-like 3 13th June 2008 12:16 AM
Multi Boot Fedora 9sulphur), centOS and FreeBSD FloridaBSD Other BSD and UNIX/UNIX-like 4 20th May 2008 06:26 PM
Looking to multi boot Fedora. CentOS and BSD FloridaBSD Off-Topic 4 19th May 2008 11:20 PM


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