comparison cos/grub/makegrubfloppy.sh @ 9:92ace1ca50a8

64 bits kernel without interrupts but with printf in C
author windel
date Sun, 13 Nov 2011 12:47:47 +0100
parents
children
comparison
equal deleted inserted replaced
8:edd70006d3e4 9:92ace1ca50a8
1 #!/bin/bash
2 # Creates an empty floppy with grub loader on it.
3
4 # Filename:
5 FLOPPYFILE=emptybootdisk.img
6
7 # Create file of 1.44M size:
8 dd if=/dev/zero of=$FLOPPYFILE bs=512 count=2880
9
10 # Create filesystem:
11 mkfs.msdos $FLOPPYFILE
12
13 # Create grub directory:
14 mmd -i $FLOPPYFILE grub
15
16 # Copy grub files:
17 mcopy -i $FLOPPYFILE /usr/lib/grub/i386-pc/* ::/grub
18
19 # Run grub commands in batch mode:
20 grub --batch <<THEEND
21 device (fd0) ${FLOPPYFILE}
22 root (fd0)
23 setup (fd0)
24 quit
25 THEEND
26
27 # List files on floppy:
28 mdir -i $FLOPPYFILE
29