Advertisement
metalx1000

Create Custom Tiny Core

Sep 5th, 2013
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.80 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. clear
  4.  
  5. cd /tmp
  6. wget -c "http://distro.ibiblio.org/tinycorelinux/4.x/x86/release/Core-current.iso" -O /tmp/core.iso&& echo "Mounting ISO" || exit 1
  7. mount -o loop /tmp/core.iso /mnt &&
  8. mkdir /tmp/core
  9. cd /tmp/core
  10. cp -r /mnt/* ./
  11. cd boot
  12. umount /mnt
  13. #rm /tmp/core.iso
  14.  
  15. mkdir fs
  16. cd fs
  17. zcat ../core.gz |cpio -i -H newc -d
  18.  
  19. chroot . sh
  20. vim /tmp/core/boot/isolinux/isolinux.cfg
  21. vim /tmp/core/boot/isolinux/boot.msg  
  22. vim /tmp/core/boot/isolinux/f2  
  23. vim /tmp/core/boot/isolinux/f3  
  24. vim /tmp/core/boot/isolinux/f4     
  25.  
  26.  
  27. find | cpio -o -H newc | gzip -2 > ../core.gz
  28. cd /tmp
  29. rm -fr /tmp/core/boot/fs
  30.  
  31. xorrisofs -l -J -V My-custom-core -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o new.iso core
  32.  
  33. qemu -cdrom new.iso
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement