Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I need to reflash the BIOS on my Dell Precision 410, but my floppy drive was removed. Is there a way to get GRUB to boot a floppy image file (.bin, .img, etc) stored on a hard drive? Under linux, I can mount a floppy image, and I found a driver that creates a virtual drive under Windows, but I'm stumped as to how to boot from one.
Several problems with that.
First, I am trying to boot a floppy image (.img), not a cd, although the principle should be the same.
Second, and most important, the BIOS reflash disk is a DOS-based disk, not linux-based, so there are no kernel or initrd files.
Third, I don't know what the difference between an .iso and .bin is. I thought they were all just a bit-for-bit image of a disk, made with dd if=/dev/fd0 of=floppy.img.
Well, try putting this in your /boot/grub/grub.conf:
Wait one: I'm going to try this with my GRUB test floppy.
Edit: OK, that works fine. Now all you need to do is point GRUB to your image file (per the method in the thread). The key s the rootnoverify and chainloader +1 which tell GRUB to use the boot information from the image and loader.
In fact, I'm going to copy my test floppy (which, by the way, is a MSDOS formatted disk) to a HD, and see if I can get it to work from the image.
Last edited by PTrenholme; 12-25-2005 at 09:50 AM.
$ dd if=/dev/fd0 of=/var/share/z/bootfloppy.img # Copy of a bootable floppy
title Boot from Floppy Image
where /var/share/z is my 5th hd (which happens to be a vfat drive, but that's probably not necessary).
I'm not, actually, sure that the root (hd4) command is needed, but I haven't (yet) tried it without that line.
Now, note that I said "almost work" in the first line. The floppy I copied is my GRUB boot floppy, and, when I ran the GRUB commands, I got
, and then a frozen system. I suspect that I need to be more careful in the dd command, because the file block list for bootflopy.img does not appear to be a contiguous set of blocks, and (again, I suspect) the loader is not finding "stage 1" where it expects it to be found.
Hopefully, the image with which you're working is a more carefully constructed image.
Give it a shot, and let us kow it it hits the target for you.
You can put Grub's stage1 and stage2 in a bootable Fat32 partition, say it is in hda2, and store it in a directory /boot/grub. In the link I provided later (on BSD & Solaris systems) I used Win98 to host Grub. Boot a Live CD up, invoke a Grub shell by typing
and then install Grub in MBR by
The above effectively asks Grub to use hda2 stage1 and stage2 files to set itself up in the MBR so that you can boot to a Grub prompt. In Grub prompt you can boot any system manually.
You can automate your booting by writing a menu.lst stored inside /boot/grub and Grub will follow it.
Yes, that's fine, but his (ninjabob7's) problem is that he needs to "flash" his BIOS, but doesn't have a floppy drive from which to run the "flash" program he's downloaded from his BIOS vendor. We're trying to get GRUB to boot from a copy of a bootable disk stored on a hard drive.
As an aside, my local CompUSA store sells floppy drives in the $10-20 range, and they're even less at the local computer parts recycler.
Hum, here's a thought: Why not install dosbox, and have it boot the image for you? I think that might be possible, but I've never tried it.
Of course, "flashing" the BIOS when the system is running can, potentially, cause severe problem if the running system has stored BIOS access addresses which are changed by the "flash."
(1) I don't have a misconception of thinking a Grub prompt must come from a floppy
(2) I suggested Grub to be sourced from a Live CD in my advice.
I think you still don't get it. He's got GRUB running fine on his system now, and doesn't need to get it from anywhere. What he need is to boot from a (probably) MSDOS floppy containing his new BIOS settings. He does not have a working floppy drive. He therefore wants GRUB to boot his system from the HD image of the (probably) MSDOS disk which, when started, will upgrade his BIOS.
So, do you have any suggestion which might help him upgrade his BIOS?
Oh, a question for injabob7: Who is your mother board vendor? (I ask because my board is an Asus, and Asus has a system that can update a BIOS over the web., so there may be other options available to you for BIOS upgrade.)
Perhaps add the flash program to a floppy image from bootdisk.com and burn it to CD as the boot image?
Now that might just work. Ninjabob7, do you have a working CD burner? It might suffice just to mount the floppy image using the loopback device, put FREEDOS or Win98 on a bootable CD with the floppy contents, boot to a DOS prompt, and start the program from the floppy. (I'm assuming the floppy image contains a DOS program with an AUTOEXEC.BAT file to start it running.)
OK. First thing you should know is that I realized that the BIOS upgrade was actually the one I already had. However, I would still like to figure out how to boot from the floppy. Second, how do I find out the motherboard? I just discovered something called LinuxBIOS, but don't know if it's compatible with my computer. The computer is a Dell Precision 410. The BIOS doesn't seem to be Phoenix, Award, or anything else. It looks like a custom Dell-made BIOS. I just installed a CD burner today, and it works with K3B from Linux (haven't installed Windows drivers yet). I am using Windows 2000 if that matters, but I have it on a FAT partition. The liveCDs I currently have are:
Knoppix (several versions, newest 4.0.2)
Kanotix 2005-03 (based on Knoppix)
I'll try that chainloader bit in GRUB, but I don't think it will work. Chainloader (I think) is supposed to execute a piece of code like you'd find in the MBR. What would need to happen, most likely, is to mount the image as a virtual floppy drive and then boot from it. I don't know how you'd do that, though. GRUB probably isn't the way to go.
Once I had this weird version of GRUB that ran under Windows 2000/XP/NT. It came with a mini-version of Windows 3.1. The commands looked something like this (I think):
title Windows 3.1 from floppy image (just for fun...)
However, I don't think that was actually a working floppy image, because copying it to an actual floppy and booting it didn't work. Maybe memdisk was the MBR of the floppy?? Anyway, I'll post again once I try these two things.
Edit: Okay, the chainloader method looks like it started booting, then the disk gave this message:
I/O Error: Insert another disk
The kernel=mbr initrd=.img method also failed. GRUB gave a message about not fitting the kernel in memory or something. Which is strange, since it should only be 512 bytes. (dd if=/dev/loop0 of=mbr.bin bs=512 count=1) Maybe I read it wrong and the initrd couldn't fit in memory. Should I gzip it?