the fedorize_image script
This commit is contained in:
parent
b5e395d385
commit
de70f3a4fd
27
README
27
README
@ -3,21 +3,32 @@ The Template Builder
|
|||||||
|
|
||||||
(applies also to the netvm builder)
|
(applies also to the netvm builder)
|
||||||
|
|
||||||
1) get a clean image of a Linux install (e.g. by using virt-install) NOTE: We
|
1) First, create a clean image of Fedora Linux install. You can use the fedoraize_image
|
||||||
assume that the image will have a two-partition layout:
|
script for this:
|
||||||
|
|
||||||
|
fedorize_image <image> <file-with-packets-lists>
|
||||||
|
|
||||||
|
NOTE: The fedorize_image script can be also used to update an image -- it
|
||||||
|
automatically assumes the update mode if the <image> already exists.
|
||||||
|
|
||||||
|
The fedorize image takes care about creating proper partition table, that
|
||||||
|
contains root and swap partitions, to create the initial rpm database, and
|
||||||
|
install some core packages.
|
||||||
|
|
||||||
|
We assume that the image will have a two-partition layout:
|
||||||
|
|
||||||
img1 <--- the root fs (/)
|
img1 <--- the root fs (/)
|
||||||
img2 <--- the swap
|
img2 <--- the swap
|
||||||
|
|
||||||
2) update symlinks in rpms_to_install so that they point to the current version
|
2) Update symlinks in rpms_to_install_XXX/ so that they point to the current version
|
||||||
of rpms to install
|
of Qubes-specific rpms to install you want to use (e.g. qubes-gui-vm, etc).
|
||||||
|
|
||||||
3) Now, you can "qubeize" the image. This must be done as root. E.g.:
|
3) Now, you can "qubeize" the image. This must be done as root. E.g.:
|
||||||
|
|
||||||
# ./qubeize_image clean_images/some_image.img f12-x64-compact
|
# ./qubeize_image <img> <template-name>
|
||||||
|
|
||||||
4) Make sure the symlinks in vm_kernels point to correct kernel and initramfs
|
4) Make sure the symlinks in vm_kernels_XXX/ point to correct kernel and initramfs
|
||||||
files.
|
files you want to use for the template:
|
||||||
|
|
||||||
4a) In order to prepare a patched initramfs file, use the
|
4a) In order to prepare a patched initramfs file, use the
|
||||||
patch_appvm_initramfs.sh program that is installed as part of
|
patch_appvm_initramfs.sh program that is installed as part of
|
||||||
@ -29,8 +40,6 @@ qubes-core-dom0.rpm:
|
|||||||
/abs_path/vm-initramfs-patches/qubes_cow_setup.sh
|
/abs_path/vm-initramfs-patches/qubes_cow_setup.sh
|
||||||
|
|
||||||
|
|
||||||
4b) Manually adjust the appmenus
|
|
||||||
|
|
||||||
5) Finally, build the Template RPM (do it as normal user, not root), e.g.:
|
5) Finally, build the Template RPM (do it as normal user, not root), e.g.:
|
||||||
|
|
||||||
$./build_rpm <name>
|
$./build_rpm <name>
|
||||||
|
BIN
base_rpms/fedora-release-13-1.noarch.rpm
Normal file
BIN
base_rpms/fedora-release-13-1.noarch.rpm
Normal file
Binary file not shown.
BIN
base_rpms/filesystem-2.4.31-1.fc13.x86_64.rpm
Normal file
BIN
base_rpms/filesystem-2.4.31-1.fc13.x86_64.rpm
Normal file
Binary file not shown.
BIN
base_rpms/setup-2.8.17-1.fc13.noarch.rpm
Normal file
BIN
base_rpms/setup-2.8.17-1.fc13.noarch.rpm
Normal file
Binary file not shown.
1
clean_images/.gitignore
vendored
1
clean_images/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
*
|
|
BIN
clean_images/clean-starter.img.bz2
Normal file
BIN
clean_images/clean-starter.img.bz2
Normal file
Binary file not shown.
16
clean_images/packages-appvm.list
Normal file
16
clean_images/packages-appvm.list
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
@base
|
||||||
|
@core
|
||||||
|
@editors
|
||||||
|
@fonts
|
||||||
|
@base-x
|
||||||
|
@printing
|
||||||
|
@kde-desktop
|
||||||
|
@graphics
|
||||||
|
@input-methods
|
||||||
|
@system-tools
|
||||||
|
@admin-tools
|
||||||
|
@sound-and-video
|
||||||
|
@office
|
||||||
|
koffice-suite
|
||||||
|
firefox
|
||||||
|
thunderbird
|
8
clean_images/packages-netvm.list
Normal file
8
clean_images/packages-netvm.list
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@base
|
||||||
|
@core
|
||||||
|
@editors
|
||||||
|
@hardware-support
|
||||||
|
@base-x
|
||||||
|
@kde-desktop
|
||||||
|
xterm
|
||||||
|
|
BIN
clean_images/part.bin
Normal file
BIN
clean_images/part.bin
Normal file
Binary file not shown.
43
fedorize_image
Executable file
43
fedorize_image
Executable file
@ -0,0 +1,43 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
IMG=$1
|
||||||
|
PKGLISTFILE=$2
|
||||||
|
|
||||||
|
if ! [ $# -eq 2 ]; then
|
||||||
|
echo "usage $0 <img_file_name> <package_list>"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ -f $IMG ]; then
|
||||||
|
echo "-> Image file already exists, assuming *update*..."
|
||||||
|
mount -o loop,offset=$((63*512)) $IMG mnt || exit 1
|
||||||
|
INSTALLDIR=`pwd`/mnt/
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "-> Initializing empty image with part table and filesystems..."
|
||||||
|
cp clean_images/clean-starter.img $IMG
|
||||||
|
|
||||||
|
touch $IMG || exit 1
|
||||||
|
|
||||||
|
mkdir -p mnt
|
||||||
|
mount -o loop,offset=$((63*512)) $IMG mnt || exit 1
|
||||||
|
|
||||||
|
INSTALLDIR=`pwd`/mnt/
|
||||||
|
|
||||||
|
echo "-> Initializing RPM database..."
|
||||||
|
rpm --initdb --root=$INSTALLDIR
|
||||||
|
rpm --import --root=$INSTALLDIR keys/*
|
||||||
|
|
||||||
|
echo "-> Installing core RPM packages..."
|
||||||
|
rpm -i --root=$INSTALLDIR base_rpms/setup-*.rpm
|
||||||
|
rpm -i --root=$INSTALLDIR base_rpms/filesystem-*.rpm
|
||||||
|
rpm -i --root=$INSTALLDIR base_rpms/fedora-release-*.rpm
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
PKGGROUPS=$(cat $PKGLISTFILE)
|
||||||
|
echo "-> Installing package groups..."
|
||||||
|
yum install --installroot=$INSTALLDIR $PKGGROUPS
|
||||||
|
|
||||||
|
umount mnt
|
29
keys/RPM-GPG-KEY-fedora-13-primary
Normal file
29
keys/RPM-GPG-KEY-fedora-13-primary
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
Version: GnuPG v1.4.5 (GNU/Linux)
|
||||||
|
|
||||||
|
mQINBEtWPNwBEADjDowYLqGZJevWtPil9jpwrN2gUE5YdKSpdN+FmeS4PaBjM293
|
||||||
|
O56WY1vElOFbD/wO0+UsYsSU3J+Wfz/6hNnC953mNN4d6luT2tMs0Qc5LZ4Xmsod
|
||||||
|
a5BWlr1tASUBA/DPiS1mtdKm3n6WuW3fZYydRK2EBskv9tuA3LKgmm9e9OcbTJjC
|
||||||
|
lUdtw7868WqR2aU383l9G9HPoN6aR4EKgNgSefdNPTsxD04xbLo/aSHAG85fvXmg
|
||||||
|
2z2sVOw3v2oEALCIaL0QPWZ3gcCyY+FUmF8fWofSEqnHWhdrmbqvsitX+BGWte5o
|
||||||
|
F0M5m1JIDIBu7JxEeB0t0ZNoeZnWBWsXTY50qUSZjLRSsgkiSNaaaEAOvu4TJe79
|
||||||
|
B6xfv8zn2P98lnBEuuAH5GtFsAAf/7htchKbQ72ePGLjIow4BSAr2ZTIhaRnrd6v
|
||||||
|
fKSZsL0lKp8rutUTYncm/EM6xB+fApf+BlDtsw2HWZqi14ADGM8pVOwq4rwhWWFd
|
||||||
|
em9pGosy4fW8Oug0T+WIXmYx3TRh1o2U7kBDrKUqZu6Gm57YFAAARPjgeg0Pu5+P
|
||||||
|
JEtRinhfm57s6YieefzBY/rha48sWk5jbXFKqbOCNInE9rerWnpscvSVaIhGQZYW
|
||||||
|
Za3FGhjAHU5ZEDVHT+du5X+aKqj2NZmi+5G/DBg2322d0++exyRHIU//6QARAQAB
|
||||||
|
tCZGZWRvcmEgKDEzKSA8ZmVkb3JhQGZlZG9yYXByb2plY3Qub3JnPokCNgQTAQIA
|
||||||
|
IAUCS1Y83AIbDwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEH7catbo5A/egacP
|
||||||
|
/1rDtOD5YhVhxJr2rcVyMF0yFERtRVP+nb4vb5HGxms6C4nI8b0jYwLe/OAkdS5g
|
||||||
|
xdw+MVKVx1RcnN83N5YBwcCJiNiaN/SXUb+SbIWNCbfZq0s7jm9OWtZLE+WRkY8F
|
||||||
|
NKfogR+rd27YfkdI+Y/5at4e9J0c6HyiczNMfUaahZhl+XeodZwaGdjhNpiKD/LC
|
||||||
|
V/Ouhq46HUEuos5bHtk2Pz+1EUhsCuih/eeIHU2bRtRGjYF9jGffs4O9b+G/QfI2
|
||||||
|
42IDoNqVotyLndiJBiR67iUGG8NLYARi9sDeD+B7pQ1b+LptYq1ltn4/3gbngKza
|
||||||
|
SqXFdcjx2SOjpRPOGRc/pPchoAOZS2dYr8aSVkwc6A0VRLb8FGLaVkQa3o0eAq/N
|
||||||
|
95wCE9XSFtGWIiCLjsygrTaXjOKdLzOAhaShk4KOdD2phHQ+cwz/Z9fDvtAozPvQ
|
||||||
|
o36uB0d6Y1mdDjCmtfNfYTumL1z40/evLOlLXadQjY/+GoidBh+BotSCAeQLAMMH
|
||||||
|
+yDaTBFhUIER76OVfpMTja2D2s5YmcD01LhLF4Q3DsfNCSiwe8vhiN1KzyVnrwJi
|
||||||
|
T6HwcX68lc0zXhIOADUohs950Drm3btOJP0vZTc0KT8Bvxy/ru+vkdFoqUL3Cw54
|
||||||
|
g9fxqLowt3WXdBXuTdM9wlrBXXrSLpGFuuiv4Yzo2u3Q
|
||||||
|
=0lqj
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
39
keys/qubes-release-1-signing-key.asc
Normal file
39
keys/qubes-release-1-signing-key.asc
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||||
|
|
||||||
|
mQINBEu3PJsBEAC+D2wrsz2TD/ykBdEW26c/O9xQ62P8cMYBnghKOZJ+ioDCtWwU
|
||||||
|
KtRYwHjEubfEoYOZTZ9hH89wTKV5y8muL5WC0SOLfqRKukDuDTXQLDAykfxgwE5n
|
||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u3mKk0R1S/P5chCGRspcRWt4GTWu7m
|
||||||
|
TGyUGus68SFqHyOPMbggHITleWUlha/kI8uCR74olvHUjf0PPgG97DmUhWmw5Vuf
|
||||||
|
Nb3yiz0wPPqG+YgPLt9iOafpncAbzITQc/oE8CyEbammBqkXdDW/5gdvjre9vwtK
|
||||||
|
7JTive9lZkOpL9/+1/g++kcIAE1kXmf7KsbH81iMkKZIVt46OgamYpmlpLud1Pfl
|
||||||
|
7+37496JuO+0YuCRFeiPDLrYAX2wciWBlxT5fXf83MZ7LBDNm1wd+/2Cwyw7PdPE
|
||||||
|
HOWnc8ibwWTzWggroHzcFkJFQYNSK1fr0QAEok8Z29x0d7bUK87adq44bRAmGHYx
|
||||||
|
d121Tim3u3KomQwNrVi4ObslJ6ZmJN1s9d1CiRaYmS0Bk3N/QQqJ4qwSj6JSYb1H
|
||||||
|
akWdjbfH45wimvaCYKHkKXTMbBiW0WITbl9m5kju1beiiQIcBBABAgAGBQJLt0An
|
||||||
|
AAoJEN36Gj42h5SU2QIP/1xJgH9A09bQxCY+g+N/yg62skd17P9Ea61sZPlopZYG
|
||||||
|
SclARFeGVz3H17H7l8TFAovrWJqcVKLLRGUDxDqIFGGLtkrQazxCH/SiwZbgRzoj
|
||||||
|
cAGKjCxn5EJ1JuaiyCfHfQ5EIYSQyf/yWxi1TqqsfA4celQevxe3B8HiSkUntuQv
|
||||||
|
4uXjBtlDbb5BTsIJIv8L1zyJy6efbPYBPeZTDXNCnEwQ73g5Z7CHkRIlphIVG/bS
|
||||||
|
Fmdxyk5ysCkALSxGRRaXIUjRdIIZRkxanh9xqREkHV0ZKD9zTxGMXMZcXzf68aBW
|
||||||
|
k+gZlMFLUntM0MN98ru8UzexSRPbOuMePBVYfEnAxh19o9aoci5lcMI/5cyT0vvq
|
||||||
|
tI1JGdVsM/R3IjxYsKFmb2PlbU9NrFn8UfqKjwz0nccwXibpyVg3utpyZJIrP6Y3
|
||||||
|
2pxCMM2KAn6o6y0h/nt14Kwnd19FnO5OP6YNav6qYWJmkOx7pFMcbnOAtUQikdls
|
||||||
|
BKfl9JTA5qZoW2Z93kEJW5rSOBm7qC0OtsQGdSIM3QH4Hu/CJPi3hvsMn4gO0ivR
|
||||||
|
1za0AaPM9+X0y+ALaNC+Z2BfedOKmT5kmHJuJPsWLVwtsV4cvua1eTwHyyW9AKrX
|
||||||
|
QCngqYWUi5BJaNmialKB9gBA7SYi+7WQ7FBVSSE67YPjHPVwU6EExIsdLrNHiEGl
|
||||||
|
=f2Ro
|
||||||
|
-----END PGP PUBLIC KEY BLOCK-----
|
Loading…
Reference in New Issue
Block a user