1
0

SYSLINUX 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. qemu-img create -f qcow2 harvey.qcow2 3G
  2. sudo modprobe nbd max_part=63
  3. sudo qemu-nbd -c /dev/nbd0 harvey.qcow2
  4. sudo fdisk /dev/nbd0
  5. [Create an ext2 partition]
  6. sudo extlinux -i /dev/nbd0p1
  7. sudo mount /dev/nbd0p1 disk/
  8. sudo cp ../sys/src/9/amd64/harvey.32bit disk/harvey
  9. cd disk/
  10. $ ls -l
  11. total 5964
  12. -rwxr-xr-x 1 root root 5884264 jun 8 02:16 harvey
  13. -r--r--r-- 1 root root 116624 jun 7 02:12 ldlinux.c32
  14. -r--r--r-- 1 root root 61440 jun 7 02:12 ldlinux.sys
  15. drwx------ 2 root root 16384 jun 7 02:10 lost+found
  16. drwxr-xr-x 2 root root 4096 jun 8 02:25 syslinux
  17. $ ls -l syslinux/
  18. total 280
  19. -rw-r--r-- 1 root root 182552 jun 7 02:34 libcom32.c32
  20. -rw-r--r-- 1 root root 23480 jun 7 02:34 libutil.c32
  21. -rw-r--r-- 1 root root 10172 jun 8 01:29 mboot.c32
  22. -rw-r--r-- 1 root root 25668 jun 7 02:34 menu.c32
  23. -rw-r--r-- 1 root root 727 jun 8 02:05 syslinux.cfg
  24. -rw-r--r-- 1 root root 26188 jun 7 02:25 vesamenu.c32
  25. [modules are into /usr/lib/syslinux/modules/bios/ so copy it from there]
  26. $ cat syslinux/syslinux.cfg
  27. # syslinux.cfg
  28. #TIMEOUT = Time to wait to autoboot in 1/10 secs. zero (0) disables the timeout
  29. #PROMPT = one (1) displays the prompt only, zero (0) will not display the prompt
  30. #ONTIMEOUT = The default menu label to automatically boot at timeout (selected after timeout)
  31. #DISPLAY = Optional menu text if not using LABEL Entries
  32. TIMEOUT 1000
  33. DEFAULT vesamenu.c32
  34. #MENU BACKGROUND /backgroundimages/your_image_here.png
  35. MENU TITLE Harvey OS
  36. PROMPT 0
  37. ONTIMEOUT 1
  38. #DISPLAY Menu.txt
  39. #Display help text when F1 pressed on Syslinux Menu
  40. F1 help.txt
  41. LABEL 0
  42. MENU LABEL Reboot
  43. TEXT HELP
  44. Restart the computer
  45. ENDTEXT
  46. COM32 reboot.c32
  47. LABEL 1
  48. TEXT HELP
  49. Boot Harvey kernel
  50. ENDTEXT
  51. MENU LABEL Harvey OS
  52. KERNEL mboot.c32
  53. APPEND ../harvey
  54. sudo umount disk/
  55. [Run qemu]
  56. qemu-system-x86_64 --enable-kvm -s -cpu core2duo -smp 2 -m 2048 -monitor stdio -serial /dev/pts/4 --machine pc -net nic,model=rtl8139 -net user,hostfwd=tcp::5555-:23 -drive file=/media/backup1/source/plan9/harvey/util/harvey.qcow2,media=disk,index=0,cache=writeback