You are not logged in.

#1 2015-12-25 12:49:40

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 249

Booting Arch ISO placed on LVM using grub2

Hi,

I have grub.cfg:

menuentry "Arch iso" {
  insmod lvm
  set isofile=/archlinux-2015.12.01-dual.iso
  set root=(lvm/laptop-data)
  loopback loop $isofile
  linux (loop)/arch/boot/x86_64/vmlinuz archisobasedir=arch archisolabel=ARCH_201512 earlymodules=loop img_loop=$isofile
  initrd (loop)/arch/boot/x86_64/archiso.img
}

Kernel gets booted but arch can't be mounted because /dev/disk/by-label/ARCH_20512 doesn't exist (in fact /dev/disk/by-label doesn't exist). What am I doing wrong?


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

#2 2015-12-26 02:28:03

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: Booting Arch ISO placed on LVM using grub2

You don't need these:

archisobasedir=arch archisolabel=ARCH_201512 earlymodules=loop

but either img_dev or img_loop: https://projects.archlinux.org/archiso. … bootparams

For example:

...
probe -u $root -s uuid
linux (loop)/arch/boot/x86_64/vmlinuz img_loop=$isofile img_dev=/dev/disk/by-uuid/$uuid
...

or

...
probe -l $root -s label
linux (loop)/arch/boot/x86_64/vmlinuz img_loop=$isofile img_dev=$label
...

if you have set a filesystem label for the logical volume. You can also choose to have static UUID/LABEL specified in grub.cfg instead of using the probe command in grub shell.

Last edited by tom.ty89 (2015-12-26 09:57:59)

Offline

#3 2015-12-26 09:52:30

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 249

Re: Booting Arch ISO placed on LVM using grub2

Thank you for answer. Unfortunately I'm still unable to get it working. You said that I should use probe root, I changed it to probe $root as without that grub2 was complaining that it can't find root device. This is fine, but arch still is not mounted. It says that it tries to mount /dev/disk/by-uuid/UUID-HERE, but after 30 seconds of waiting I get prompt. When I ls /dev/disk/by-uuid there is no uuid that Arch tried to mount.

The uuid that grub detects is correct, it is the same as result of blkid /dev/mapper/laptop-data.

Maybe initrd on the iso file is not prepared to detect LVM?


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

#4 2015-12-26 10:01:23

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: Booting Arch ISO placed on LVM using grub2

Oh sorry yeah it should be $root. Corrected in the original post.

Hmm you're probably right. Apparently archiso does not include the lvm install and runtime hook:
https://projects.archlinux.org/archiso. … o/initcpio
as the lvm2 provides:
https://projects.archlinux.org/svntogit … kages/lvm2
https://projects.archlinux.org/svntogit … kages/lvm2

Last edited by tom.ty89 (2015-12-26 10:05:48)

Offline

#5 2015-12-26 23:08:18

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 249

Re: Booting Arch ISO placed on LVM using grub2

Maybe I'll fill bug report with feature request smile


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

#6 2015-12-27 10:44:43

Abaddon
Member
From: Poland
Registered: 2004-05-03
Posts: 249

Re: Booting Arch ISO placed on LVM using grub2


Gnome - The weakest link!
Linux, *not* GNU/Linux!

Offline

Board footer

Powered by FluxBB