* [gentoo-user] [OT] Making a bootable USB flash drive from ISO image
@ 2014-10-02 21:11 Grant Edwards
2014-10-02 21:24 ` Neil Bothwick
0 siblings, 1 reply; 7+ messages in thread
From: Grant Edwards @ 2014-10-02 21:11 UTC (permalink / raw
To: gentoo-user
In order to test some stuff, I needed to install Xubuntu in one of the
hard drive partitions on a 5-6 year old generic tower machine.
I downloaded the Xubuntu 14.04.1 AMD64 ISO, which at 935MB no longer
fits on a single CD. So I burned a DVD+R. It failed to boot. The
drive in which I burned it is rather suspect, so I tossed the DVD and
changed tack: I've got a couple 4+ GB USB flash drives laying on my
desk, so I decided to try making a bootable USB flash drive.
Google pointed me to various sets of instructions which seemed to
either involve either
1) Mounting the ISO image, copying files around, downloading various
other bits, and just a lot of faffing around in general.
2) Installing something like unetbootin (which presumably automates
all the faffing) which then requires installing a bunch of other
stuff (including Qt).
But, I found one blog post which said that just using 'dd' to copy an
ISO image to the USB flash drive usually "just worked".
So I dd'ed the 935MB ISO image to the flash drive and plugged it into
the target machine, hit the reset button, hit F11 for the boot menu,
picked the USB flash drive from the list, and Bob's your uncle: it
booted and installed just fine.
What I'm wondering is why all the blog posts, wiki pages, and HOWTOs
showing either the complicated command-line procedures or
dependency-heavy "USB creator" apps? (Many of them quite recent.)
Did this work because the Xubuntu people do something special when
creating the ISO image? (If so, then they have my thanks!)
Is what I thought was a plain vanilla ASROCK/Nvidia AM2+ motherboard
BIOS something special? (It's an AMI BIOS dated 2009, so it's nothing
particularly recent.)
--
Grant Edwards grant.b.edwards Yow! Let me do my TRIBUTE
at to FISHNET STOCKINGS ...
gmail.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] [OT] Making a bootable USB flash drive from ISO image
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
0 siblings, 1 reply; 7+ messages in thread
From: Neil Bothwick @ 2014-10-02 21:24 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1027 bytes --]
On Thu, 2 Oct 2014 21:11:03 +0000 (UTC), Grant Edwards wrote:
> What I'm wondering is why all the blog posts, wiki pages, and HOWTOs
> showing either the complicated command-line procedures or
> dependency-heavy "USB creator" apps? (Many of them quite recent.)
There is no need for them.
> Did this work because the Xubuntu people do something special when
> creating the ISO image? (If so, then they have my thanks!)
They did something, but it's not particularly special. All they did was
run isohybrid (from syslinux) on the ISO image. It uses unused space at
the start of the DVD ISO specification that is normally left blank to
hold a partition table so the image can be copied to a USB drive and
appear as a partitioned disk.
I use it all the time with the Linux Format cover DVDs, not only to make
sure that they are USB bootable but also to ensure that any ISOs on the
DVD are also USB bootable.
--
Neil Bothwick
There is absolutely no substitute for a genuine lack of preparation.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-user] Re: [OT] Making a bootable USB flash drive from ISO image
2014-10-02 21:24 ` Neil Bothwick
@ 2014-10-02 21:38 ` Grant Edwards
2014-10-02 22:30 ` Neil Bothwick
0 siblings, 1 reply; 7+ messages in thread
From: Grant Edwards @ 2014-10-02 21:38 UTC (permalink / raw
To: gentoo-user
On 2014-10-02, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Thu, 2 Oct 2014 21:11:03 +0000 (UTC), Grant Edwards wrote:
>
>> What I'm wondering is why all the blog posts, wiki pages, and HOWTOs
>> showing either the complicated command-line procedures or
>> dependency-heavy "USB creator" apps? (Many of them quite recent.)
>
> There is no need for them.
>> Did this work because the Xubuntu people do something special when
>> creating the ISO image? (If so, then they have my thanks!)
>
> They did something, but it's not particularly special. All they did was
> run isohybrid (from syslinux) on the ISO image. It uses unused space at
> the start of the DVD ISO specification that is normally left blank to
> hold a partition table so the image can be copied to a USB drive and
> appear as a partitioned disk.
There must be a little more to it than that. Does it also install
along with a parition table some bootloader code that knows where/how
to boot the ISO boot image? [After a little googling] It also
installs MBR bootloader code that knows how to find/load isolinux.bin:
http://www.syslinux.org/wiki/index.php/Isohybrid
Interestingly, it also created a second EFI boot partition which
exists inside the main parition.
$ sudo fdisk -l /dev/sdd
Disk /dev/sdd: 7.3 GiB, 7864320000 bytes, 15360000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x19fabbe1
Device Boot Start End Blocks Id System
/dev/sdd1 * 0 1904639 952320 0 Empty
/dev/sdd2 14296 18967 2336 ef EFI (FAT-12/16/32)
I can mount the sdd2 VFAT partition, and there are a couple files
in there:
sdd2
└── efi
└── boot
├── bootx64.efi
└── grubx64.efi
--
Grant Edwards grant.b.edwards Yow! SHHHH!! I hear SIX
at TATTOOED TRUCK-DRIVERS
gmail.com tossing ENGINE BLOCKS into
empty OIL DRUMS ...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: [OT] Making a bootable USB flash drive from ISO image
2014-10-02 21:38 ` [gentoo-user] " Grant Edwards
@ 2014-10-02 22:30 ` Neil Bothwick
2014-10-03 15:19 ` James
0 siblings, 1 reply; 7+ messages in thread
From: Neil Bothwick @ 2014-10-02 22:30 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
On Thu, 2 Oct 2014 21:38:36 +0000 (UTC), Grant Edwards wrote:
> > They did something, but it's not particularly special. All they did
> > was run isohybrid (from syslinux) on the ISO image. It uses unused
> > space at the start of the DVD ISO specification that is normally left
> > blank to hold a partition table so the image can be copied to a USB
> > drive and appear as a partitioned disk.
>
> There must be a little more to it than that. Does it also install
> along with a parition table some bootloader code that knows where/how
> to boot the ISO boot image? [After a little googling] It also
> installs MBR bootloader code that knows how to find/load isolinux.bin:
>
> http://www.syslinux.org/wiki/index.php/Isohybrid
Yes, the unused space contains the MBR; partition table and bootloader.
Plus it adds some more code at the end of the image.
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.
That's the trouble with writing scripts to take care of routine tasks,
you forget when you are actually doing beyond running the script.
> Interestingly, it also created a second EFI boot partition which
> exists inside the main parition.
That must be a UEFI bootable disc. ISOs can have all sorts of strange
setups, I have to make the LXFDVDs readable on a Mac, which results in
an HFS+ filesystem being nested inside the ISO one.
--
Neil Bothwick
Become a gynaecologist, look up a friend today.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [gentoo-user] Re: [OT] Making a bootable USB flash drive from ISO image
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
0 siblings, 2 replies; 7+ messages in thread
From: James @ 2014-10-03 15:19 UTC (permalink / raw
To: gentoo-user
Neil Bothwick <neil <at> digimed.co.uk> writes:
> 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.
Neil,
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? 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.
How do you control the file system; set it up first on the target HDD/SDD?
Which tool do you use, as part of the usb package? gptfdisk (gdisk)?
> That must be a UEFI bootable disc. ISOs can have all sorts of strange
> setups
Your telling me? So when did the gentoo liveDVD become "grub bootable" ?
Again, How do you know what a given images is capable, as the details of
so many seem to poor--> 2----> undocumented......?
Have you ever tried "pentoo-installer" off of a live gentoo dvd ?
with any usb iso?
curiously,
James
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: [OT] Making a bootable USB flash drive from ISO image
2014-10-03 15:19 ` James
@ 2014-10-03 23:38 ` thegeezer
2014-10-06 11:52 ` Neil Bothwick
1 sibling, 0 replies; 7+ messages in thread
From: thegeezer @ 2014-10-03 23:38 UTC (permalink / raw
To: gentoo-user
On 03/10/14 16:19, James wrote:
> Neil Bothwick <neil <at> digimed.co.uk> writes:
>
>
>
>> 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.
> Neil,
>
> Can you elaborate? For example how do you know a given *.iso* is grub
> bootable?
All ISO files are grub2 bootable.
however, once booted, they need to be aware to search for the iso file
itself as otherwise they search for cdrom/files
> It there a test? Is there a list? Just burn it to a usbstick
> and test?
google for grub2 iso bootable mydistro
windows boots but gets confused
gentoo minimal works fine but you need to pass correct parameters
> 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 like to boot ubuntu / gentoo by having various iso files listed and
changing grub config
> How do you control the file system; set it up first on the target HDD/SDD?
> Which tool do you use, as part of the usb package? gptfdisk (gdisk)?
download iso
tell grub2 about iso location
>> That must be a UEFI bootable disc. ISOs can have all sorts of strange
>> setups
> Your telling me? So when did the gentoo liveDVD become "grub bootable" ?
> Again, How do you know what a given images is capable, as the details of
> so many seem to poor--> 2----> undocumented......?
>
> Have you ever tried "pentoo-installer" off of a live gentoo dvd ?
> with any usb iso?
>
>
> curiously,
> James
>
>
>
>
>
hth
grub2-mkconfig is a pita but the iso boot by itself redeems itself
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Re: [OT] Making a bootable USB flash drive from ISO image
2014-10-03 15:19 ` James
2014-10-03 23:38 ` thegeezer
@ 2014-10-06 11:52 ` Neil Bothwick
1 sibling, 0 replies; 7+ messages in thread
From: Neil Bothwick @ 2014-10-06 11:52 UTC (permalink / raw
To: gentoo-user
[-- 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 --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-10-06 11:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox