Advertisement
metalx1000

OpenBSD Virtual Setup with QEMU

Jul 18th, 2014
437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.88 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. iso="openbsd.iso"
  4. img="openbsd.img"
  5.  
  6. url="http://openbsd.mirrorcatalogs.com/pub/OpenBSD/5.5/i386/cd55.iso"
  7. #get ISO http://www.openbsd.org/
  8. wget -c "$url" -O $iso
  9.  
  10. #create Empty IMG
  11. if [ -a $img ]
  12. then
  13.     echo "$img image already exists"
  14. else
  15.     dd bs=512 count=5400000 if=/dev/zero of=$img
  16. fi
  17.  
  18. #do install in qemu
  19. qemu-system-i386 -boot d -cdrom $iso -hda $img
  20.  
  21. ###############NOTES##########
  22. echo "
  23. NOTES on Package manager for openBSD
  24. http://www.cyberciti.biz/tips/openbsd-add-package-howto.html
  25. http://bsdly.blogspot.com/2013/04/youve-installed-it-now-what-packages.html
  26. # export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -m`/
  27. # pkg_add -v -i links
  28. # pkg_info
  29.  
  30. ########Update existing package######
  31. # pkg_add -u links
  32.  
  33. ##########update all package######
  34. # pkg_add
  35. "
  36.  
  37. #run system in qemu
  38. qemu-system-i386 -hda $img
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement