LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem Installing GRUB to Floppy (https://www.linuxquestions.org/questions/linux-newbie-8/problem-installing-grub-to-floppy-103686/)

freemanx 10-14-2003 01:37 AM

Problem Installing GRUB to Floppy
 
Hello, again.

I have a two hard drive system w/ Win98se on Primary IDE and RH8 on Secondary IDE.

When I ran RH8 install I told it to leave hda MBR alone and load GRUB to second HD primary partition and create boot floppy. It works to boot RH from boot floppy (no GRUB though...) and Win from "regular" startup but GRUB doesn't come into play with this setup. I can't seem to get GRUB installed to a floppy to have true "dual-boot" functionality. I read a bunch of the postings and looked up the GRUB manual but even after sorting out the (many) differences from the manual and my setup, when I run the grub-install routine it erred with "...couldn't read stage1 file...", I checked that the file is in the proper location so I'm not sure what the error means. :confused:

So, now what? I wasn't going to try to load GRUB to the MBR until I had it working correctly from floppy and now I'm not sure what to do next. I need to get it to work as I don't know how to invoke the newer kernel ( upgraded a few days ago) on boot, using boot floppy. :scratch:

I'm still pretty green and this is far from a load and run OS. I want to learn but it is frustrating when so many things don't work and then the "manuals" are not up to date... :rolleyes: I am happy that LinuxQuestions.org is here tho' :)

What should I do to get GRUB to work and/or how do I get my new kernel to boot when using a boot floppy?

Sorry but I'm :newbie:

Thanks!!! TR

frieza 10-14-2003 10:49 AM

i don't think you can install grub on a floppy, besides, i don't think grub and the first stage boot loader fit onto a floppy anyways

freemanx 10-14-2003 03:37 PM

Frieza,

Thanks for the reply.

The following is from the GRUB Manual and part of the procedure(s) I was trying to accomplish.

"Creating a GRUB boot floppy"
"To create a GRUB boot floppy, you need to take the files stage1 and stage2 from the image directory, and write them to the first and the second block of the floppy disk, respectively."...

"Now you can boot GRUB without a GRUB floppy."...

If I'm banging my head against a wall here, please suggest a better method. I still need to know how to load the newer kernel regardless of what method I use.

Thanks. TR

buttersoft 10-15-2003 06:18 AM

I had a problem 2 days ago, where I could no longer boot W98 or SuSE 8.2, because somehow the Grub MBR had been trashed on my desktop machine.

I resolved it by fdisk /mbr from the W98 boot disk and then playing with GRUB.

However, then I resolved to make rescue disks, and I did this on a laptop with a fresh SuSE 8.2 and grub, with no windows. I now have rescue disks and also I resolved to make a GRUB boot loader disk. On this site I got the beginnings, which needed to be modified for my distribution SuSE 8.2:-

http://www.yolinux.com/TUTORIALS/Lin...Disk.html#GRUB

You can boot from floppy with Grub. I did it this morning on a laptop and here is the sequence from my shell command SuSE 8.2:-

mke2fs /dev/fd0

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

mount -t ext2 /dev/fd0 /mnt/floppy

Type these next 4 commands all on one line
/home/spb # cp /boot/grub/stage1 /media/floppy/boot/grub/stage1

/home/spb # cp /boot/grub/stage2 /media/floppy/boot/grub/stage2

/home/spb # cp /boot/grub/stage1_5 /media/floppy/boot/grub/stage1_5

grub-install --root-directory=/media/floppy '(fd0)'

Message received back:
Installation finished. No error reported.
This is the contents of the device map /media/floppy/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0) /dev/fd0
(hd0) /dev/hda

Finally type this in
cp /etc/grub.conf /media/floppy/boot/grub/grub.conf

Unmount the floppy:
umount /media/floppy

Then reboot and test. This worked fine on my laptop.

freemanx 10-15-2003 10:43 PM

Thank you for your replies and help.

I got it to work, but it was painful.

I won't even attempt to waste the space here with all of the problems I encountered. Suffice it to say the main trouble is that too many Linux versions means that you have to guess at which "help" flies, man pages, suggestions, etc. may apply to your situation. "Documentation" is sorely out of date or just wrong. I found almost nothing about 'GRUB on Floppy' in the RH8 doc's and the GNU GRUB Manual was rough at best.

O.K. Enough bitching... The following is a copy of what worked for me. (Yes, I tested it out...)


[root@Inteva sbin]# /sbin/mke2fs /dev/fd0
mke2fs 1.27 (8-Mar-2002)
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 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

[root@Inteva sbin]# cd /
[root@Inteva /]# mount -t ext2 /dev/fd0 /mnt/floppy
[root@Inteva /]# /sbin/grub-install '(fd0)'
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/hdb
[root@Inteva /]#
[root@Inteva /]# cd /mnt/floppy
[root@Inteva floppy]# cd /boot/grub
[root@Inteva grub]# dir
device.map ffs_stage1_5 jfs_stage1_5 reiserfs_stage1_5 stage2
e2fs_stage1_5 grub.conf menu.lst splash.xpm.gz vstafs_stage1_5
fat_stage1_5 grub.conf~ minix_stage1_5 stage1 xfs_stage1_5
[root@Inteva grub]#

Again, Thanks for the help 'cause I'm a NOOBIE!

frieza 10-15-2003 11:35 PM

well, congratulations on a job well done


All times are GMT -5. The time now is 04:34 AM.