vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I am learning GRUB from this "GRUB fro the ground up", http://www.troubleshooters.com/linux..._Booter_Floppy. I followed the steps here to make a grub floppy, cd /boot/grub cat stage1 stage2 > /dev/fd0h1440 -- note: in the tutorial it is /dev/fd0u1440, but I do not see such device in my RedHat Enterprise 3. Then I use it to boot my test PC, what I see is like this, Searching for Boot Record from CD_ROM... Not found Searching for Boor Record from floppy... OK GRUB loading stage2Geom ERROR Do you see anyting wrong here? BTW I do not actually understand why the instruction is OK. Basically how come such command as "cat stage1 stage2 > /dev/fd0h1440" can write stage1 file to boot record of the floppy? This command to me is just create 2 new files to floppy disk, then they should be in data area of the disk, not in boot sector. Thanks a lot. |
| |||
| On Wed, 27 Jul 2005 11:18:23 -0700, linq936 wrote: > Hi, > I am learning GRUB from this "GRUB fro the ground up", > http://www.troubleshooters.com/linux..._Booter_Floppy. > > I followed the steps here to make a grub floppy, > cd /boot/grub > cat stage1 stage2 > /dev/fd0h1440 -- note: in the tutorial it is > /dev/fd0u1440, but I do not see such device in my RedHat Enterprise 3. > > Then I use it to boot my test PC, what I see is like this, > > Searching for Boot Record from CD_ROM... Not found Searching for Boor > Record from floppy... OK GRUB loading stage2Geom ERROR > > Do you see anyting wrong here? > > BTW I do not actually understand why the instruction is OK. Basically > how come such command as "cat stage1 stage2 > /dev/fd0h1440" can write > stage1 file to boot record of the floppy? This command to me is just > create 2 new files to floppy disk, then they should be in data area of > the disk, not in boot sector. > > Thanks a lot. > You could look at the official documentation, too: http://www.gnu.org/software/grub/man...ode/index.html And the FAQ: http://www.gnu.org/software/grub/gru...cy-faq.en.html Question 4 seems relevent: http://www.gnu.org/software/grub/gru...faq.en.html#q4 I am not specifically familiar with /dev/fd0h1440 and how it differs from the generic /dev/fd0, which is what I have used. Usually, commands like this: cat floppy.img >/dev/fd0 can work because the source is an entire disc image. Other types of files may work if they meet the specific criteria. If you aren't working with an entire image, then you need to think about what your command is doing, and if it is potentially overwriting critical accounting structures which contain directory entries, files, etc. I don't see what is superior about the command you suggested (as obtained from troubleshooters). BTW [probably OT], floppy discs are being used less and less. But you can still work with "floppy images" whether or not you have the actual hardware. You can make a "virtual" 1.44M floppy image like this: 1. Allocate space: dd if=/dev/zero of=floppy.img bs=1024 count=1440 2. Assign to an available loopback device: losetup /dev/loop0 floppy.img 3. Format with a filesystem. mkfs -t ext2 /dev/loop0 4. Mount into file space. mount -o loop /dev/loop0 /mnt/floppy -- Astin, where's Martin? http://us.imdb.com/title/tt009 7257/quotes |
| ||||
| linq936@hotmail.com wrote: > Hi, > I am learning GRUB from this "GRUB fro the ground up", > http://www.troubleshooters.com/linux..._Booter_Floppy. > > I followed the steps here to make a grub floppy, > cd /boot/grub > cat stage1 stage2 > /dev/fd0h1440 -- note: in the tutorial it > is > /dev/fd0u1440, but I do not see such device in my RedHat Enterprise 3. > > Then I use it to boot my test PC, what I see is like this, > > Searching for Boot Record from CD_ROM... Not found > Searching for Boor Record from floppy... OK > GRUB loading stage2Geom ERROR > > Do you see anyting wrong here? Maybe something was not copied that is needed??? like the other stage and device.map files. > BTW I do not actually understand why the instruction is OK. > Basically > how come such command as "cat stage1 stage2 > /dev/fd0h1440" can write > stage1 file to boot record of the floppy? This command to me is just > create 2 new files to floppy disk, then they should be in data area of > the disk, not in boot sector. The boot sector is just the first cylinder(sector zero of cylinder zero) of the floppy diskette, hard drive or CD/DVD disc. If not used for the boot information (MBR) then it can and is used for data, in otherwords it's all data. Try the following instead to make a ext2 GRUB boot floppy as root by; # fdformat /dev/fd0H1440 # mke2fs /dev/fd0 Note; You can use a blank formatted DOS floppy instead by skipping the two steps above. You will lose the added security (accidentally deleting a file for example) of the ext2 filesystem using this floppy . # mount -t ext2 /dev/fd0 /mnt/floppy # grub-install --root-directory=/mnt/floppy /dev/fd0 # cp /boot/grub/grub.conf /mnt/floppy/boot/grub/grub.conf # umount /mnt/floppy When you update the kernel all you need to do is mount the floppy and copy the updated /boot/grub/grub.conf to the floppy. Or you can edit the /mnt/floppy/boot/grub/grub.conf by hand (for a custom multiple system boot floppy for example) if you want. -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- B. Franklin, 1759 |