Merge branch 'cleanup_image' of git://qubes-os.org/rafal/template-builder

This commit is contained in:
Joanna Rutkowska 2010-09-30 17:32:55 +02:00
commit b2ece34145
5 changed files with 33 additions and 2 deletions

4
README
View File

@ -27,6 +27,10 @@ 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>
3a) You should remove yum cached files, and override unused block with
zeroes, via
# ./cleanup_image qubeized_images/name-root.img
4) Make sure the symlinks in vm_kernels_XXX/ point to correct kernel and initramfs 4) Make sure the symlinks in vm_kernels_XXX/ point to correct kernel and initramfs
files you want to use for the template: files you want to use for the template:

View File

@ -7,3 +7,4 @@ kdebse
xterm xterm
bridge-utils bridge-utils
stalonetray stalonetray
NetworkManager-gnome

26
cleanup_image Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
IMG=$1
if ! [ $# -eq 1 ]; then
echo "usage $0 <img_file_name>"
exit 1
fi
if ! [ -f $IMG ]; then
echo $IMG does not exist
exit 1
fi
ls -als $IMG
mount -o loop,offset=$((63*512)) $IMG mnt || exit 1
INSTALLDIR=`pwd`/mnt/
yum clean packages --installroot=$INSTALLDIR
dd if=/dev/zero of=mnt/fillme bs=1M
sync
rm mnt/fillme
umount mnt
cp --sparse=always $IMG $IMG.new
mv $IMG.new $IMG
ls -als $IMG

View File

@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Exec=(qvm-run -q --tray -a --user=root netvm "stalonetray --background white --geometry 100x40" && qvm-run -q netvm --user=root "/usr/bin/nm-applet &") Exec=(qvm-run -q --tray -a --user=root %VMNAME% "stalonetray --background white" && qvm-run -q %VMNAME% --user=root "/usr/bin/nm-applet &")
Icon=%VMDIR%/icon.png Icon=%VMDIR%/icon.png
Name=%VMNAME%: Show Tray Name=%VMNAME%: Show Tray
Categories=System Categories=System

View File

@ -4,7 +4,7 @@
kernel="/var/lib/qubes/servicevms/%NETVMNAME%/kernels/vmlinuz" kernel="/var/lib/qubes/servicevms/%NETVMNAME%/kernels/vmlinuz"
ramdisk="/var/lib/qubes/servicevms/%NETVMNAME%/kernels/initramfs" ramdisk="/var/lib/qubes/servicevms/%NETVMNAME%/kernels/initramfs"
extra="ro nomodeset xencons=hvc rd_NO_PLYMOUTH 3 pci=nomsi" extra="ro nomodeset xencons=hvc swiotlb=force rd_NO_PLYMOUTH 3 pci=nomsi"
root="/dev/mapper/dmroot" root="/dev/mapper/dmroot"
memory = 200 memory = 200