cynix

x86 UNIX-like OS
git clone git://git.2f30.org/cynix
Log | Files | Refs | README | LICENSE

installimg.sh (336B)


      1 #!/bin/bash
      2 
      3 MNT_PATH=mnt
      4 if [ ! "$UID" == "0" ]; then
      5 	echo "[+] you need to be root!" 1>&2
      6 	exit
      7 fi
      8 if [ ! -f "kernel" ]; then
      9 	echo "[+] the kernel has to be compiled first!" 1>&2
     10 	exit
     11 fi
     12 losetup /dev/loop0 image.img
     13 mount -t ext2 /dev/loop0 $MNT_PATH
     14 cp kernel $MNT_PATH
     15 cp initrd $MNT_PATH
     16 umount /dev/loop0
     17 losetup -d /dev/loop0