public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Neil Bothwick <neil@digimed.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: [OT] Making a bootable USB flash drive from ISO image
Date: Mon, 6 Oct 2014 12:52:10 +0100	[thread overview]
Message-ID: <20141006125210.3eb97f62@digimed.co.uk> (raw)
In-Reply-To: <loom.20141003T170545-862@post.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2801 bytes --]

On Fri, 3 Oct 2014 15:19:40 +0000 (UTC), James wrote:

> > I was also wrong in stating I use isohybrid for the LXFDVDs. I used to
> > but since switching to using GRUB to boot the DVDs, there is no need
> > for it. GRUB bootable DVD ISOs can boot from USB sticks by default.  

> Can you elaborate? For example how do you know a given *.iso* is grub
> bootable? It there a test?  Is there a list? Just burn it to a usbstick
> and test?

I'm not referring to booting ISOs from GRUB here, the LXFDVDs use GRUB as
their bootloader, instead of isolinux, which allows for various options
for the builder (me) that aren't available with isolinux.

As fr as booting individual ISOs with GRUB, you can boot any ISO this
way, the problem is telling the distro's init script that you have done
so and that is should look for an ISO image instead of a DVD drive to
load the rest of the files.

With some distros this is trivial, anything Ubuntu derived simply seeds
an extra kernel option to specify the location of the ISO. For others I
had to modify the initrd to get it to work while some have so far
defeated me.

Most do work, but you need to Google for the specifics for that
particular distro, there is no standard way. One Arch-derivative even
changed the names of all the variables in the init script for no apparent
reason other than to pretend it wasn't an arch script.

> Justuse a tool such as the aforementioned "isohybrid" can
> convert any *.iso* to a grub bootable?  I like the idea of one image
> (iso) being able to install via MBR or grub.  

I usually put a System Rescue Cd image in /boot and have this as an
executable file in /etc/grub.d

#!/bin/sh

BOOT_PART="hd0,gpt1"

ISOS=$(ls -1r /boot/systemrescuecd-x86-*.iso)
if [[ -n "$ISOS" ]]; then
	echo -e "submenu \"System Rescue CD\" {"
	echo -e "\tset root='$BOOT_PART'"
	for i in $ISOS; do
		ISO=$(basename $i)
		VER=$(echo $ISO | sed 's/systemrescuecd-x86-\(.*\)\.iso/\1/')
		echo -e "\n\tmenuentry \"System Rescue CD $VER - Std kernel\" {"
		echo -e "\t\tloopback loop /$ISO"
		echo -e "\t\tlinux (loop)/isolinux/rescue64 rootpass=yeahright setkmap=uk isoloop=$ISO"
		echo -e "\t\tinitrd
		(loop)/isolinux/initram.igz" echo -e "\t}"

		echo -e "\n\tmenuentry \"System Rescue CD $VER - Alt kernel\" {"
		echo -e "\t\tloopback loop /$ISO"
		echo -e "\t\tlinux (loop)/isolinux/altker64 rootpass=nochance setkmap=uk isoloop=$ISO"
		echo -e "\t\tinitrd (loop)/isolinux/initram.igz"
		echo -e "\t}"
		done
	echo -e "}\n"
	echo -e "menuentry ' ' { true }\n"
	fi


-- 
Neil Bothwick

Standard: (n., adj.) a design target which manufacturers may embellish, improve
          upon, or ignore as they wish, so long as it can be used profitably
          in their advertising.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      parent reply	other threads:[~2014-10-06 11:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-02 21:11 [gentoo-user] [OT] Making a bootable USB flash drive from ISO image Grant Edwards
2014-10-02 21:24 ` Neil Bothwick
2014-10-02 21:38   ` [gentoo-user] " Grant Edwards
2014-10-02 22:30     ` Neil Bothwick
2014-10-03 15:19       ` James
2014-10-03 23:38         ` thegeezer
2014-10-06 11:52         ` Neil Bothwick [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141006125210.3eb97f62@digimed.co.uk \
    --to=neil@digimed.co.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox