Advertisement
metalx1000

Remaster Tiny Core Linux Script

Apr 5th, 2015
811
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.87 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.  
  20. cp /etc/resolv.conf etc/resolv.conf
  21. mount --bind /dev dev
  22. mount -t proc proc proc
  23. mount -t sysfs sysfs sys
  24.  
  25. chroot . sh
  26. vim /tmp/core/boot/isolinux/isolinux.cfg
  27. vim /tmp/core/boot/isolinux/boot.msg
  28. vim /tmp/core/boot/isolinux/f2
  29. vim /tmp/core/boot/isolinux/f3
  30. vim /tmp/core/boot/isolinux/f4
  31.  
  32.  
  33.  
  34. find | cpio -o -H newc | gzip -2 > ../core.gz
  35. cd /tmp
  36. xorrisofs -l -J -V TC-custom -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o new.iso core
  37.  
  38. qemu -cdrom new.iso
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement