Skip to content

Unable to boot from USB

I've created a permanent Linux installation on a USB drive, for the most part following this guide. Everything boots fine on my machine, but when I plug it into another computer, GRUB errors with ERROR: device 'UUID=...' not found. Skipping fsck. and then drops me into an emergency shell. I've regenerated the fstab and the GRUB config, but the USB still boots only on the machine I created it on.

Help?

EDIT: After manually booting with the fallback image and editing the fstab, everything boots just fine.

Edited 15 May 2019. We only hold this version.

0 points20 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
0 · 100% up
Kind
Text
ID
bowsve

Author

43
posts
378
comments
37
media
View profile

20 comments

You need repartition your drive, and change it to mbr, or you need add 0xEF02 part to the GPT drive, for grub boot record Look at this https://wiki.archlinux.org/index.php/GRUB#GUID_Partition_Table_(GPT)_specific_instructions

P.s.: sorry for my bad English... :)

1 points

You got gpt?

1 points

Noob question: what is GPT and how do I know I have it?

0 points

As root user type:

gdisk -l /dev/sda

If the output of the above command shows like this,then you have MBR disk,

Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: not present

If the output shows like this then you have GPT disk,

Partition table scan: MBR: protective BSD: not present APM: not present GPT: present

1 points

What I think is happening is GRUB doesn't know where to boot from, because for some reason the UUID changed. If you have GPT, do blkid, and take note of your root partitions (/) PARTUUID. Then, go to your grub configuration file, (/boot/grub/grub.cfg),

and find a way to add a boot entry for your root partition that uses the PARTUUID you got

1 points

and find a way to add a boot entry for your root partition that uses the PARTUUID you got

Just to make sure I'm doing this right, I found:

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0daf072f-bc62-4147-a2fd-7bc8b1d2f42a' {

        # ---- snip ----

	echo	'Loading Linux linux ... Have fun.'
	linux	/vmlinuz-linux root=UUID=... rw  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}

And I changed it too:

menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0daf072f-bc62-4147-a2fd-7bc8b1d2f42a' {

        # ---- snip ----

	echo	'Loading Linux linux ... Have fun.'
	linux	/vmlinuz-linux root=PARTUUID=... rw  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}
1 points

That's a funny link you got there. What's wrong with this guide here?

The only difference between installing on an internal disk and an external one (in modern Linux) is that the external one is easier removable, and you'll want to drop the autodetect hook from mkinitcpio.

Edit: after reading more comments, stop fiddling with UUIDs! They don't just change for no reason. Drop the autodetect hook, regenerate your initrd and watch it work. Then read the wiki on why it does.

1 points

Drop the autodetect hook, regenerate your initrd ...

Please explain how, am a stupid noob.

Also, a lot of things need to be changed if you're installing on a USB. Its not the same thing. True, most of the parts are similar.

And my problem is this: I can't find the true UUID of the root partition on the computer I'm planning to use the USB on, and the kernel won't load.

1 points

In your /etc/mkinitcpio.conf you have a line HOOKS=(...), remove the word autodetect from it. Remember that lines starting with # are comments, so edit the line that doesn't have one. After that, run mkinitcpio -P as root to regenerate.

I have another Arch install on my external HDD and the only thing I did differently was encrypting the partition before formatting it (and, obviously, all the configuration changes needed for encrypted root). And of course removing autodetect.

What do you mean with the "true UUID"? If it boots on one PC, then the UUID in Grub must be correct, otherwise it wouldn't even boot there.

1 points

That guide is basically just a simplified version of the official installation guide, with very few additions and a lot of assumptions.

  • wipe: not necessary in most cases (they do mention it), and if it's necessary it's better to do it properly
  • partition and format: assumes you'll be using Grub later
  • pacstrap: why base-devel?
  • RAM disk image: the only noteworthy thing, dropping autodetect, isn't deemed noteworthy (although their final line doesn't have it)
  • network interface names: may be necessary, depending on how you're managing networks
  • journal config: I'd prefer to have it persistent, so I'll skip this. Also, this applies as well to internal SSDs.
  • mount options: this applies to internal SSDs just as well.
  • boot loader: what if I don't want to use Grub?
  • network support: no thanks, I prefer NetworkManager, it just works better in Gnome.
  • video drivers and touchpad support: I'll give you that, these do make sense.
  • battery support: don't care, but some probably will do. Let's keep it too.
  • ifplugd and wifi-menu: did you just assume my network manager?!
1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.