You are not logged in.

#1 2015-03-12 23:21:53

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Installation onto a USB pen drive (disk) fails - device uuid not found

Hi, I have followed the wiki pages and installed arch on a USB disk (pen drive). I have installed the x86_64 version of the Arch Linux system on the disk.

However, when I wanted to boot from the USB disk, the boot process fails after the ramdisk has been loaded. I am using the grub boot loader and the menu appears, so it seems to run properly.

The errors I have got during the boot process were:

"Device UUID * not found"

"usb device *-* read descriptior read error/64 (-62, -71, -110)"

"Unable to enumerate USB device"

"xhci_hcd timeout while waiting to setup device"

And so on. I have tried so many things, that I have trouble relating the changes to the grub config and mkinitcpio.conf to a specific error. All of them happen after the bootloader has run.

I was digging all over and I have found that the problem might be in the fact that the distribution is on the USB pen drive. In order for it to be recognized, grub2 needs to load some modules. I have edited etc/grub.d/00_header and added 'echo "insmod usb"' just above the for loop

# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
echo "insmod usb"
for i in ${GRUB_PRELOAD_MODULES} ; do
  echo "insmod $i"
done

and reconfigured grub with "grub-mkconfig -o /boot/grub/grub.cfg" in order to preload the "usb" module, to enable device detection early.

I have edited '/etc/mkcpio.conf' and added:

MODULES="usbcore"
HOOKS="base udev block autodetect modconf filesystems keyboard fsck"

to force the loading of all usb modules (including those for USB 3.0) early. Also, note the 'block' hook directly after udev, that replaced the deprecated 'usb' hook.

The USB drive is formatted in the ext4 format, and the partition is tagged as bootable. Grub is installed properly, otherwise I wouldn't get to this point.

There is also this: Stack Overflow answer, but that doesn't help me at all.

Any ideas on where those errors are coming from and how to fix them?

Last edited by tomislavski (2015-03-12 23:29:51)

Offline

#2 2015-03-13 00:03:23

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,532

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

Autodetect isn't a good idea.
We need to know your details

$ blkid
$ grep -iE '^\s+linux.*' /boot/grub/grub.cfg ### if UEFI is used, make sure is mounted at /boot
$ cat /etc/fstab

All of these referred to your UFD.


do it good first, it will be faster than do it twice the saint wink

Offline

#3 2015-03-13 08:17:24

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

TheSaint wrote:

Autodetect isn't a good idea.
We need to know your details

$ blkid
$ grep -iE '^\s+linux.*' /boot/grub/grub.cfg ### if UEFI is used, make sure is mounted at /boot
$ cat /etc/fstab

All of these referred to your UFD.

Thank you for the feedback. Here we go:

$blkid
/dev/sda1: UUID="736da57b-f176-47e8-8887-666f55b5c344" TYPE="ext4"
/dev/sda2: UUID="ae81c2d9-244b-4bad-bc89-d300c1d0d821" TYPE="swap"
/dev/sda3: UUID="b80ab31a-a653-48e4-9531-64f82fa885a4" TYPE="ext4"
/dev/sdb1: LABEL="SanDisk" UUID="5688d7d5-921b-45b7-973f-8604476bba76" TYPE="ext4" PARTUUID="52c6b5b5-01"
grep -iE '^\s+linux.*' /boot/grub/grub.cfg
linux	/boot/vmlinuz-linux root=UUID=5688d7d5-921b-45b7-973f-8604476bba76 rw  quiet
linux	/boot/vmlinuz-linux root=UUID=5688d7d5-921b-45b7-973f-8604476bba76 rw  quiet
linux	/boot/vmlinuz-linux root=UUID=5688d7d5-921b-45b7-973f-8604476bba76 rw  quiet
cat /etc/fstab 
# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
UUID=5688d7d5-921b-45b7-973f-8604476bba76        /         ext4    rw,nosuid,nodev,relatime	0 1

Offline

#4 2015-03-13 08:19:07

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

I think we need to see your entire grub.cfg

What is the output of:

# parted -l

Jin, Jîyan, Azadî

Offline

#5 2015-03-13 08:22:56

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,416

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

If we're talking about a BIOS system, try syslinux.

And as TheSaint said, get rid of the autodetect hook. Makes little to no sense for a USB installation.

Last edited by Scimmia (2015-03-13 08:27:20)

Offline

