Operating System - Linux
1827328 Members
5779 Online
109962 Solutions
New Discussion

Re: what differnet between the kernel booted from floppy and hardisk

 
SOLVED
Go to solution

what differnet between the kernel booted from floppy and hardisk

Dear friends,

the same bzImage can be boot from hda, and the modules of ext3 will install in the bootscript somewhere by insmod;then, I dd the bzImage file to one floppy as :
dd bs=1k if=bzImage of=/dev/fd0, the restart the machine,
it recognize the bzImage directly, but can not find the root fs(for it is the ext3 file system), I wonder what different between such two process?

Best Regards,
Frederick
frederick van targero
6 REPLIES 6
Stuart Browne
Honored Contributor
Solution

Re: what differnet between the kernel booted from floppy and hardisk

There are unfortunately a nubmer of differences, especially where modules are involved.

I'm going to assume that you are using a RedHat system here (as you've not specified).

A tool exists called 'mkbootdisk' which will create a working boot disk from your current image.

The issue you ahve currently is that you will have an 'initrd' configured on your system, but when you 'dd' the kernel (and only the kernel) to the floppy, you are missing out on (in particular) the ext3.o module.

If this is a kernel you've compiled on your own, then I suggest you read through the documentation in the source on how to create a floppy boot image.
One long-haired git at your service...
Goran Koruga
Honored Contributor

Re: what differnet between the kernel booted from floppy and hardisk

Hi Frederick.

The problem may be that you're using initrd image which is not available when booting from a floppy or that your boot loader pases root= parameter to kernel which isn't the case when booting from a floppy.

You can set default root device using rdev script, see man page for details. In short, something like :

rdev /dev/fd0 /dev/hda1

Also check for any initrd parameters in your boot loader's config file.

G.
Goran Koruga
Honored Contributor

Re: what differnet between the kernel booted from floppy and hardisk

Hmm, rdev is of course a binary, not a script - it's obviously too early for me.

G.
Balaji N
Honored Contributor

Re: what differnet between the kernel booted from floppy and hardisk

hi frederick,
as others have already pointed out, just dd'ing a bzimage file will not work for creating a boot floppy.

bzimage is just the kernel. you need boot loader, inittab and other configuration etc.

so the best way is to use mkbootdisk with the kernel version as the argument to creat e a boot disk.

hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
U.SivaKumar_2
Honored Contributor

Re: what differnet between the kernel booted from floppy and hardisk

Hi,

dd method will not work for ext3 root filesystem as ext3.o module has to be loaded for the kernel to get EXT3 supporting capability.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Balaji N
Honored Contributor

Re: what differnet between the kernel booted from floppy and hardisk

hi frederick,

while browsing through lost (http://lost.sourceforge.net) found this info. might be of some use to you.


:
####[ Linux One Stanza Tip (LOST) ]###########################

Sub : How to make a Loadlin bootdisk LOST #119

This is the simplest way making your own boot disk. Totally a
DOS prompt job. In DOS [1] "format a: /s/v" [2] Copy two files
your kernel (usually vmlinuz) and "loadlin.exe" to it, [3] and
make a one-line config.sys to point to your / device and boot:
e.g. "shell=a:\loadlin.exe a:\vmlinuz root=/dev/hda2 ro"

########################################
:

hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.