Created
October 30, 2016 15:37
-
-
Save nategraf/3ce55c2816ae6149ab546f82b9228ee8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An enhanced version of copykernel.sh for CSCE 410 that automatically detects debug and release versions