Skip to content

Commit

Permalink
handle kvm
Browse files Browse the repository at this point in the history
  • Loading branch information
akerl committed May 11, 2015
1 parent 8188747 commit fded102
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion initcpio/hooks/dock0
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ run_hook() {
dock0_mount_handler() {
local newroot="$1"

local root="${root:=/dev/xvda}"
if [ -e /dev/xvda ] ; then
local defaultroot="/dev/xvda"
else
local defaultroot="/dev/sda"
fi

local root="${root:=${defaultroot}}"
local basepath="${basepath:=/run/vm}"
local rootfspath="${rootfspath:=latest/vm_root}"
local cowspace="${cowspace:=/dev/mapper/luks-cowspace}"
Expand Down
8 changes: 7 additions & 1 deletion initcpio/hooks/lvm-dock0
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ create_lv() {
}

run_earlyhook() {
if [ -e /dev/xvda ] ; then
local defaultpv="/dev/xvda"
else
local defaultpv="/dev/sda"
fi

local vg="${vg:=dock0}"
local pv="${pv:=/dev/xvdb}"
local pv="${pv:=${defaultpv}}"

mkdir /run/lvm
lvmetad
Expand Down

0 comments on commit fded102

Please sign in to comment.