You are not logged in.

#1 2018-02-19 07:16:22

andrewyg
Member
Registered: 2018-02-19
Posts: 3

Grub finding wrong disk

Hello everyone. I have installed ArchLinux version <your_version_of_ArchLinux_here> on a Hard Disk Drive with LUKS encryption. I have manually created and encrypted partitions with cfdisk and cryptsetup. Then i installed ArchLinux.

My partitions:

1. BOOT partition 8G /dev/sda1

2. Encrypted SWAP partition 8G crypto_LUKS /dev/sda2 i mount SWAP with keyfile /mnt/keys/swapenckeyfile

3. Encrypted ROOT partition 98.6G crypto_LUKS /dev/sda3 i mount ROOT with password

I am unable to boot into anything else than emergency shell and on every boot i receive the following error messages:

https://1l7nug.bn.files.1drv.com/y4mJoM … JPG?psid=1

result by running lsblk:

NAME                MAJ:MIN    RM        SIZE     RO        TYPE     MOUNTPOINT
sda                          8:0            1     114.6G        0        disk       
  sda1                      8:1            1            8G        0        part        /mnt/boot
  sda2                      8:2            1            8G        0        part
    encswap          254:1            0            8G       0         crypt      [SWAP]
  sda3                      8:3            1       98.6G        0        part
    encroot            254:0            0       98.6G        0        crypt      /mnt
sdb                          8:16          1         7.2G        0        disk
  sdb1                      8:17          1         7.2G        0        part       /run/archiso/bootmnt

----------------

fstab config (path:/etc/fstab)

...
#   <file system>    <dir>     <type>    <options>     <dump>     <pass>
#  /dev/sda3
UUID=c25abd3e-d568-4a97-924e-b13d9b6a02c3      /                    crypto_LUKS            rw,relatime,data=ordered    0 1

# /dev/sda1
UUID=B2D6-C9CE                                                       /boot             vfat                           rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro    0 2

# /dev/sda2
UUID=3b5cecc3-b875-4058-a519-10c4fa4872d4        none             crypto_LUKS            defaults,pri=-2 0 0

----------------

/etc/crypttab

# Configuration for encrypted block devices.
# See crypttab(5) for details.

# NOTE: Do not list your root (/) partition here, it must be set up
#       beforehand by the initramfs (/etc/mkinitcpio.conf).

# <name>       <device>                                     <password>              <options>
# home         UUID=b8ad5c18-f445-495d-9095-c9ec4f9d2f37    /etc/mypassword1
# data1        /dev/sda3                                    /etc/mypassword2
# data2        /dev/sda5                                    /etc/cryptfs.key
# swap         /dev/sdx4                                    /dev/urandom            swap,cipher=aes-cbc-essiv:sha256,size=256
# vol          /dev/sdb7                                    none

----------------------

/etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(piix ide_disk reiserfs)
MODULES=()

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, gzip compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

Last edited by andrewyg (2018-02-20 13:52:10)

Offline

#2 2018-02-19 07:32:34

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

Re: Grub finding wrong disk

Post details of your partition table, and relevant configs (grub, mkinitcpio, crypttab etc).


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2018-02-19 21:32:53

andrewyg
Member
Registered: 2018-02-19
Posts: 3

Re: Grub finding wrong disk

No body is helping...

Offline

#4 2018-02-19 21:36:15

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

Re: Grub finding wrong disk

Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code

andrewyg wrote:

No body is helping...

And don't bump: https://wiki.archlinux.org/index.php/Co … ct#Bumping


Nobody is helping because you haven't provided the information you were asked for. The error is pretty clear: you have the wrong UUID in your boot loader/manager. But without that config, and your mkinitcpio.conf, we are all just guessing.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2018-02-20 13:53:46

andrewyg
Member
Registered: 2018-02-19
Posts: 3

Re: Grub finding wrong disk

jasonwryan wrote:

Post details of your partition table, and relevant configs (grub, mkinitcpio, crypttab etc).


Moving to NC...

I've add the file you need, just want to make sure do you meant mkinitcpio.conf for mkinitcpio?

Also I can't find the file grub under /etc (I've copy whole directory out), there is /etc/grub.d but can't sure which file do you need an you give me the real path for the grub file?

Offline

#6 2018-02-20 15:11:41

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Grub finding wrong disk

/boot/grub/grub.conf and output of "fdisk -l /dev/sda" as well as "lsblk -f"

How exactly did you install archlinux?

Offline

#7 2018-02-20 16:18:12

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Grub finding wrong disk

seth wrote:

/boot/grub/grub.conf

I think you mean /boot/grub/grub.cfg ?

Offline

#8 2018-02-20 16:42:35

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Grub finding wrong disk

There should be a fixed convention for suffixes ;-)
(Ie. "yes, of course")

Offline

#9 2018-02-20 16:58:24

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Grub finding wrong disk

seth wrote:

There should be a fixed convention for suffixes ;-)
(Ie. "yes, of course")

We did one better, we have several of them. tongue


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB