You are not logged in.

#1 2014-03-28 16:33:57

bengbers
Member
Registered: 2014-03-28
Posts: 4

[Solved] Install / configure GRUB on LVM

I've used the Beginners' Guide to install archlinux-2014.02.01-dual on a machine that already had LVM installed.

After renaming the physical and logical volumegroups, I could mount the logical volumes rootvol and home with 'mount /dev/arch/rootvol /mnt' and 'mount /dev/arch/home /mnt/home' (instead of using mount /dev/sda3/rootvol /mnt).

The installation procedures works fine but I can't manage to install the bootloader.

Where can I find instructions on how to install the bootloader on LVM?
Are there any changes I have to apply before I can begin with the instalation off the bootloader?

Ben

Last edited by bengbers (2014-04-02 20:20:27)

Offline

#2 2014-03-28 19:04:54

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

Re: [Solved] Install / configure GRUB on LVM


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-03-28 21:14:17

bengbers
Member
Registered: 2014-03-28
Posts: 4

Re: [Solved] Install / configure GRUB on LVM

Thanks

Offline

#4 2014-03-28 23:27:13

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

Re: [Solved] Install / configure GRUB on LVM

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-03-31 21:18:13

bengbers
Member
Registered: 2014-03-28
Posts: 4

Re: [Solved] Install / configure GRUB on LVM

I'll try to describe what I did. To me it seems that arch is installed but the only failure is the installation of grub.

With gparted I set up /dev/sda1 as MBR (ext3)

I set up LVM as follows:
vgcreate /dev/arch/sda2
lvcreate -L 30GB -n rootvol /dev/arch
lvcreate -L 3.53GB -n swap /dev/arch
lvcreate -l 100%FREE -n home /dev/arch

mkswap /dev/arch/swap
swapon /dev/arch/swap
mkfs.ext4 /dev/arch/rootvol
mkfs.ext4 /dev/arch/home

mount /dev/arch/rootvol /mnt
mkdir /mnt/home
mkdir /mnt/boot
mount /dev/arch/home /mnt/home
mount /dev/sda1 /mnt/boot

pacstrap -i /mnt base base-devel grub-bios
genfstab -p -U /mnt >> /mnt/etc/fstab

arch-chroot /mnt
  create locale
  create vconsole.conf
  create /etc/hostname
  create localzone
  set hwclock

nano /etc/mkinitcpio.conf
  add lvm2 to HOOKS=" ... lvm2 filesystems ...."
mkinitcpio -p linux
grub-install /dev/sda

exit
umount -R /mnt
reboot

All this without errors
After rebooting a normal grub boot-screen popped up. But after a few seconds, when trying to boot arch-linux it said something like "can' t find linux core?"
And after trying to enter the grub rescue-mode, I am now stuck in the grub-prompt.

How can I exit the grub rescue-mode?
Do you see any errors in mu attempt to create grub-config?

Offline

#6 2014-03-31 23:12:49

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [Solved] Install / configure GRUB on LVM

Did you generate the grub configuration files? It's not mentioned above.

If you missed this step then you can boot from the install media and chroot into your new installation so you can run the command to generate the config.

Last edited by Slithery (2014-03-31 23:15:04)


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2014-03-31 23:26:23

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

Re: [Solved] Install / configure GRUB on LVM

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#8 2014-04-01 07:41:02

bstaletic
Member
Registered: 2014-02-02
Posts: 658

Re: [Solved] Install / configure GRUB on LVM

As slithery said, you had to run grub-mkconfig again after the chages made in mkinitcpio.conf.

Offline

#9 2014-04-02 20:16:53

bengbers
Member
Registered: 2014-03-28
Posts: 4

Re: [Solved] Install / configure GRUB on LVM

Next try (now with code-tags):

Install from boot-medium (DVD)

root@archiso ~ # mount /dev/arch/rootvol /mnt
root@archiso ~ # mount /dev/arch/home /mnt/home
root@archiso ~ # mount /dev/sda1 /mnt/boot

. pacstrap, genfstab, locale, vconsole and all that stuff can be skipped

root@archiso ~ # arch-chroot /mnt /bin/bash
[root@archiso /]# nano /etc/mkinitcpio.conf

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

[root@archiso /]# mkinitcpio -p linux

  No errors, but
==> WARNING: Possibly missing firmware for module aic94xx
==> WARNING: Possibly missing firmware for module smsmdtv

[root@archiso /]# grub-install /dev/sda
[root@archiso /]# grub-mkconfig -o /boot/grub/grub.cfg

  WARNING: Failed to connect to lvmetad: No such file or directory. Falling back to internal scanning  |  This block repeated at least 4 times
  /run/lvm/lvmetad.socket: connect failed: No such file or directory (this line repeated 17 times)        |
  Found linux image /boot/vmlinuz-linux
  Found initramfs image: /boot/initramfs-linux.img
  Found fallback initramfs image: /boot/initramfs-linux-fallback.img
  Found linux image: /boot/vmlinuz-linux
  Found initrd image: /boot/initramfs-linux.img
  done

[root@archiso /]# passwd
[root@archiso /]# exit
root@archiso ~ # umount -R /mnt
root@archiso ~#  reboot

Succes!
Conclusion, I must have missed the line [root@archiso /]# grub-mkconfig -o /boot/grub/grub.cfg

Last edited by bengbers (2014-04-03 13:17:14)

Offline

#10 2014-04-02 20:33:21

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

Re: [Solved] Install / configure GRUB on LVM

jasonwryan wrote:

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB