metalx1000

Create a Broken Live CD ISO

Oct 9th, 2013
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.89 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. mkdir -p mylive/iso/isolinux
  4. cd mylive/iso/isolinux
  5.  
  6. #copy both a kernel and a initrd from /boot
  7. #or you could mkinitramfs -o initrd for the init ramdisk
  8. cp /boot/vmlinuz-3.10-3-amd64 ./linux
  9. cp /boot/initrd.img-3.10-3-amd64 ./initrd
  10.  
  11. #copy isolinuxbin
  12. #find /usr -name "isolinux.bin"
  13. cp /usr/share/syslinux/themes/debian-wheezy/isolinux-live/isolinux.bin ./
  14.  
  15. #welcome message
  16. echo "========================" > boot.txt
  17. echo "Welcome to my Linux" >> boot.txt
  18. echo "========================" >> boot.txt
  19.  
  20. #create menu
  21. cat << EOF > isolinux.cfg
  22. display boot.txt
  23. prompt 1
  24. default mylinux
  25.  
  26. label mylinux
  27.     kernel linux
  28.     append initrd=initrd
  29. EOF
  30.  
  31. #Create ISO
  32. cd ../../
  33.  xorrisofs -l -J -no-emul-boot -boot-load-size 4 -boot-info-table -b isolinux/isolinux.bin -c isolinux/boot.cat -o mylinux.iso iso
  34.  
  35. #check with qemu (check arch)
  36. qemu-system-x86_64 -cdrom mylinux.iso
Add Comment
Please, Sign In to add comment