You are not logged in.

#1 2014-04-02 18:41:04

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

[solved] last kernel upgrade - dropped to recovery shell

Hi there,
I just upgraded the kernel (=> 3.13.8-1-ARCH)

The boot process drop me to a recovery shell, with this message:

ERROR : device UUID=322d1dd7-5902-45e8-afe4-b5f912967b28 not found. Skipping fsck
ERROR : unable to find root device UUID=322d1dd7-5902-45e8-afe4-b5f912967b28
you are beeing dropped to a recovery shell
type 'exit' to try and continue booting
can't access tty, job control turned off

But, this UUID=322d1dd7-5902-45e8-afe4-b5f912967b28 correspond to none of my devices.
according to blkid

/dev/sda1: UUID="3fca6c29-1988-4ccd-9d84-dec5b44ffe80"  TYPE="ext4" 
/dev/sda2: UUID="f3fff5f5-b041-46e5-8749-01143684eb21" TYPE="crypto_LUKS"

The system is on a lvm, encrypted with dm_crypt.

I tried to correct manually the UUID of sda1 in /boot/grub/grub.cfg from a live usb, despite it is said to not edit manually the file. But it did not fix the problem.

Last edited by OlaffTheGreat (2014-04-04 17:05:24)


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#2 2014-04-02 23:16:54

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,551

Re: [solved] last kernel upgrade - dropped to recovery shell

What did you have in /etc/mkinitcpio.conf?


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2014-04-03 07:22:30

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

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

It is the adjustement I found on the wiki.


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#4 2014-04-03 07:30:03

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

Where are your lvm and encrypt hooks? https://wiki.archlinux.org/index.php/Mkinitcpio#HOOKS


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-04-03 09:45:18

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

You mean in which device ?
LVM and encrypt hooks are in /dev/sda2: UUID="f3fff5f5-b041-46e5-8749-01143684eb21" TYPE="crypto_LUKS"


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#6 2014-04-03 09:48:57

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,175
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

OlaffTheGreat wrote:

The system is on a lvm, encrypted with dm_crypt.

[snip]

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

It is the adjustement I found on the wiki.

You need the lvm and encrypt hooks in the HOOKS line as jasonwryan says, otherwise the initramfs won't be able to de-crypt your system.

Even the LVM/LUKS/dm-crypt wiki page covers which hooks you need, depending on how you've set it up.

Last edited by clfarron4 (2014-04-03 09:51:23)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#7 2014-04-03 12:08:46

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

I'm a bit confused:
Until this last upgrade, the system worked great, with the hooks config given above.
So you both mean I have to tell the device in the hook line as well ?


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#8 2014-04-03 13:28:29

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,175
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

OlaffTheGreat wrote:

So you both mean I have to tell the device in the hook line as well ?

You can probably do without, but for the purposes of having a working system most of the time, you should have those hooks in the hooks line to ensure the initramfs actually does de-crypt your system.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#9 2014-04-03 13:57:19

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

So I have to add in the Hook line "UUID=<sda2 ID>", am I right ?

How do I edit the file ? I mean, how can I access it by the recovery shell ?
From the liveusb I have, I can't mount the sda2. (It doesn't deal with both luks and lvm)


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#10 2014-04-03 14:15:05

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,175
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

OlaffTheGreat wrote:

So I have to add in the Hook line "UUID=<sda2 ID>", am I right ?
How do I edit the file ? I mean, how can I access it by the recovery shell ?
From the liveusb I have, I can't mount the sda2. (It doesn't deal with both luks and lvm)

To your first question, no.

To the whole quote, all the information you need to answer these questions is on the dm-crypt/Encrypting an Entire System page.

Last edited by clfarron4 (2014-04-03 14:26:27)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#11 2014-04-03 17:58:50

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

I didn't read the trouble shooting section on your first link.

The wiki says :
- To not panic. I'm good for the first advice: I don't panic ;-)
- To boot from the Arch installer.
So I downloaded the Arch installer on a usbcard and booted it on.
- Apply # cryptsetup open --type luks /dev/mapper/MyStorage-rootvol on each lv.
Because I don't remember the designations of lvs, I tryed variations of
# cryptsetup open --type luks /dev/mapper/MyStorage-rootvol /dev/sda2
It keeps telling me /dev/mapper/<designation> doesn't exist or access denied.

Because it's not mounted, I tried then to mount sda2: it doesn't recognize crypto_luks.
Then I tried "cryptsetup status /dev/sda2", but of course it says it doesn't find the device (since it's not mounted)

PS - I have an instable access to internet

Last edited by OlaffTheGreat (2014-04-03 17:59:41)


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#12 2014-04-03 18:16:17

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,175
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

Are you running LVM on tops of LUKS or LUKS on top of LVM or something else?


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#13 2014-04-03 18:25:21

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

I understood it's two very different situation in their treatment.
I have luks on lvm configuration, so with a /boot separated in sda1, and the encrypted lvm in sda2


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#14 2014-04-03 18:27:24

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,175
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

OlaffTheGreat wrote:

I have luks on lvm configuration, so with a /boot separated in sda1, and the encrypted lvm in sda2