#6 2015-03-13 08:26:43

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

Head_on_a_Stick wrote:

I think we need to see your entire grub.cfg

What is the output of:

# parted -l

grub,cfg:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod usb
insmod usbms
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos 
insmod ext2
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  5688d7d5-921b-45b7-973f-8604476bba76
else
  search --no-floppy --fs-uuid --set=root 5688d7d5-921b-45b7-973f-8604476bba76
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5688d7d5-921b-45b7-973f-8604476bba76' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos 
	insmod ext2
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  5688d7d5-921b-45b7-973f-8604476bba76
	else
	  search --no-floppy --fs-uuid --set=root 5688d7d5-921b-45b7-973f-8604476bba76
	fi
	echo	'Loading Linux linux ...'
	linux	/boot/vmlinuz-linux root=UUID=5688d7d5-921b-45b7-973f-8604476bba76 rw  quiet
	echo	'Loading initial ramdisk ...'
	initrd	 /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-5688d7d5-921b-45b7-973f-8604476bba76' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-5688d7d5-921b-45b7-973f-8604476bba76' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos 
		insmod ext2
		set root='hd1,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  5688d7d5-921b-45b7-973f-8604476bba76
		else
		  search --no-floppy --fs-uuid --set=root 5688d7d5-921b-45b7-973f-8604476bba76
		fi
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=UUID=5688d7d5-921b-45b7-973f-8604476bba76 rw  quiet
		echo	'Loading initial ramdisk ...'
		initrd	 /boot/initramfs-linux.img
	}
	menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-5688d7d5-921b-45b7-973f-8604476bba76' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos 
		insmod ext2
		set root='hd1,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  5688d7d5-921b-45b7-973f-8604476bba76
		else
		  search --no-floppy --fs-uuid --set=root 5688d7d5-921b-45b7-973f-8604476bba76
		fi
		echo	'Loading Linux linux ...'
		linux	/boot/vmlinuz-linux root=UUID=5688d7d5-921b-45b7-973f-8604476bba76 rw  quiet
		echo	'Loading initial ramdisk ...'
		initrd	 /boot/initramfs-linux-fallback.img
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_memtest86+ ###
### END /etc/grub.d/60_memtest86+ ###

I have inserted the module `usbms` as well, didn't help.

You probably mean `fdisk -l`:

fdisk  -l /dev/sdb

Disk /dev/sdb: 29 GiB, 31104958464 bytes, 60751872 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: 0x52c6b5b5

Device     Boot Start      End  Sectors Size Id Type
/dev/sdb1  *     2048 60751871 60749824  29G  b W95 FAT32

I tried reformatting as FAT32, since this is mentioned on the USB flash installation media wiki site. It made 0 difference.

Offline

#7 2015-03-13 08:48:34

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

I have removed autodetect, tried using different HOOKS in `mkinitcpio.conf` - still fails.

Additional info: after the boot process drops me in the recovery shell, I have tried to issue `blkid` and only the laptop hard drive with its partitions was wisible. I tried unplugging the USB pen drive and plugging it back in, and then it appeared (blkid reported the right UUID). Also, it was there as /dev/sdb1.

On my working laptop Arch Linux installation I get this in dmesg when I plug in the USB:

dmesg | grep -i usb 
1.367541] usb-storage 3-6:1.0: USB Mass Storage device detected
[    1.367685] scsi host6: usb-storage 3-6:1.0
[    1.367747] usbcore: registered new interface driver usb-storage
[    1.525254] usb 3-7: new full-speed USB device number 3 using xhci_hcd
[    1.862155] usb 3-8: new high-speed USB device number 4 using xhci_hcd
[    2.263789] usb 3-11: new full-speed USB device number 5 using xhci_hcd
[    2.436877] usb 3-11: ep 0x83 - rounding interval to 64 microframes, ep desc says 80 microframes
[    4.853931] usbcore: registered new interface driver uas
[    4.860840] usbcore: registered new interface driver btusb
[    4.926596] input: BisonCam, NB Pro as /devices/pci0000:00/0000:00:14.0/usb3/3-8/3-8:1.0/input/input21
[    4.926670] usbcore: registered new interface driver uvcvideo
[    4.926671] USB Video Class driver (1.1.1)
[  786.848058] usb 3-6: USB disconnect, device number 2
[  793.777842] usb 4-3: new SuperSpeed USB device number 2 using xhci_hcd
[  793.792443] usb-storage 4-3:1.0: USB Mass Storage device detected
[  793.792644] scsi host7: usb-storage 4-3:1.0

