I created a bootable usb from which I was going to install Arch. I did this the following way:
sudo dd if=/path_to_arch_.iso of=/dev/sdX
But when I tried to boot from this usb flash, I failed. There was no error, it just couldn't boot from it. I downloaded iso file from the official arch linux website recently so it should be up to date. Previously I was able to install mint, elementary and ubuntu from usb flash successfully.
It preventing me booting the following way:
After selecting "boot from usb" I was shown a black screen for 1 second and brought back to the menu where I must choose a temporary boot device. When I did it again the story repeated.
What might be the cause?
Best Answer
So I'm writing this as I do it myself. I just downloaded the latest arch iso and mounted it:
You don't need most of that up there. Or, it's better to say you probably only need half of it. There are two images here - one each for 32 and 64-bit machines:
I'm willing to bet you've got a 64-bit machine if you're going with Arch and so the
sfs
image file in the above directory makes the bulk of what you'll need. Still, if it is a 32-bit machine just follow along but from here on out substitute the686
files for thex86-64
I'll be targeting.So the
hybrid .iso
image works by subverting theiso
image standard and creating something like a fake partition or something. I don't really know too much about that but if you have a UEFI system the kernel and initramfs image you'll need are in theefiboot.img
file. In fact, once you pull what you need out of here, you need little else than that other file I've already pointed out. So, now I'll get intogdisk
and we'll prepare our target efi system partition. It's kind of a cake walk.OK, I guess I don't have a thumb drive handy so I'm just going to do it like this:
You don't want to use
fallocate
orlosetup
I'm just showing you that I am in the interest of full-disclosure. But, otherwise, what I am doing is what you need to do. For instance, because you likely wrote over some very early blocks on that disk, we need to clear them:Now we get into
gdisk
. Substitute whatever/dev/...
device file your usb disk is on for my/dev/loop2
:When you open
gdisk
you'll see something like the above go ahead and hit the?
for the menu:We need a new empty partition table. That's
o
.You'll need to agree here:
Next we need a partition. At the below prompts where you don't see the key entered it's because I just hit
ENTER
to agree to the default:If you hit
L
at the last prompt above you'll get a list of all the available partition types but what you need is typeef00
for efi system partition. And you're almost done.Have a look at your new partition with
p
then follow it up withw
if you like the it looks to write out your pending changes:I assume you have a bootloader but you might as well put one on your USB disk too, and this is really easy. In fact, I'll show you how to set it up with
rEFInd
which was actually a revival of an older project and written and maintained by the same guy who wrotegdisk
.Get the
refind.bin.*.zip
you'll find here and we'll unpack it to our disk then copy the arch image over and we're done.Actually, we'll definitely need a filesystem first. Glad I'm actually doing this as I write it - missing that would have been a dealbreaker for sure.
Again, ignore the stuff about
loop
and use your own device.-n
names the partition. I like to useESP
.Ok, so now for rEFInd:
That just about does it. You will need to setup
rEFInd
a little bit...That should give you a bootable system. Please look through the main
refind.conf
in../BOOT
- it's very well commented and pretty much documents itself. You'll also want to head over to rodsbooks.com and read the docs there.One last note though. If you were to put the same stuff on your system's hard disk on the EFI system partition you'd always have access to the bootable arch live disc.