In that case, running lsblk should give you the locations of your Logical Volumes.

----

Also:

OlaffTheGreat wrote:
# cryptsetup open --type luks /dev/mapper/MyStorage-rootvol /dev/sda2 

should be

# cryptsetup open --type luks /dev/mapper/MyStorage-rootvol

After that, you mount them (but not to any /dev/sdXY locations because the sdXY locations are also block locations).

Last edited by clfarron4 (2014-04-03 18:30:21)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#15 2014-04-03 18:50:25

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

lsblk gives me only this:

NAME          MAJ:MIN       RM         SIZE   RO     TYPE      MOUNTPOINT
sda                 8:0             0       238.5G    0     disk
   sda1            8:1             0       478.5M    0     part
   sda2            8:2             0          238G    0     part
loop0              7:0             0       224.1M    1     loop       /run/archiso/sfs/root-image

The cryptsetup command without /dev/sda* mentionned gives me this error:

# cryptsetup open --type luks /dev/mapper/MyStorage-rootvol
Command requires device and mapped name as arguments.

Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#16 2014-04-03 20:29:52

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: [solved] last kernel upgrade - dropped to recovery shell

Is “MyStorage-rootvol” the correct group-volume?

Offline

#17 2014-04-03 20:38:23

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

In this situation, I don't know how to determine designations for logical volumes or group volumes too.


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#18 2014-04-03 20:48:49

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,175
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

Do either of pvdisplay or lvdisplay reveal anything? You might need to run modprobe dm_mod before it works, and you'll need to run all the commands as root or superuser.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#19 2014-04-03 21:07:01

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

dm_mod activated on the installer session (I am still booted in the Arch installer's live usb)

pvdisplay:
File descriptor 6 (/run/systemd/sessions/1.ref) leaked on pvdisplay invocation. Parent PID 408: -zsh

lvdisplay:
File descriptor 6 (/run/systemd/sessions/1.ref) leaked on lvdisplay invocation. Parent PID 408: -zsh
   No volume groups found


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#20 2014-04-03 21:27:19

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,175
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

OK... @OlaffTheGreat I think I see what's happened here.

Try running this:

cryptsetup open --type luks /dev/sda2 MyStorage

Then:

lsblk

After that, you should be able to mount the volumes, chroot in, edit the files (with encrypt before the lvm2 hook), mount /boot, regenerate initramfs, unmount everything, reboot and voilà.

My (new) theory: Because lvdisplay and pvdisplay showed nothing, you're probably not using LUKS on top of LVM, but LVM on top of LUKS.

Last edited by clfarron4 (2014-04-03 21:33:04)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#21 2014-04-03 21:37:47

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

we're in business !
I can see and therefore, mount the volumes. I'll give a feed back for the later operations.
But for your theory, the friend of mine made me install the "easy procedure", with the /boot separated: the whole sda is not encrypt, but sda2 is...


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#22 2014-04-03 21:46:46

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

Ok, now, I'm on mounting each lv.
lsblk finds:
sda2
MyStorage
main-syst
main-usr
main-var
main-home
main-srv
main-opt
main-swap
main-olaff

I came back to the wiki:

# cryptsetup open --type luks /dev/mapper/MyStorage main-syst
Device /dev/mapper/MyStorage is not a valid LUKS device

Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

#23 2014-04-03 22:11:22

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,175
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

OK, so since /dev/sda2 is the LUKS device, you already mounted it with the command

cryptsetup open --type luks /dev/sda2 MyStorage

So you just need to mount the Logical Volumes (the LVM bit) like you would if you were mounting partitions (because you have already decrypted them). Assuming /dev/mapper/MyStorage-main-home is your /home partition, I would do this:

mkdir /mnt/home
mount /dev/mapper/MyStorage-main-home /mnt/home

Repeat for other volumes.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#24 2014-04-03 22:50:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [solved] last kernel upgrade - dropped to recovery shell

Make sure the VG is available before attempting to mount with vgchange... (then lvscan to check).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#25 2014-04-03 22:58:17

OlaffTheGreat
Member
Registered: 2013-06-03
Posts: 107

Re: [solved] last kernel upgrade - dropped to recovery shell

Once mount points created in /mnt

mount /dev/mapper/MyStorage-main-syst /mnt/syst
mount: /dev/mapper/MyStorage-main-syst is write-protected, mounting read-only
mount: special device /dev/mapper/MyStorage-main-syst does not exist

Same for other lvs

(When I am through with it, I'll write a mini howto to have an easy trouble shoting for this case, with your comments if you agree. It might be a way to clarify this luks-on-lvm vs lvm-on-luks matter.)
(And I go to bed, come back tomorrow.Thank you, we progress)

Last edited by OlaffTheGreat (2014-04-03 23:08:59)


Lenovo Thinkpad x230 i5-3320M 2.6GHz 250GB SSD (M4) 16GB
SSD | SeaBIOS | GPT | BTRFS | OpenRC | Xfce4 | Zsh | Tmux | Spacemacs
* "Aware Newbie" *
Ibus IM for language script support (e.g. 日本語 - 中文)

Offline

Board footer

Powered by FluxBB