More info: checked the partition type:

sh-4.3# blkid -s PTTYPE -o value /dev/sdc
dos

On the Syslinux - ArchWiki it is written that it should be MBR, or GPT. Could this be the issue?

Last edited by tomislavski (2015-03-13 09:03:52)

Offline

#8 2015-03-13 09:25:27

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

This deserves a separate reply. smile

I have installed syslinux and got exactly the same error.  *BUT* :  since `blkid` shows that the USB is recognized after I plug it out and in from the shell where I am dropped after failing the boot, I have simply typed `exit` to continue with the boot proces after plugging the USB pen drive back in, *and it worked*.

I don't consider this a solution - it is a very ugly fix. I have to wait for a long time for the USB detection to fail, plug it in then out, then exit the emergency shell. Ugly.

The system is installed correctly and boots properly afterwards, so the question remains: what is preventing the USB to be recognized after the ramdisk has been loaded? Do I need to pass any arguments to the boot loader kernel line? Load any other modules, hooks? What's missing?

Offline

#9 2015-03-13 13:00:50

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

I've tried it on a USB 2.0 disk and it works if one just simply follows the installation instructions.

Has anyone here tried to build a bootable Arch Linux system on a USB 3.0 disk (pen drive)? Can this be done at all?

Offline

#10 2015-03-13 14:47:52

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,416

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

I've only done it on USB 2.0 flash drives.

Offline

#11 2015-03-13 15:32:03

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

Scimmia wrote:

I've only done it on USB 2.0 flash drives.

Thanks for the feedback. I'll try USB 2.0. For USB 3.0, to qute DM : "It's no good."

Offline

#12 2015-03-13 18:25:23

unixman
Member
Registered: 2015-03-12
Posts: 64

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

hi. i have a Kingston DataTraveler usb 3.0 stick. I installed arch into it as uefi mode. It is booted perfectly when i use usb 2.0 hub.

But booting via usb 3.0 hub  makes issues.  it was booted  and reached login prompt. But fail  immediately.

Errors below snipped from dmesg. it seems "xhci_hcd"  is guilty. My PC: ivybrigde-ultrabook with HM77  chipset

xhci_hcd:                          Command completion event does not match command
usb:                                    Device does not accepting address 2, error -62
blk_update_request:   I/O  error,  dev sdb,  sector  bla-bla 

By the way: I am not a native English speaker.

EDIT:  Sometimes works , sometimes don't works when using usb 3.0 port.

Last edited by unixman (2015-03-14 09:43:39)

Offline

#13 2015-03-14 00:44:55

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,532

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

tomislavski wrote:

a bootable Arch Linux system on a USB 3.0 disk (pen drive)? Can this be done at all?

That's beyond any kernel, because the port has to be detected by the BIOS and in case is the boot loader to be able to access the peripheral.
You haven't specified if is a MBR or UEFI booting.
With a UEFI you may bypass the boot loader and try to load the kernel directly.
My laptop has USB3 ports, but I don't have such trouble.


do it good first, it will be faster than do it twice the saint wink

Offline

#14 2015-03-14 13:15:10

tomislavski
Member
Registered: 2010-02-09
Posts: 87

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

TheSaint wrote:

...the port has to be detected by the BIOS and in case is the boot loader to be able to access the peripheral.

I don't know that much about BIOS/kernel. A question: if BIOS doesn't detect the port, how come it works when i plug the USB out and then back in? What part of the system takes care of the USB port detection in the safemode shell after the ramdisk has been loaded?

TheSaint wrote:

You haven't specified if is a MBR or UEFI booting.

Sorry about that: it's MBR.

TheSaint wrote:

With a UEFI you may bypass the boot loader and try to load the kernel directly.

Thanks, I'll try that as well.

TheSaint wrote:

My laptop has USB3 ports, but I don't have such trouble.

OK, so just to check that I got you right, you are using USB 3.0 pen drives and booting arch linux from them so that the kernel is loaded directly using UEFI, and this allways works on your machine? Or are you using also MBR and you are not noticing the problems I'm facing? In the latter case, this would be an argument for what you said about BIOS : BIOI ( big_smile a weird plural for BIOS)  and the disk controllers are the only two different factors.

