LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-14-2003, 02:37 AM   #1
freemanx
LQ Newbie
 
Registered: Oct 2003
Posts: 13

Rep: Reputation: 0
Question 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.

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.

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... 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

Thanks!!! TR
 
Old 10-14-2003, 11:49 AM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,200

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
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
 
Old 10-14-2003, 04:37 PM   #3
freemanx
LQ Newbie
 
Registered: Oct 2003
Posts: 13

Original Poster
Rep: Reputation: 0
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
 
Old 10-15-2003, 07:18 AM   #4
buttersoft
Member
 
Registered: Aug 2003
Distribution: Slackware
Posts: 178

Rep: Reputation: 30
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.
 
Old 10-15-2003, 11:43 PM   #5
freemanx
LQ Newbie
 
Registered: Oct 2003
Posts: 13

Original Poster
Rep: Reputation: 0
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!
 
Old 10-16-2003, 12:35 AM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,200

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
well, congratulations on a job well done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing GRUB to a floppy disk obnascar Linux - Newbie 1 08-25-2005 03:36 PM
Installing simple GRUB loader on floppy? e-buzz Red Hat 7 07-05-2005 07:20 PM
installing grub on floppy or cd benjam Fedora 2 10-14-2004 12:19 PM
Installing (copying) grub from floppy to MBR caphclimber Linux - Software 2 09-13-2003 02:41 PM
Problem installing Mandrake 8.1 with a floppy disk FLY FISHER Linux - Software 0 02-02-2002 07:45 PM


All times are GMT -5. The time now is 10:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration