1

I installed Arch x86_64, these are the commands I used during the installation:

# parted /dev/sda
(parted) mklabel msdos
(parted) mkpart primary ext2 2MiB 2GiB
(parted) mkpart primary ext4 2GiB 100%
(parted) set 1 boot on
(parted) q

# mkfs.ext2 /dev/sda1
# cryptsetup --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/sda2

# cryptsetup open --type luks /dev/sda2 r00t

# pvcreate /dev/mapper/lvm
# vgcreate MyStorage /dev/mapper/r00t

# lvcreate -L 2GiB MyStorage -n swapvol
# lvcreate -L 3GiB MyStorage -n tmpvol
# lvcreate -L 30GiB MyStorage -n rootvol
# lvcreate -l +100%FREE MyStorage -n homevol

# mkswap /dev/mapper/MyStorage-swapvol
# mkfs.ext4 /dev/mapper/MyStorage-homevol
# mkfs.ext4 /dev/mapper/MyStorage-rootvol
# mkfs.ext4 /dev/mapper/MyStorage-tmpvol

# mount /dev/MyStorage/rootvol /mnt
# mkdir /mnt/home
# mount /dev/MyStorage/homevol /mnt/home
# mkdir /mnt/tmp
# mount /dev/MyStorage/tmpvol /mnt/tmp
# swapon /dev/MyStorage/swapvol

# mkdir /mnt/boot
# mount /dev/sda1 /mnt/boot

# nano mkinitcpio.conf
added "encrypt lvm2" to /etc/mkinitcpio.conf hooks: HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck"

# nano /etc/resolv.conf
replaced DNS with 8.8.8.8

# pacstrap /mnt base base-devel

# genfstab -U -p /mnt >> /mnt/etc/fstab

# arch-chroot /mnt /bin/bash

uncommened e_us.UTF-8 UTF-8 in /etc/locale.gen
# locale-gen
# echo LANG=en_US.UTF-8 > /etc/locale.conf
# export LANG=en_US.UTF-8

# ln -sf /usr/share/zoneinfo/Europe/Sofia /etc/localtime

# hwclock --systohc --utc

# echo myhstnm > /etc/hostname
added "myhstnm" to /etc/hosts

# systemctl enable dhcpcd@enp4s4.service

# nano mkinitcpio.conf
added "encrypt lvm2" to /etc/mkinitcpio.conf hooks: HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck"
# mkinitcpio -p linux

# pacman -S networkmanager
# systemctl enable NetworkManager.service

# passwd

# pacman -S grub os-prober

# grub-install --recheck /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
    Generating grub configuration file ...
    /run/lvm/lvmetad.socket: connect failed: No such file or directory
    WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
# nano /etc/lvm/lvm.conf
changed "use_lvmetad = 1" to "use_lvmetad= 0"
# grub-mkconfig -o /boot/grub/grub.cfg

# exit

# reboot


same errors as before


# cryptsetup open --type luks /dev/sda2 r00t

# mount /dev/MyStorage/rootvol /mnt
# mount /dev/MyStorage/homevol /mnt/home
# mount /dev/MyStorage/tmpvol /mnt/tmp
# swapon /dev/MyStorage/swapvol
# mount /dev/sda1 /mnt/boot

# nano mkinitcpio.conf
added "encrypt lvm2" to /etc/mkinitcpio.conf hooks: HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck"

# nano /etc/resolv.conf
replaced DNS with 8.8.8.8

# arch-chroot /mnt /bin/bash

# nano /etc/default/grub
changed: GRUB_CMDLINE_LINUX="cryptdevice=UUID=11c8d724-7ae8-4ca3-a1e8-658d6aaee6ab:MyStorage root=/dev/mapper/MyStorage-rootvol"

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

# mkinitcpio -p linux

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

I use MBR, unencrypted /boot and LUKS with 4 LVs for swap, tmp, home, root.

As you can see from the log, I tried to change /etc/default/grub, but it didn't work.

The errors I see are:

[    15.032148] blk_update_request: I/O error, dev fd0, sector 0
[    27.239028] blk_update_request: I/O error, dev fd0, sector 0
ERROR: device '/dev/mapper/MyStorage-rootvol' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/MyStorage-rootvol'.
You are being dropped to a recovery shell
Type 'exit' to try and continue booting.
can't access tty; job control turned off

If I type 'exit', I get:

