LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   How to choose kernel version from floopy boot (https://www.linuxquestions.org/questions/red-hat-31/how-to-choose-kernel-version-from-floopy-boot-183858/)

siulca 05-20-2004 04:57 PM

How to choose kernel version from floopy boot
 
Hi guys,

I'm new to Linux so please be gentle :newbie:
I got a dual boot machine with Win XP and RedHat 9 with kernels 2.4 and 2.6. My boot loader got corrupted after I reinstalled Win XP. So now I can only access Redhat by using a boot disk of the older 2.4 kernel. However I need to load the most recent kernel (2.6 I think!) as it's the most up-to-date, and it contains all the modules for my hardware.

Is there anyway, of seeing all the available kernel versions and then load it either at boot time or from within redhat itself?

If not how do I go about restoring the bootloader that windows managed to corrupt?

Any help would be extremely appreciated.

Thanks,
Siulca

jinyang 05-21-2004 08:33 AM

As far as I know, "mkbootdisk" is only for a "running" kernel. Since your system is running 2.4, so it's impossible to create a boot disk for 2.6. As for any alternatives, I'm not quite sure.

You may restore your MBR with the command line "grub-install /dev/hda", if your O.S. is on the first IDE master. If it still fails to boot up, you may have to troubleshoot at the Grub Native mode.

>> Is there anyway, of seeing all the available kernel versions and then load it either at boot time or from within redhat itself?
If Grub goes well, GRUB menu will display a list of available kernels for you to choose. If a certain kernel generated but not on the menu, please check and modify /boot/grub/grub.conf.

I have another solution if your GRUB on hardisk unble to function - create a GRUB, the steps are as follows:

1. create an ext3 filesystem on a floppy:
#mke2fs /dev/fd0
#mount ¨Ct ext2 /dev/fd0 /mnt/floppy
2. copy the files "grub.conf", "stage1", and "stage2" under /boot/grub:
# cd /boot/grub; for f in stage1 stage2 grub.conf
do
cp $f /mnt/floppy
done
3. boot with the floppy.

I haven't tested the GRUB floppy. Just thinking of testing it, but cannot, because, I'm writing the message now.

jinyang 05-21-2004 12:19 PM

Hi, Siulca

I've tested "GRUB boot floppy" I mentioned above - it doesn't work. Anyway, I've worked out another way, and it works.

1. format a floppy -
# mkdosfs -R 2 -I /dev/fd0

2. mount the floppy -
# mount /dev/fd0

3. install GRUB onto the floppy -
# grub-install --root-directory=/mnt/floppy /dev/fd0

4. copy "grub.conf" -
# cp /boot/grub/grub.conf /mnt/floppy/boot/grub

5. modify /mnt/floppy/boot/grub/grub.conf if neccessary. a new device map file is created under /mnt/floppy/boot/grub. if any conflicts, modify grub.conf on the floppy accordingly.

6. ensure the data is written to the floppy by unmounting it; and then reboot -
# cd; umount /mnt/floppy
# shutdown -ry 0

siulca 05-21-2004 09:02 PM

Hi Jinyang,

Many thanks for your reply.

Most commands I type in it returns "Command not found"... one of them is grub-install or even grub.

I'm a reall novice and this command line stuff not working is really annoying! I'm tempted to reinstall RedHat, and all the drivers over again :(

Siulca

jinyang 05-21-2004 10:55 PM

Hi, Siulca

Just type its full path: /sbin/grub-install ....
You have to run the commands as "root".

You may find out where a file locates by "locate grub-install".

"grub-install" is part of "grub" package, if not in, pls install it.
[lt ~#] which grub-install
/sbin/grub-install
[lt ~#] rpm -qf /sbin/grub-install
grub-0.93-4

Good Luck!

jinyang

ericmax 05-22-2004 02:56 AM

Log into Red Hat as root, not just into a console.
Open up a console then type in
cd /lib/modules there is a space between cd and /
enter that and type in ls once you enter this it will give you a list of installed kernels
put in a formatted floppy then type in
mkbootdisk --device /dev/fd0 ############
there is a space between mkbootdisk and - also a space between device and /
and a space between fd0 and whatever kernel you choose
enter that and follow the prompts
hope this helps.

siulca 05-25-2004 11:14 AM

Fedora here I come!!!
 
Thanks guys for the help guys, but I gave up before I read your last 2 replies.
I have now a fresh install of Fedora Core 2.

Although the installation was painless I now find myself without some pretty basic stuff not working (and some not even supported!!) such as nVidia graphics card driver, NTFS read support, MP3 & DVD playback!!!

I mean if the Linux community want to convince novice users to swap to Linux, this certainly isn't the way to do it :tisk:

I wan't an OS that's fully functional on install... I don't want to have to fetch extra modules or drivers. From personal experience Linux has got potential, but it's still way to dependent on it's command line, something that scares away novices like me.

Is it really worth all this pain to put a Linux OS half operational?!! Or should I just go back and use Micro$hite Window$... ::confused:

I'm confused... :cry: HELP!!!


All times are GMT -5. The time now is 03:06 PM.