[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grub2 floppy image with menu?
From: |
Marco Gerards |
Subject: |
Re: grub2 floppy image with menu? |
Date: |
Fri, 24 Sep 2004 10:53:50 +0000 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
"lode leroy" <address@hidden> writes:
> Could someone post a recipe for creating a floppy disk image with a
> config file,
> as to test the menu?
>
> ./configure
> make
> ./grub-mkimage -v -d . -o core.img `ls *.mod | sed -e 's/\\.mod//'`
> cat boot.img core.img > floppy.dsk
This is the script I posted a while ago:
#!/bin/sh
IMAGE=grub2-floppy-i386.ext2fs
MNT=/mnt/floppy
rm $IMAGE
dd if=/dev/zero of=$IMAGE bs=512 count=2880|| exit
/sbin/mkfs.ext2 -F $IMAGE
./grub-mkimage -v -d . -o core.img ext2
sudo mount $IMAGE $MNT -o loop
mkdir $MNT/grub
cp *.img *.mod $MNT/grub
echo '(fd0)' $PWD/$IMAGE > tmp_device.map
./grub-setup -d $MNT/grub -m tmp_device.map -r '(fd0)' '(fd0)'
rm tmp_device.map
cat >$MNT/grub/grub.cfg <<EOF
#GNU/Linux
insmod linux
insmod boot
insmod multiboot
title GNU/Linux
linux (hd0,4)/boot/vmlinuz-2.2.20 root=/dev/hda5
dsf
title GNU/Hurd
# GNU/Hurd
multiboot (hd0,2)/boot/gnumach root=device:hd0s3
module (hd0,2)/hurd/ext2fs.static
--multiboot-command-line=\${kernel-command-line} --host-priv-port=\${host-port}
--device-master-port=\${device-port} --exec-server-task=\${exec-task} -T typed
\${root} \$(task-create) \$(task-resume)
module (hd0,2)/lib/ld.so.1 /hurd/exec \$(exec-task=task-create)
gdsf
EOF
cat $MNT/grub/grub.cfg
sudo umount $MNT
--
Marco