mount: you must specify the filesystem type
You are being dropped to a recovery shell
can't access tty; job control turned off

This is the third time I've tried installing Arch, I can't figure out what to do.

6
  • I fixed it! Here are the commands I used this time: pastebin.com/r5HuCDwe. I changed GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:MyStorage root=/dev/mapper/MyStorage". Later I will make by UUID. :) – Rageragerage Jul 6 '15 at 16:44
  • you should not post a comment to answer your question (for a huge number of reasons). Post it as an actual answer, and if no one else responds with a better answer in a few days, accept your answer. In addition, do not post the answer (nor important information) in a pastebin (especially not pastebin.com); post it inline. Please correct these issues. – HalosGhost Jul 6 '15 at 17:53
  • @HalosGhost Sure, thanks for the guidance. What makes pastebin.com a bad site? Do they delete pastes after a while? Also, I recognize the inherent wrongness in posting content in another site (it may be down, etc.). – Rageragerage Jul 6 '15 at 17:56
  • Pastebin.com, despite its being well-known, is easily the least useful and sane pastebin that exists; it breaks formatting, fails at syntax highlighting, displays ads, requires javascript and a variety of other horrible issues. I would strongly recommend pastebins like ptpb.pw, sprunge.us or ix.io in the future. – HalosGhost Jul 6 '15 at 18:01
  • @HalosGhost I have to agree about the broken formatting (just observed it). I bookmarked the other ones for future use. But they're PITA for people who don't want or have the time to work out how to use them (being CLI), especially from Windows. – Rageragerage Jul 6 '15 at 18:02
1

I fixed it! Here are the commands I used this time:

# parted /dev/sda
(parted) mklabel msdos
(parted) mkpart primary ext2 2MiB 2GiB
(parted) mkpart primary ext4 2GiB 100%
(parted) set 1 boot on
(parted) q

# mkfs.ext2 /dev/sda1
# cryptsetup --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/sda2

# cryptsetup open --type luks /dev/sda2 r00t

# pvcreate /dev/mapper/r00t
# vgcreate MyStorage /dev/mapper/r00t

# lvcreate -L 2GiB MyStorage -n swapvol
# lvcreate -L 3GiB MyStorage -n tmpvol
# lvcreate -L 30GiB MyStorage -n rootvol
# lvcreate -l +100%FREE MyStorage -n homevol

# mkswap /dev/mapper/MyStorage-swapvol
# mkfs.ext4 /dev/mapper/MyStorage-homevol
# mkfs.ext4 /dev/mapper/MyStorage-rootvol
# mkfs.ext4 /dev/mapper/MyStorage-tmpvol

# mount /dev/MyStorage/rootvol /mnt
# mkdir /mnt/home
# mount /dev/MyStorage/homevol /mnt/home
# mkdir /mnt/tmp
# mount /dev/MyStorage/tmpvol /mnt/tmp
# swapon /dev/MyStorage/swapvol

# mkdir /mnt/boot
# mount /dev/sda1 /mnt/boot

# nano /etc/mkinitcpio.conf
added "encrypt lvm2" to /etc/mkinitcpio.conf hooks: HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck"

# nano /etc/resolv.conf
replaced DNS with 8.8.8.8

# pacstrap /mnt base base-devel

# genfstab -U -p /mnt >> /mnt/etc/fstab

# arch-chroot /mnt /bin/bash

uncommened e_us.UTF-8 UTF-8 in /etc/locale.gen
# locale-gen
# echo LANG=en_US.UTF-8 > /etc/locale.conf
# export LANG=en_US.UTF-8

# ln -sf /usr/share/zoneinfo/Europe/Sofia /etc/localtime

# hwclock --systohc --utc

# echo myhstnm > /etc/hostname
added "myhstnm" to /etc/hosts

# systemctl enable dhcpcd@enp4s4.service

# nano /etc/mkinitcpio.conf
added "encrypt lvm2" to /etc/mkinitcpio.conf hooks: HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck"
# mkinitcpio -p linux

# nano /etc/default/grub
changed: GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:MyStorage root=/dev/mapper/MyStorage"

# grub-install --recheck /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg
# nano /etc/lvm/lvm.conf
changed "use_lvmetad = 1" to "use_lvmetad= 0"
# grub-mkconfig -o /boot/grub/grub.cfg

# exit

# reboot

I changed GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:MyStorage root=/dev/mapper/MyStorage".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.