简写:
使用 USB 2.0 端口可以毫无问题地从 USB 设备引导 Arch Linux。无论使用 USB 2.0 还是 3.0,从另一个相同的 USB 设备进行的某些自定义持久 Windows 安装也可以毫无问题地启动。
使用 USB 3.0 引导 Arch Linux 安装只能通过将其放入 initramfs、手动拔出并重新插入设备、手动键入特定 UUID 的安装命令以及手动键入 Exit 来实现。
https://i.stack.imgur.com/32Gtp.jpg
长表:
我正在使用 NVMe -> USB 3.0 转换器外壳来创建一些非常快速的持久性 USB 可安装操作系统安装,到目前为止,我使用一些持久性 Windows 安装工具取得了巨大成功。我尝试通过 Arch Linux (Manjaro) 安装来实现同样的目标。
使用 USB 2.0 端口时,GRUB 会加载并自动启动到我的安装中,该安装本身启动时没有任何问题。然而,在 USB 3.0 端口上执行相同的操作,initramfs 无法再找到定义的 UUID grub.cfg
。
ERROR: device `UUID=b6c7[...]` not found. Skipping fsck.
mount: /new_root can't find UUID=b6c7[...].
You are now being dropped into an emergency shell.
块设备完全缺失/dev
(应显示为/dev/sdaX
和/dev/disk/by-uuid/b6c7[...]
)。
当我拔下并重新插入 USB 设备本身时(同时仍然在 initramfs shell 中),突然一切都正确安装(例如,设备和所有分区出现在 下/dev
,$ blkid
现在正确显示每个)并且我可以通过手动执行引导而没有任何问题
mount /dev/disk/by-uuid/[...] new_root # OR: mount /dev/sda2 new_root
exit
这是我正在使用的设备(插入 USB 3.0 端口时)
$ lsusb -t
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
|__ [...]
|__ Port 4: Dev 3, If 0, Class=Mass Storage, Driver=uas, 5000M
$ lsusb
[...]
Bus 004 Device 003: ID 152d:0583 JMicron Technology Corp. / JMicron USA Technology Corp. JMS583Gen 2 to PCIe Gen3x2 Bridge
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 232,9G 0 disk
├─sda1
│ 8:1 0 300M 0 part /mnt/boot/efi
└─sda2
8:2 0 232,6G 0 part /mnt
[...]
$ lsblk -o PATH,PTTYPE,PARTTYPE,FSTYPE,PARTTYPENAME,UUID
PATH PTTYPE PARTTYPE FSTYPE PARTTYPENAME UUID
/dev/sda gpt
/dev/sda1 gpt c12a7328-f81f-11d2-ba4b-00a0c93ec93b vfat EFI System 427C-611E
/dev/sda2 gpt 0fc63daf-8483-4772-8e79-3d69d8477de4 ext4 Linux filesystem b6c724c4-8c0f-443c-b596-e909ef18da76
[...]
到目前为止我尝试过的:
- 安装
linux-firmware-qlogic
并upd72020x-fw
减少安装过程中的错误mkinitcpio
- 强制加载
uas usb_storage xhci_pci xhci_hcd
模块/etc/mkinitcpio.conf
/etc/mkinitcpio.conf
按照中所述重新排列 HOOKShttps://wiki.archlinux.org/title/Install_Arch_Linux_on_a_removable_medium(block
和keyboard
钩子前钩子autodetect
)- 使用“后备”initramfs 启动(不应该
autodetect
启用并且每个模块都已内置,对吧?)
一切都没有成功。
直接被扔进 initramfs 后,至少有一些模块似乎已经被加载了
$ lsmod
usbhid
xhci_pci
xhci_pci_renesas
uas
usb_storage
[...]
mkinitcpio
:
$ cat /etc/mkinitcpio.conf
MODULES="uas usb_storage xhci_pci xhci_hcd"
[...]
HOOKS="base udev modconf block keyboard autodetect keymap consolefont plymouth filesystems fsck"
[...]
$ mkinitcpio -P
==> Building image from preset: /etc/mkinitcpio.d/linux61.preset: 'default'
-> -k /boot/vmlinuz-6.1-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-6.1-x86_64.img --microcode /boot/amd-ucode.img --microcode /boot/intel-ucode.img
==> Starting build: '6.1.22-1-MANJARO'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
-> Running build hook: [keyboard]
-> Running build hook: [autodetect]
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [plymouth]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: '/boot/initramfs-6.1-x86_64.img'
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux61.preset: 'fallback'
-> -k /boot/vmlinuz-6.1-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-6.1-x86_64-fallback.img -S autodetect --microcode /boot/amd-ucode.img --microcode /boot/intel-ucode.img
==> Starting build: '6.1.22-1-MANJARO'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [plymouth]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: '/boot/initramfs-6.1-x86_64-fallback.img'
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux62.preset: 'default'
-> -k /boot/vmlinuz-6.2-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-6.2-x86_64.img --microcode /boot/amd-ucode.img --microcode /boot/intel-ucode.img
==> Starting build: '6.2.9-1-MANJARO'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
-> Running build hook: [keyboard]
-> Running build hook: [autodetect]
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [plymouth]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: '/boot/initramfs-6.2-x86_64.img'
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux62.preset: 'fallback'
-> -k /boot/vmlinuz-6.2-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-6.2-x86_64-fallback.img -S autodetect --microcode /boot/amd-ucode.img --microcode /boot/intel-ucode.img
==> Starting build: '6.2.9-1-MANJARO'
-> Running build hook: [base]
-> Running build hook: [udev]
-> Running build hook: [modconf]
-> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'wd719x'
==> WARNING: Possibly missing firmware for module: 'aic94xx'
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
-> Running build hook: [plymouth]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: '/boot/initramfs-6.2-x86_64-fallback.img'
==> Image generation successful
一些进一步的 initramfs 调查的图片:https://i.stack.imgur.com/32Gtp.jpg