You are not logged in.

#1 2014-07-08 12:58:22

0liver
Member
Registered: 2014-05-20
Posts: 37

[Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

initially I installed [arch linux and boot loader on ext. usb-HD  following
http://www.danynativel.com/blog/2013/02 … ypted-ssd/ but using UUIDs only (instead of sdXn)

(I later found out that this guide was outdated; with some battles I nevertheless completed the install (and the post-install tweaking it proposes). use official arch linux install guide instead. )

ext. HD part.  usage       end of UUID#     size    GUID
-------------------------------------------------------------------
sda1           BIOS boot        ...f3be        2M   EF02 (BIOS)
sda2           /boot            ...38db      100M   8300 (linux fs)
sda3           swap             ...6941        8G   8200 (swap)
sda4           vgroup           ...2072      1.9T   8E00 (LVM)

# grub-install /dev/sda

# nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=/dev/disk/by-uuid/42cab5e0-887b-4bef-b898-d7533ae32072:vgroup"

# grub-mkconfig -o /boot/grub/grub.cfg

the system worked great!

until I did

#pacman -Syy
#pacman -Syu

which downloaded a couple of hundred MB and afaik also upgraded the kernel.

now the ext. HD no longer boots, waiting 10 s for an UUID of the archbang system disk and after another try gives up.

The boot-repair CD didn't fix it; report after boot-repair executed from CD-boot:
http://paste.ubuntu.com/7765072/

then I mounted the ext. HD under Ubuntu 12.04. the ext. HD became sdc:

/dev/sdc2: UUID="8b5830cc-db47-411c-b2ae-ed11fe2e38db" TYPE="ext2" 
/dev/sdc4: UUID="42cab5e0-887b-4bef-b898-d7533ae32072" TYPE="crypto_LUKS" 
/dev/mapper/udisks-luks-uuid-42cab5e0-887b-4bef-b898-d7533ae32072-uid1000: UUID="TQJMlF-pZ2d-t94e-mNjE-nEBh-atiH-7avVdK" TYPE="LVM2_member" 
/dev/mapper/vgroup-root: UUID="9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f" TYPE="ext4" 
/dev/mapper/vgroup-home: UUID="6add2f29-38f5-4ec8-96cf-c680c5c3fa11" TYPE="ext4" 

and did (admit w/o much thinking)

# sudo grub-install --root-directory=/mnt /dev/sdc

finished w/o error.

plugged the ext. HD into a machine w/o any int. HD; so it became sda.

still doesn't boot, obviously looking for UUID from ubuntu system disk.

result obtained from boot-repair CD analysis after grub-install: http://paste.ubuntu.com/7765242/

then tried booting archlinux live-CD and did

# cryptsetup luksOpen /dev/sda4 enc-lvm
>gave passphrase
# mount /dev/mapper/vgroup-root /mnt
# mount /dev/sda2 /mnt/boot
# mount /dev/mapper/vgroup-home /mnt/home

# arch-chroot /mnt
# grub-install /dev/sda

/etc/default/grub: z4srv7wr.jpg

# grub-mkconfig -o /boot/grub/grub.cfg
#exit

then unmounted, rebooted with this result: 9is2tonk.jpg

doesn't ask for passphrase: cmobdzsg.jpg

[Edit n:] now put pack the 320GB int. HD (the ext. HD becoming sdb) and did

# grub-mkconfig -o /boot/grub/grub.cfg

again, but booting ext. HD still doesn't ask for passphrase. here is the latest http://paste.ubuntu.com/7771346/ (ignore all the sda stuff.)

it shows an error in " == StdErr Messages: ==" section for sdb:

cat: write error: Broken pipe
File descriptor 8 (/proc/2845/mounts) leaked on lvscan invocation. Parent PID 16067: bash
  No volume groups found

don't know what this means.

[edit n+1:] boot screen again, note, there is not a single sdb device in #blkid eventhough I booted from sdb: cf3ykm4a.jpg

/etc/mkinitcpio.conf

HOOKS="base udev block autodetect modconf keyboard keymap encrypt lvm2 filesystems"

[edit n+2:]

$ sudo blkid
/dev/sda[...]
/dev/sdb2: UUID="8b5830cc-db47-411c-b2ae-ed11fe2e38db" TYPE="ext2" 
/dev/sdb4: UUID="42cab5e0-887b-4bef-b898-d7533ae32072" TYPE="crypto_LUKS" 
/dev/mapper/udisks-luks-uuid-42cab5e0-887b-4bef-b898-d7533ae32072-uid1000: UUID="TQJMlF-pZ2d-t94e-mNjE-nEBh-atiH-7avVdK" TYPE="LVM2_member" 
/dev/mapper/vgroup-root: UUID="9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f" TYPE="ext4" 
/dev/mapper/vgroup-home: UUID="6add2f29-38f5-4ec8-96cf-c680c5c3fa11" TYPE="ext4" 

$ sudo lvmdiskscan
 ...
  /dev/dm-1  [       1.81 TiB] LVM physical volume
 ...
  /dev/sdb1  [       1.00 MiB] 
  /dev/sdb2  [      97.00 MiB] 
  /dev/sdb3  [       7.90 GiB] 
  /dev/sdb4  [       1.81 TiB] 
  0 disks
  28 partitions
  0 LVM physical volume whole disks
  1 LVM physical volume

$ sudo pvscan
  PV /dev/dm-1   VG vgroup   lvm2 [1.81 TiB / 39.01 GiB free]
  Total: 1 [1.81 TiB] / in use: 1 [1.81 TiB] / in no VG: 0 [0   ]

$ sudo lvscan
  ACTIVE            '/dev/vgroup/root' [16.00 GiB] inherit
  ACTIVE            '/dev/vgroup/home' [1.76 TiB] inherit

$ sudo pvs
  PV         VG     Fmt  Attr PSize PFree 
  /dev/dm-1  vgroup lvm2 a-   1.81t 39.01g

$ sudo lvdisplay
  --- Logical volume ---
  LV Name                /dev/vgroup/root
  VG Name                vgroup
  LV UUID                JRiGGp-OnoE-WDrZ-h4wL-EFQI-qthw-emtfPE
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                16.00 GiB
  Current LE             4096
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:2
   
  --- Logical volume ---
  LV Name                /dev/vgroup/home
  VG Name                vgroup
  LV UUID                Df4gcB-J72X-4vb8-DRBj-Tybv-9GDu-KkI4wa
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                1.76 TiB
  Current LE             460800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:3
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 3.15.3-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [block]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [encrypt]
  -> Running build hook: [lvm2]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 3.15.3-1-ARCH
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [block]
  -> Running build hook: [modconf]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [encrypt]
  -> Running build hook: [lvm2]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating gzip initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful

adding
GRUB_CMDLINE_LINUX="lvmwait=/dev/mapper/vgroup-root rootdelay=20"
into /etc/default/grub also didn't help

/boot/grub/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 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 loadfont unicode ; 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-9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_gpt 
	insmod ext2
	set root='hd1,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  8b5830cc-db47-411c-b2ae-ed11fe2e38db
	else
	  search --no-floppy --fs-uuid --set=root 8b5830cc-db47-411c-b2ae-ed11fe2e38db
	fi
	echo	'Loading Linux linux ...'
	linux	/vmlinuz-linux root=UUID=9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f rw lvmwait=/dev/mapper/vgroup-root rootdelay=20 cryptdevice=/dev/disk/by-uuid/42cab5e0-887b-4bef-b898-d7533ae32072:vgroup
	echo	'Loading initial ramdisk ...'
	initrd	/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f' {
	menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt 
		insmod ext2
		set root='hd1,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  8b5830cc-db47-411c-b2ae-ed11fe2e38db
		else
		  search --no-floppy --fs-uuid --set=root 8b5830cc-db47-411c-b2ae-ed11fe2e38db
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f rw lvmwait=/dev/mapper/vgroup-root rootdelay=20 cryptdevice=/dev/disk/by-uuid/42cab5e0-887b-4bef-b898-d7533ae32072:vgroup
		echo	'Loading initial ramdisk ...'
		initrd	/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-9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_gpt 
		insmod ext2
		set root='hd1,gpt2'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  8b5830cc-db47-411c-b2ae-ed11fe2e38db
		else
		  search --no-floppy --fs-uuid --set=root 8b5830cc-db47-411c-b2ae-ed11fe2e38db
		fi
		echo	'Loading Linux linux ...'
		linux	/vmlinuz-linux root=UUID=9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f rw lvmwait=/dev/mapper/vgroup-root rootdelay=20 cryptdevice=/dev/disk/by-uuid/42cab5e0-887b-4bef-b898-d7533ae32072:vgroup
		echo	'Loading initial ramdisk ...'
		initrd	/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+ ###

appreciate your help. thanks!

***

[edit n+3:] maybe I found the solution: http://mzanfardino.wordpress.com/2012/0 … rch-linux/
(reinstall udev and mkinitcpio, recreate the initial ramdisk environment)
Had no time yet to try it; will report back soon.

[edit n+4:] edit n+3 didn't help, eventhough
#pacman -Syu  downloaded and installed another 180MB (incl. another kernel). afafs96x.jpg

doing more searches I found two posts describing the same problem of device not detected; in both cases remained unsolved:
https://bbs.archlinux.org/viewtopic.php?id=47288
https://bbs.archlinux.org/viewtopic.php?id=80355

reading archwiki's mkinitcpio, I then modified HOOKS using base, systemd, ... sd-encrypt, sd-lvm2,  ... and got a more detailed error-log nkly9r6u.jpg but the cause not finding the ext. usb device sdbX is unchanged.

now it doesn't even look first for

/dev/sdb4: UUID="42cab5e0-887b-4bef-b898-d7533ae32072" TYPE="crypto_LUKS"

but tries to find (dev/mapper/vgroup-root) UUID="9dbd2e7d-8f4e-4fc4-8e46-64b29155e00f" which is inside the /dev/sdb4

best,
0.
p.s.: could this problem be related to http://ubuntuforums.org/showthread.php?t=2066130 ?

Last edited by 0liver (2014-07-25 12:00:26)

Offline

#2 2014-07-18 10:55:03

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

Don't mix and match old guides or ones for other distros, it only confuses - particularly for the init system.
Specify the UUID for cryptdevice in the same format as you do for root, i.e. "cryptdevice=UUID=...".

Offline

#3 2014-07-19 15:26:03

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

thanks.

set
GRUB_CMDLINE_LINUX_DEFAULT="cryptdevice=UUID=42cab5e0-887b-4bef-b898-d7533ae32072:vgroup"

did run
# grub-mkconfig -o /boot/grub/grub.cfg

rebooted, see the syntax-change in grub when viewing the commands with 'e', but nothing changed. sdb still not present. doesn't ask for key.

Last edited by 0liver (2014-07-19 15:27:49)

Offline

#4 2014-07-19 16:36:11

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

What do you mean with "sdb still not present"? Did you go to the busybox emergency shell and /dev/sdb does not turn up?
If it does not, it did turn up booting a CD iso in your tries before or not? If it does turn up, but you mean the boot still times out waiting for vgroup-root (which i suspect) then try to unlock the LUKS device sdb manually from the emergency shell for starters

cryptsetup open /dev/sdb4 lvm
vgscan 
vgchange -ay

and let it try boot again with "exit". Does that work?

Offline

#5 2014-07-19 18:50:11

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

> What do you mean with "sdb still not present"? Did you go to the busybox emergency shell and /dev/sdb does not turn up?

right! that's it.

> If it does not, it did turn up booting a CD iso in your tries before or not?

it turns up when I boot latest arch iso live CD and I can open it with
#cryptSetup luksOpen /dev/sbd4 enc-lvm

I can reboot with Grub from sdb:
http://www.directupload.net/file/d/3688 … mh_jpg.htm
http://www.directupload.net/file/d/3688 … yf_jpg.htm
http://www.directupload.net/file/d/3688 … 7f_jpg.htm

but then sdb is gone (and I see only sda which is not at all involved):
http://www.directupload.net/file/d/3688 … mt_jpg.htm
can't do #cryptSetup luksOpen /dev/sbd4 enc-lvm
device doesn't exist!

Last edited by 0liver (2014-07-19 19:34:05)

Offline

#6 2014-07-20 10:24:56

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

I just re-read your initial post. You tried so many things, it is not clear what the current setup is (apart from the grub config you show in the linked images above in post 5).

Obviously it makes one wonder where the grub install is, if the drive you installed it to is not shown in the busybox. Did you install that to your first disk (sda)? That's the only idea I would have for it. Is the Windows on it still booting? The Bios is set to legacy (not EFI)? Did you check from the arch live cd which partition is bootable?

Offline

#7 2014-07-20 12:54:41

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

> You tried so many things, it is not clear what the current setup is (apart from the grub config you show in the linked images above in post 5).

I undid the unsuccessful test with HOOKS using systemd, sd-encrypt, sd-lvm2

> Obviously it makes one wonder where the grub install is, if the drive you installed it to is not shown in the busybox.

Grub finds sdbx o/w it couldn't start on usb-disk. (I've learned that grub detetects devices differently. once boot starts, the device list is regenerated. this is the moment when sdbx is no longer found. the hook 'usb' is deprecated now, so won't help I guess.)

> Did you install that to your first disk (sda)?

no, grub2 is installed it on usb-disk (sdb).

> That's the only idea I would have for it. Is the Windows on it still booting?

yes.

> The Bios is set to legacy (not EFI)?

it is a thinkpad T60 (2007); can't find any bios-EFI option so guess it doesn't yet have EFI.

it booted with internal HD present (as well as with int. HD removed) before from usb-HD.

just removed int. HD (as well as live-CD) and booted with usb-disk only. get the same grub screen and then timeout as already shown http://www.directupload.net/file/d/3688 … mt_jpg.htm
except that #blkid list is now empty!

> Did you check from the arch live cd which partition is bootable?

sda2 has flag Boot (cfdisk shows).

#parted /dev/sdb print  # since cfdisk doesn't support gpt:

Model: Seagate Backup+ RD (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                 Flags
 1      1049kB  2098kB  1049kB               BIOS boot partition  bios_grub
 2      3146kB  105MB   102MB   ext2         Linux filesystem
 3      106MB   8590MB  8484MB               Linux swap
 4      8591MB  2000GB  1992GB               Linux LVM            lvm

I wouldn't keep researching this issue if I were convinced that after re-install of arch linux on usb-disk and after an update of the kernel the same boot problem wouldn't reappear.

the broken boot was already observed with older arch linux versions as described here: http://mzanfardino.wordpress.com/2012/0 … rch-linux/ (and already linked in my first post; sadly what helped him doesn't help me, as also already pointed out above.)

Last edited by 0liver (2014-07-20 14:07:26)

Offline

#8 2014-07-21 19:15:38

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

Thanks for the update/answers and explanations of your tries. A couple are not clear to me (I adapt to your quoting style for now):

>> no, grub2 is installed it on usb-disk (sdb).

conflicts with

>> sda2 has flag Boot (cfdisk shows).

And then you continue with gparted output from /dev/sdb

I guess the sda2 was a typo there. Reading up on GPT here, it seems that a "bootable" flag is incompatible with the GPT specification per se, but some BIOS' want it, others don't (no idea about a sturdy T60. Your sdb disk technically does not need gpt but, yes, it used to work until that update).

Anyhow, I do not have a further idea currently. Being pragmatic what I would do is go to the Arch iso, chroot into that sdb and re-install the bootloader. (Why not give syslinux a try, for example.)  Maybe someone else has another idea.

edit: I happen to browse over this bug. Follow the launchpad link and read the error description (I know, it is not your hardware, but the sympton of the device disappearing is oddly similar). According to that you can try another simple thing: eliminate the rootdelay option you added. What's the kernel on the iso you use?

Last edited by Strike0 (2014-07-21 21:28:50)

Offline

#9 2014-07-22 09:09:34

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

>> no, grub2 is installed it on usb-disk (sdb).

> conflicts with

>> sda2 has flag Boot (cfdisk shows).

sda is internal disk. (when an int. disk is present)
it has its own grub installed.
it boots independent from usb-disk.
and I want usb-disk to boot independent from whatever (or none) int. disk.

anyway, to make it as simple as possible, as said above, I removed int. disk (sda).

note, that in arch iso the usb-disk then became sda. (this was the reason to use UUIDs only)

> And then you continue with gparted output from /dev/sdb

/dev/sdb is usb-disk - before I removed int. disk.
(I used parted and not gparted, but I guess the g-prefix stands for gnome or gui which doesn't run in arch linux iso shell).

> I guess the sda2 was a typo there.

it isn't; I included it since you talked about boot flags and suspected it booted from int. disk.

> Reading up on GPT here, it seems that a "bootable" flag is incompatible with the GPT specification per se, but some BIOS' want it, others don't (no idea about a sturdy T60. Your sdb disk technically does not need gpt but, yes, it used to work until that update).

I didn't change anything on boot flags since install. the install worked fine. boot is broken since the kernel upgrade. (it did run mkinitcpio as part of #pacman -Syu)

> I would do is go to the Arch iso, chroot into that sdb and re-install the bootloader.

did this several times before.

> (Why not give syslinux a try, for example.)  Maybe someone else has another idea.

tried this in advanced options  in grub menu. exactly same effect. doesn't see usb-disk.

> edit: I happen to browse over this bug. Follow the launchpad link and read the error description (I know, it is not your hardware, but the sympton of the device disappearing is oddly similar).

the page you linked is very technical. can't really understand it. there are other posts which describe usb-dev had disappeared. i linked to them above as follows:

"device not detected; in both cases remained unsolved: ... https://bbs.archlinux.org/viewtopic.php?id=80355"

inner quote from this post:

>>> THE Problem: Even though, as explained above, GRUB initially 
detects Flash as (hd0,x) (or sda), the kernel seemingly detects the local 
HDD as sda, AND FAILS TO DETECT THE USB STICK AT ALL. 
This became to be obviously true when i listed the contents of /dev, 
after being dropped to the recovery shell 
(or entering it manually with the `break' option in the kernel line). 
There was sda1, sda2 and sda5 (the partitions of the local HDD) 
and no sdb at all.

he apparently 'solved' this as follows

 I copied over a kernel file named `kernel-2.6.25.29-114' 
and an initrd file named `initramfs-2.6.25.20-114' over to 
Arch's /boot from the /boot of the Linux on my HDD, and 
using those two, together (and only together), can boot Arch.

Does anyone have an idea why my vmlinuz26 and kernel26.img 
should not work? I'm clueless on this.

I don't have such files on my archlinux iso. On usb-disk (now called sda2 or /boot once mounted) I have:

grub (directory with grub.cfg)
initramfs-linux[-fallback].img
vmlinuz-linux

(however I could swap the int. disk from my 3rd notbok (T61) which has recent archbang install to get its corresponding /boot files.

Edit: copied archbang's initramfs-linux[-fallback].img and vmlinuz-linux and replaced those on usb-disk but archbang install doesn't use luks/lvm and thus doesn't have the encrypt and lvm2 hooks and on boot of usb-disk (the only hook being udev) it's waiting directly for root device UUID=...e00f

more importantly, in boot rescue shell, #blkid sees the archbang's sdaX but no sdbX.
)

> According to that you can try another simple thing: eliminate the rootdelay option you added.

I had done this already before I ran latest test shown in image link "http://www.directupload.net/file/d/3688 … yf_jpg.htm"

you see, it no longer has wait 20s option. default is 10s.

> What's the kernel on the iso you use?

3.14.1.1-ARCH

downloaded as archlinux-2014.05.01-dual.iso

and just in case it matters, the complete system upgrade on usb-disk installed linux 3.15.5-1 as shown above in "http://www.directupload.net/file/d/3686 … 6x_jpg.htm"

what puzzles me: once failed boot and in emergency shell, I see in hooks-directory only 4 empty files:

encrypt keymap lvm2 udev

eventhough I have in mkinitcpio.conf (which of course matches the HOOKS in emergency shell's file buildconfig):

HOOKS="base udev autodetect block modconf keyboard keymap encrypt lvm2 filesystems"

is this expected behaviour?

(by the way, I also tried swapping autodetect and block without success.)

thanks for your continued help!

Last edited by 0liver (2014-07-22 13:58:11)

Offline

#10 2014-07-22 19:42:53

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

Please stick to one setup, the way you mix output and comments from different setups with every paragraph is not helpful for anyone trying to follow you.

To the question: Yes, that is expected behaviour. See the right hand column in the table: https://wiki.archlinux.org/index.php/Mk … time_hooks

Regarding the thread you link: kernel 2.6.25.29-114 is too old to help us find your bug I would say.
You write you "tried" syslinux from grub? https://wiki.archlinux.org/index.php/Syslinux

One question I cannot see answered from your problematic update to 3.15.5-1 is whether the initramfs creation was successful or not.
Have you tried to chroot into the usb-drive from the Arch iso and re-install linux and grub (or syslinux instead)?

Offline

#11 2014-07-22 19:59:25

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

> Please stick to one setup, the way you mix output and comments from different setups with every paragraph is not helpful for anyone trying to follow you.

sorry, I tried to keep it simple, but couldn't avoid the mix-up. will try harder.

> Regarding the thread you link: kernel 2.6.25.29-114 is too old to help us find your bug I would say.

sure, ok, I wanted to show that I'm not the only one missing devices at boot.

> You write you "tried" syslinux from grub? https://wiki.archlinux.org/index.php/Syslinux

sorry again, I tried 'arch linux with linux linux' from grub advanced menu.

> One question I cannot see answered from your problematic update to 3.15.5-1 is whether the initramfs creation was successful or not.

yes, you see the log at about middle of my first post.

> Have you tried to chroot into the usb-drive from the Arch iso and re-install linux and grub (or syslinux instead)?

yes. I boot arch iso CD and then, - assuming sda is usb-disk with int. disk removed -

# loadkeys de
# cryptsetup luksOpen /dev/sda4 enc-lvm
...passphrase...

# mount /dev/mapper/vgroup-root /mnt
# mount /dev/sda2 /mnt/boot
# mount /dev/mapper/vgroup-home /mnt/home
# arch-chroot /mnt

# mkinitcpio -p linux
# grub-install /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg [gives a lot of warnings (as with very first install which worked) "...is leaking..." but finds boot images]
#exit

# umount /mnt/boot
# umount /mnt/home
# umount /mnt
# reboot

and choosing usb-disk as boot device at startup.

Last edited by 0liver (2014-07-22 20:15:00)

Offline

#12 2014-07-23 05:44:33

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

Browsing over bugs, maybe this recent report is one that affects you: https://bugs.archlinux.org/task/41273

Offline

#13 2014-07-23 10:27:12

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

I patched /usr/lib/initcpio/install/block according https://bugs.archlinux.org/task/41273

rebooted, chrooted and
#mkinitcpio -p linux
now results in

==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> ERROR '/lib/modules/3.15.3-1-ARCH' is not a valid kernel module directory

(... same for initramfs-linux-fallback.img)

I only have /lib/modules/3.15.5-1-ARCH/
so i did:

#pacman -Syy
#pacman -Syu

results in installing amongst others of linux 3.15.5-1 in chrooted environment:
http://www.directupload.net/file/d/3692 … 7r_jpg.htm
   
apart from an error in the proposed patch /usr/lib/initcpio/install/block
"line 21: +: command not found:"
http://www.directupload.net/file/d/3692 … wx_jpg.htm

line 21 in block is this line:
+ add_checked_modules 'drivers/usb/storage/uas.ko.gz'

    #if add_checked_modules -f '(_cs|sl811_hcd|isp116x_hcd)' '/usb/host'; then
    #    blockdevs+=(['usb_storage?']=1 ['sd_mod?']=1 ['sr_mod?']=1)
    #    add_checked_modules 'drivers/usb/storage/ums-*'
    #fi

if add_checked_modules -f '(_cs|sl811_hcd|isp116x_hcd)' '/usb/host'; then
blockdevs+=(['usb_storage?']=1 ['sd_mod?']=1 ['sr_mod?']=1)
add_checked_modules 'drivers/usb/storage/ums-*'
+ add_checked_modules 'drivers/usb/storage/uas.ko.gz'
fi

    # firewire

means, I conclude, uas.ko.gz was not added.

I nevertheless did (and captured end of result of)
# grub-mkconfig -o /boot/grub/grub.cfg
http://www.directupload.net/file/d/3692 … 89_jpg.htm       

but on reboot still no usb-device. timeout as before.

what's the syntax error in https://bugs.archlinux.org/task/41273 please?
edit 2: ok, I see, the "+" is part of the patch-syntax. will correct and try again.

***
edit 1: it must be the error described there: just tried to boot the usb-disk again with an usb-stick plugged addionally; after timeout for the usb-disk, #blkid lists the usb-stick as /dev/sda1 !

no other device, except /dev/sr0 if a CD is in the tray.
***

just deleted the '+' in the hooks script:

...
add_checked_modules 'drivers/usb/storage/uas.ko.gz'

and redid

#mkinitcpio - p linux

and now it boots into passphrase prompt. thanks again for your help and finding the right recent bug I'd run into!

[edit 3] p.s.: there was some trouble at boot:
http://www.directupload.net/file/d/3692 … 88_jpg.htm

/dev/mapper/enc-swap isn't ok;
wrongly looks on /dev/sdb3 instead of /dev/sda3 (not related to the UAS-bug or rather -'feature-request;' see below),
but home dir works eventhough it shows "Dependency failed for Cryptography Setup Home":
http://www.directupload.net/file/d/3692 … lo_jpg.htm

(instead of screenshot I'd prefer upload of this log's text, but where is it stored?)

***

but everything else looks good. even startx (gnome) works.

Last edited by 0liver (2014-07-23 15:27:33)

Offline

#14 2014-07-23 13:11:57

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

0liver wrote:

and now it boots into passphrase prompt. thanks again for your help and finding the right recent bug I'd run into!

A million times no. You don't use USB-attached SCSI, so this "bug" (notice it's a feature request) is irrelevant to you.

Last edited by falconindy (2014-07-23 13:17:46)

Offline

#15 2014-07-23 13:19:48

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

the bug description says

> Without this [uas] module some newer usb devices are not recognized.

and I did nothing else than applying the block-script-patch and now it works.

do you see another reason why it boots now that it finally detects all usb-devices? (though I understand that uas - usb attached scsi means something different)

Last edited by 0liver (2014-07-23 13:22:19)

Offline

#16 2014-07-23 13:32:27

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

The bug is about UAS. Do you use UAS?

Offline

#17 2014-07-23 13:46:01

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

no. yes. the s in sdx imho historically means scsi. right?

is it possible that your bug fix fixes more than only the uas issue?

it makes sense to me; my usb-disk (parted says: Model: Seagate Backup+ RD (scsi), Disk /dev/sdb: 2000GB) is a "newer usb device."

Offline

#18 2014-07-23 14:15:23

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

is it possible that your bug fix fixes more than only the uas issue?

Not unless the 'uas' module supports more than just UAS. Despite the confusing name, I suspect that it only supports UAS.

it makes sense to me; my usb-disk (parted says: Model: Seagate Backup+ RD (scsi), Disk /dev/sdb: 2000GB) is a "newer usb device."

So, one might actually make a better assertion about this by looking at dmesg, or the output of 'lsmod' from a successfully booted system (i.e. a live cd).

Offline

#19 2014-07-23 14:35:20

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

yes, it uses UAS.
didn't know the seagate 2TB slim is an UAS device; couldn't find a detailed data sheet yet.

dmesg:

…
[    0.806704] usb 5-2: new high-speed USB device number 2 using ehci-pci
[    0.933403] usbcore: registered new interface driver usb-storage
[    0.934141] scsi6 : uas
[    0.934238] usbcore: registered new interface driver uas
[    0.935300] scsi 6:0:0:0: Direct-Access     Seagate  Backup+  RD      A905 PQ: 0 ANSI: 6
…

lsmod:

...
cdrom                  35191  1 sr_mod
ata_generic             3434  0 
pata_acpi               3579  0 
uas                    17010  2 
usb_storage            50327  1 uas
atkbd                  17006  0 
libps2                  4571  2 atkbd,psmouse
ahci                   24299  0 
libahci                21772  1 ahci
ata_piix               25496  1 
libata                174089  5 ahci,pata_acpi,libahci,ata_generic,ata_piix
scsi_mod              138333  5 uas,usb_storage,libata,sd_mod,sr_mod
ehci_pci                4152  0 
uhci_hcd               34795  0 
ehci_hcd               64619  1 ehci_pci
usbcore               188381  5 uas,uhci_hcd,usb_storage,ehci_hcd,ehci_pci
usb_common              1712  1 usbcore

executed on now again booting seagate 2TB usb-disk on thinkpad T60 (has USB 2.0 only;
a note about USB Attached SCSI Protocol (UASP): "Although UAS was added in the USB 3.0 standard, it can also be used at USB 2.0 speeds, assuming compatible hardware," see https://en.wikipedia.org/wiki/USB_Attached_SCSI (page version: 21:26, 6 June 2014, retrieved 17:20, 23 July 2014)

Last edited by 0liver (2014-07-25 11:51:21)

Offline

#20 2014-07-25 10:53:51

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

Awesome you got it solved! Thanks for the mention smile

I reckon it is up to you whether the logs are linked permanently or not.
One other method to paste for another time, see: https://bbs.archlinux.org/viewtopic.php?id=57855

I also see the report already has been fixed by falconindy with commit. If you now prepend [ Solved] and add "USB" to the "UAS" to your thread title, other users will find a working resolution easier.

Offline

#21 2014-07-25 13:18:48

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

@Strike0: Thanks modified title and posted only the relevant parts of dmesg & lsmod inline.

It still puzzle me why this usb/uas-disk booted before the system upgrade.

p.s.: Seagate offers a "Firmware update for Seagate Backup Plus and Seagate Slim USB 3.0 in MacOS:" http://knowledge.seagate.com/articles/e … uage=en_US *
because maybe Mac has trouble detecting this device, which I conclude from a post in an Ubuntu/Mac related forum post.**

*) only found the FW-update-tool for MacOS, but maybe related to other OS**.

**) http://forum.parallels.com/showthread.p … t=usb+scsi
Their problem occured with a Seagate Backup+ SL
It runs Ubuntu in a VM (under Parallels Desktop 9 on a MBP running OS X 10.7); when plugged via an USB-2 hub it was detected (eventhough read-only)

Offline

#22 2014-07-25 15:03:32

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

Yes, puzzling. Maybe it has to do with an USB module being used instead, because the UAS module itself was declared broken before 3.15.rc2: https://git.kernel.org/cgit/linux/kerne … f92a532cd0

Offline

#23 2014-07-25 16:26:12

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

OT: I also fixed the swap encryption setup now and I'd like to add a reminder about 'persistent device naming' https://wiki.archlinux.org/index.php/Pe … ice_naming :

/dev/disk/by-PARTUUID/…uuid… [or /dev/disk/by-PARTLABEL/…]
must be used in (#makeswap, #swapon and in) /etc/crypttab, which in my install only contains one line

enc-swap /dev/disk/by-PARTUUID/…swap-partition-uuid... /dev/urandom  cipher=aes-cbc-essiv:sha256,size=128,hash=sha512,swap

partuuid's can be obtained with
  # ls -l /dev/disk/by-partuuid/
or
  # lsblk -f|nopaste
see http://pastie.org/private/fs8sdpcdnn3szmoe5yibbw
(Thanks again, Strike0 for the pastie-hint)

/dev/disk/by-UUID/...uuid… doesn't work.

/dev/sdXN can be used but is very dangerous (data loss!) because its name can change at boot. see warning in https://wiki.archlinux.org/index.php/Dm … sk_support

my swap-entry in /etc/fstab (which was created during install with
  #genfstab -U -p /mnt >> /mnt/etc/fstab
to get UUIDs instead of disk labels) is:

/dev/mapper/enc-swap swap swap defaults 0 0

luckily Grub (on usb-disk) doesn't care if the boot command uses hd0,gpt2 or hd1,gpt2; it boots the usb-disk if there is an internal disk or not.

Here is the boot duration with the SGT Backup Plus slim usb-3.0-disk on usb-2.0 port of a Thinkpad T60 (2 GHz T7200 core2duo CPU):

 10s from BIOS boot-device select to disk's passphrase prompt.
 19s after passphrase to MATE-login manager** (didn't enable autologin).
 20s until MATE** desktop displayed.

Now, never satisfied wink, because a "Dual Port USB 3.0 HUB to Express Card Adapter - NEC Chipset Renesas uPD720202" (~ 10 euro) works great with usb-3.0 disks* when used as non-boot-disk, it'd be good to find a boot manager which could boot a usb-3.0 disk via an usb-3-pcmcia adapter. (I tried without succes the http://www.plop.at boot manager which can boot usb-2.0-disks attached to pcmcia usb-2.0 adapter cards in usb-1.x-only computers.)

*) e.g., effective 63 MB/s transfer rate when copying data from one (non-encrypted) usb-3 disk to another (luks/lvm). Tested on an Dell E5520, i5-2410M, 2.30GHz; link with more details on request.

**) http://wiki.mate-desktop.org/download - fine and fast stuff!

Last edited by 0liver (2014-07-25 20:02:56)

Offline

#24 2014-11-13 21:34:50

0liver
Member
Registered: 2014-05-20
Posts: 37

Re: [Solved]LUKS/LVM USB-disk boot fail ¬asking passphrase, ¬detecting UAS

when I tried to boot on a desktop via USB3 port, it didn't ask for volume passphrase and boot failed with root device not found time-out. after rebooting on USB2, modifying

MODULES= ""
to
MODULES= "xhci_hcd"

in /etc/mkinitcpio.conf
and
#mkcpio -p linux

it booted via usb3.  — thank you for your help, mihi42,  your "Schuss ins Blaue" worked fine smile


Edit 1: MODULES= "uhci_hcd xhci_hcd"

with xhci_hcd, uhci_hcd is also needed, e.g. on older mainboards like Thinkpad T60/T61, to make the keyboard work for typing the volume passphrase.

Last edited by 0liver (2014-11-16 21:58:54)

Offline

Board footer

Powered by FluxBB