diff options
-rwxr-xr-x | initrd.sh | 20 | ||||
-rwxr-xr-x | qemu.sh | 6 |
2 files changed, 22 insertions, 4 deletions
@@ -1,4 +1,18 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | set -ex | 2 | |
3 | cp -f /boot/vmlinuz-$(uname -r) isolinux/live/vmlinuz | 3 | initrd=isolinux/live/initrd.img |
4 | /usr/sbin/mkinitramfs -d initramfs-tools -o isolinux/live/initrd.img $(uname -r) | 4 | vmlinuz=isolinux/live/vmlinuz |
5 | |||
6 | conf_dir=initramfs-tools | ||
7 | |||
8 | if [ ! -e "$initrd" -o ! -e "$vmlinuz" ]; then | ||
9 | need_update=1 | ||
10 | elif [ "$(find "$conf_dir" -newer "$initrd" -print -quit)" ]; then | ||
11 | need_update=1 | ||
12 | fi | ||
13 | |||
14 | if [ "$need_update" ]; then | ||
15 | set -ex | ||
16 | cp -f /boot/vmlinuz-$(uname -r) "$vmlinuz" | ||
17 | /usr/sbin/mkinitramfs -d "$conf_dir" -o "$initrd" $(uname -r) | ||
18 | fi | ||
@@ -1,7 +1,11 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | # img=debian-live-8.4.0-amd64-gnome-desktop.iso | 3 | # img=debian-live-8.4.0-amd64-gnome-desktop.iso |
4 | img=debian-live-8.4.0-amd64-standard.iso | 4 | # img=debian-live-8.4.0-amd64-standard.iso |
5 | img=debian-live-8.4.0-amd64-standard.btrfs.iso | ||
6 | |||
7 | ./initrd.sh | ||
8 | |||
5 | sudo qemu-system-x86_64 -enable-kvm -smp 2 -m 640 -k en-us \ | 9 | sudo qemu-system-x86_64 -enable-kvm -smp 2 -m 640 -k en-us \ |
6 | -vga qxl \ | 10 | -vga qxl \ |
7 | -net nic,vlan=0,model=virtio \ | 11 | -net nic,vlan=0,model=virtio \ |