Offline

#15 2015-03-14 15:32:40

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,778
Website

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

For the record, I have had Arch working just fine on a SanDisk Extreme 64GiB USB3.0 stick (it would boot off three different laptops with no problems and no changes were made to /etc/mkinitcpio.conf).

BTW, I did mean `parted -l` but whatever...


Jin, Jîyan, Azadî

Offline

#16 2015-03-14 18:37:50

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,532

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

tomislavski wrote:

OK, so just to check that I got you right, you are using USB 3.0 pen drives and booting arch linux from them so that the kernel is loaded directly using UEFI, and this allways works on your machine?

The only thing I didn't have tried is to use USB3 device. I meant ordinare USB2 UFD.

tomislavski wrote:

Or are you using also MBR and you are not noticing the problems I'm facing? In the latter case, this would be an argument for what you said about BIOS : BIOI ( big_smile a weird plural for BIOS)  and the disk controllers are the only two different factors.

I.E. arch ISO (can boot by the modes) and Archboot are working fine.
My BIOS AMI aptio. Version 206.


do it good first, it will be faster than do it twice the saint wink

Offline

#17 2015-06-11 20:37:10

Larsson
Member
From: Sweden
Registered: 2010-03-22
Posts: 157

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

tomislavski wrote:

...
The system is installed correctly and boots properly afterwards, so the question remains: what is preventing the USB to be recognized after the ramdisk has been loaded? Do I need to pass any arguments to the boot loader kernel line? Load any other modules, hooks? What's missing?

I am having the same problem and would love to find a solution. I have a chromebook with only usb3 ports. Having installed arch to a usb2 pen drive, booting it works perfectly. Making a copy of the installation to a new usb3 pen drive and it can't boot. (and I have changed uuid etc in grub and also tried xhci etc as you have). I've also tried a new installation on the usb3 pen drive.

BIOS is detecting the usb pen. It is loading grub from MBR, but then after ramdisk failes to detect the drive.


"If the person you are talking to doesn't appear to be listening, be patient. It may simply be that he has a small piece of fluff in his ear." - A.A. Milne (Winnie-the-Pooh)

Offline

#18 2015-06-13 20:29:44

Larsson
Member
From: Sweden
Registered: 2010-03-22
Posts: 157

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

To clarify. I found that unplugging the usb after GRUB started loading initramfs, plugging in the usb in again after being dropped to rootshell and then exit, will boot arch. I'm using a Sandisc Ultra.
According to what I can find out there seem to be a problem with some usb 3 pens.

Can you reproduce this with your usb? If so, perhaps there is a way to reproduce this behaviour during boot, without the need of removing the usb?


"If the person you are talking to doesn't appear to be listening, be patient. It may simply be that he has a small piece of fluff in his ear." - A.A. Milne (Winnie-the-Pooh)

Offline

#19 2015-07-05 04:29:02

dtmanduca
Member
Registered: 2015-07-05
Posts: 2

Re: Installation onto a USB pen drive (disk) fails - device uuid not found

Hello. After many hours of research about booting Arch from an USB 3.0 pendrive, I stumbled across this thread and found a workaround, at least for my particular system. I hope it becomes useful to others.

I installed Arch Linux onto a Kingston USB 3.0 pendrive. After installation I could boot only from USB 2.0 ports but not from USB 3.0. I also messed around with mkinitcpio hooks and tried to preload xhci-hcd module on grub.cfg and mkinitcpio but without success. Arch could not find the root and swap partitions whichever way, throwing an error "Unable to find root device UUID...". I verified and the UUIDs were correct, accordingly with fstab.

Finally, after checking around UEFI USB options (something I should've done in the very beginning, I admit, would have saved me a lot of time), I found an option under "USB configuration" that allows enabling XHCI Pre-Boot mode. After that, I still can't boot from the default GRUB entry on USB 3.0 ports but I CAN boot from the fallback entry.

So in summary, check in your UEFI settings, under Advanced -> USB configuration -> XHCI Pre-Boot Mode, change this setting to ENABLED, save changes and reboot. Then boot from Arch's GRUB fallback entry. Keep in mind that UEFI settings vary between PC manufacturers. My particular laptop is manufactured by ASUS.

Last edited by dtmanduca (2015-07-05 04:32:30)

Offline

Board footer

Powered by FluxBB