up

前へ| 次へ

use grub on floppy

floppy disk

boot from floppydisk

floppy から 起動 させる場合

http://www.gnu.org/software/grub/grub-legacy-faq.en.html#q4 を参考

1. Create a filesystem in your floppy disk (e.g. mke2fs /dev/fd0).
2. Mount the floppy on somewhere, say, /mnt.
3. Copy the GRUB images to the directory /mnt/boot/grub. Only stage1, stage2
and menu.lst are necessary. You may not copy *stage1_5.
4. Unmount the floppy.
5. Run the following commands (note that the executable grub may reside in a
different directory in your system, for example, /usr/sbin):

/sbin/grub --batch --device-map=/dev/null <<EOF
device (fd0) /dev/fd0
root (fd0)
setup (fd0)
quit
EOF

を 参考にして menu.lst は 作成済 とする。

素敵な floppy disk を format

# fdformat /dev/fd0u1440
Double-sided, 80 tracks, 18 sec/track. Total capacity 1440 kB.
Formatting ... done
Verifying ... done
# mkfs -t ext2 /dev/fd0
mke2fs 1.34 (25-Jul-2003)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
184 inodes, 1440 blocks
72 blocks (5.00%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
184 inodes per group

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

前準備

# mount /dev/fd0 /mnt/
# rmdir /mnt/lost+found/
# mkdir /mnt/lost+found/
# mkdir -p /mnt/boot/grub
# cp /usr/local/src/grub/grub-0.97/stage1/stage1 /mnt/boot/grub/
# cp /usr/local/src/grub/grub-0.97/stage2/stage2 /mnt/boot/grub/
# mv /home/nyanco/menu.lst /mnt/boot/grub/
# umount /mnt/

/usr/local/sbin/grub

# /usr/local/sbin/grub
    GNU GRUB  version 0.97  (640K lower / 3072K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]
grub> root (fd0)
 Filesystem type is ext2fs, using whole disk
grub> setup (fd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... no
 Running "install /boot/grub/stage1 (fd0) /boot/grub/stage2 p   /boot/grub/menu.lst "\
... succeeded
Done.
grub> quit 

確認

# mount /dev/fd0 /mnt/
# cat /mnt/boot/grub/menu.lst 
# GRUB configuration file
# generated by 'nyantarou'
#  date :Sun Jul 10 17:52:41 JST 2005
# Start GRUB global section
default 0
timeout 10
fallback 1

title  plamo 4.01 Nyan Nyan /dev/hdb1
root (hd1,0) 
kernel /vmlinuz root=/dev/hdb1 ro 

では

# shutdown -r now

できた様です。

補足

2009年 6月25日 (木) 21:04:37 JST 追記
これは 上手くいった 例 にしか過ぎません。/usr/local/sbin/grub で 処理を した ということに 注目しておいて下さい。

Running "install /boot/grub/stage1 (fd0) /boot/grub/stage2 p   /boot/grub/menu.lst "\

の 箇所にて ”menu.lst ”が 認識されています。

にゃんたろう 拝!

2005年 7月10日 (日) 21:52:14 JST 作成


前へ| 次へ

up

Copyright © 2004.-2009. nyantarou All Rights Reserved.