Remove kernel from template - now distributed as separate package
This commit is contained in:
parent
7987c16828
commit
6f88828cf4
15
README
15
README
@ -16,20 +16,7 @@ of Qubes-specific rpms to install you want to use (e.g. qubes-gui-vm, etc).
|
|||||||
|
|
||||||
# ./qubeize_image <img> <template-name>
|
# ./qubeize_image <img> <template-name>
|
||||||
|
|
||||||
4) Make sure the symlinks in vm_kernels_XXX/ point to correct kernel and initramfs
|
4) Finally, build the Template RPM (do it as normal user, not root), e.g.:
|
||||||
files you want to use for the template:
|
|
||||||
|
|
||||||
4a) In order to prepare a patched initramfs file, use the
|
|
||||||
patch_appvm_initramfs.sh program that is installed as part of
|
|
||||||
qubes-core-dom0.rpm:
|
|
||||||
|
|
||||||
# /usr/lib/qubes/patch_appvm_initramfs.sh \
|
|
||||||
<original_initrafms> \
|
|
||||||
<filename_for_patched_initramfs> \
|
|
||||||
/abs_path/vm-initramfs-patches/qubes_cow_setup.sh
|
|
||||||
|
|
||||||
|
|
||||||
5) Finally, build the Template RPM (do it as normal user, not root), e.g.:
|
|
||||||
|
|
||||||
$./build_rpm <name>
|
$./build_rpm <name>
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ URL: http://www.qubes-os.org
|
|||||||
Source: .
|
Source: .
|
||||||
|
|
||||||
Requires: qubes-core-dom0 >= 1.4.1
|
Requires: qubes-core-dom0 >= 1.4.1
|
||||||
|
Requires: kernel-qubes-vm
|
||||||
Requires: xdg-utils
|
Requires: xdg-utils
|
||||||
|
|
||||||
%define _builddir %(pwd)
|
%define _builddir %(pwd)
|
||||||
@ -44,12 +45,6 @@ cp clean_images/clean-volatile.img.tar $RPM_BUILD_ROOT/%{dest_dir}/clean-volatil
|
|||||||
|
|
||||||
cp vm_conf_files/dispvm-prerun.sh $RPM_BUILD_ROOT/%{dest_dir}/
|
cp vm_conf_files/dispvm-prerun.sh $RPM_BUILD_ROOT/%{dest_dir}/
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/kernels
|
|
||||||
cp vm_kernels/vmlinuz $RPM_BUILD_ROOT/%{dest_dir}/kernels/vmlinuz
|
|
||||||
cp vm_kernels/initramfs $RPM_BUILD_ROOT/%{dest_dir}/kernels/initramfs
|
|
||||||
|
|
||||||
cp vm_initramfs_patches/qubes_cow_setup.sh $RPM_BUILD_ROOT/%{dest_dir}/kernels/qubes_cow_setup.sh
|
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/apps.templates
|
mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/apps.templates
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/apps-template.templates
|
mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/apps-template.templates
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/apps
|
mkdir -p $RPM_BUILD_ROOT/%{dest_dir}/apps
|
||||||
@ -136,10 +131,6 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%ghost %{dest_dir}/volatile.img
|
%ghost %{dest_dir}/volatile.img
|
||||||
%ghost %{dest_dir}/private.img
|
%ghost %{dest_dir}/private.img
|
||||||
%{dest_dir}/dispvm-prerun.sh
|
%{dest_dir}/dispvm-prerun.sh
|
||||||
%dir %{dest_dir}/kernels
|
|
||||||
%{dest_dir}/kernels/vmlinuz
|
|
||||||
%{dest_dir}/kernels/initramfs
|
|
||||||
%{dest_dir}/kernels/qubes_cow_setup.sh
|
|
||||||
%attr (775,root,qubes) %dir %{dest_dir}/apps
|
%attr (775,root,qubes) %dir %{dest_dir}/apps
|
||||||
%attr (664,root,qubes) %{dest_dir}/apps/*
|
%attr (664,root,qubes) %{dest_dir}/apps/*
|
||||||
%attr (775,root,qubes) %dir %{dest_dir}/apps.templates
|
%attr (775,root,qubes) %dir %{dest_dir}/apps.templates
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
#
|
|
||||||
# This file should be places in pre-mount directory in dracut's initramfs
|
|
||||||
#
|
|
||||||
|
|
||||||
#!/bin/sh
|
|
||||||
echo "Qubes initramfs script here:"
|
|
||||||
|
|
||||||
if [ -e /dev/mapper/dmroot ] ; then
|
|
||||||
die "Qubes: FATAL error: /dev/mapper/dmroot already exists?!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
modprobe xenblk || modprobe xen-blkfront || echo "Qubes: Cannot load Xen Block Frontend..."
|
|
||||||
|
|
||||||
echo "Waiting for /dev/xvda* devices..."
|
|
||||||
while ! [ -e /dev/xvda ]; do sleep 0.1; done
|
|
||||||
|
|
||||||
if [ `blockdev --getro /dev/xvda` = 1 ] ; then
|
|
||||||
echo "Qubes: Doing COW setup for AppVM..."
|
|
||||||
|
|
||||||
while ! [ -e /dev/xvdc ]; do sleep 0.1; done
|
|
||||||
while ! [ -e /dev/xvdc2 ]; do sleep 0.1; done
|
|
||||||
|
|
||||||
echo "0 `blockdev --getsz /dev/xvda` snapshot /dev/xvda /dev/xvdc2 P 16" | \
|
|
||||||
dmsetup create dmroot || { echo "Qubes: FATAL: cannot create dmroot!"; }
|
|
||||||
echo Qubes: done.
|
|
||||||
else
|
|
||||||
echo "Qubes: Doing R/W setup for TemplateVM..."
|
|
||||||
echo "0 `blockdev --getsz /dev/xvda` linear /dev/xvda 0" | \
|
|
||||||
dmsetup create dmroot || { echo "Qubes: FATAL: cannot create dmroot!"; exit 1; }
|
|
||||||
echo Qubes: done.
|
|
||||||
fi
|
|
@ -1 +0,0 @@
|
|||||||
vm_kernels_x64
|
|
2
vm_kernels_x64/.gitignore
vendored
2
vm_kernels_x64/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
initramfs-*
|
|
||||||
vmlinuz-*
|
|
@ -1 +0,0 @@
|
|||||||
initramfs-2.6.34.1-13.xenlinux.qubes.x86_64.qubeized.img
|
|
@ -1 +0,0 @@
|
|||||||
vmlinuz-2.6.34.1-13.xenlinux.qubes.x86_64
|
|
Loading…
Reference in New Issue
Block a user