Skip to content

Instantly share code, notes, and snippets.

@nategraf
Created October 30, 2016 15:37
Show Gist options
  • Save nategraf/3ce55c2816ae6149ab546f82b9228ee8 to your computer and use it in GitHub Desktop.
Save nategraf/3ce55c2816ae6149ab546f82b9228ee8 to your computer and use it in GitHub Desktop.
# Replace "/mnt/floppy" with the whatever directory is appropriate.
sudo mount -o loop dev_kernel_grub.img /mnt/floppy
if [ -e kernel.bin ]; then
sudo cp kernel.bin /mnt/floppy/
sudo echo -e "\ntitle My Kernel \n\troot \t(fd0)\n\tkernel \t/kernel.bin" > /mnt/floppy/boot/grub/menu.lst
else
sudo echo "" > /mnt/floppy/boot/grub/menu.lst
fi
if [ -e kernel.elf ]; then
sudo cp kernel.elf /mnt/floppy/
sudo echo -e "\ntitle My Kernel (DEBUG)\n\troot \t(fd0)\n\tkernel \t/kernel.elf" >> /mnt/floppy/boot/grub/menu.lst
fi
sudo umount -f -l /mnt/floppy
@nategraf
Copy link
Author

An enhanced version of copykernel.sh for CSCE 410 that automatically detects debug and release versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment