Forum Home
Press F1
 
Thread ID: 45510 2004-05-24 07:28:00 linux bootloader Nigel Thomson (629) Press F1
Post ID Timestamp Content User
238946 2004-05-24 07:28:00 Greetings all,
I had a minor melt down today which required me to reinstall my entire win2K installation, anyhow to cut a long story short I lost my bootloader and access to my linux partitions

So is there a bootloader i can install, or even run one off of a floppy
I know there is one that can do this as I remember Graham or Chill mentioning it but my search of the site has not found it, I know it wasn't grub or lilo or xosl but as I lost my favourites in the meltdown I cant find it, I do know it had a funny name .

Sorry any help would be much appreciated, and yes i had a boot disk for one linux install but it's packed (moved house recently) and well there are just two many boxes to dig thru to find one little floppy

thats all
thanks Nigel
Nigel Thomson (629)
238947 2004-05-24 08:03:00 Hi Nigel,

You could use Xosl or Grub, personally I'd vote for Grub .

The easiest way of doing this is booting from Knoppix, and chroot'ing into your Linux Installation .

Here's something that was taken / changed / modified for your use from Gentoo . org's Installation guide:
Understanding GRUB's terminology

The most critical part of understanding GRUB is getting comfortable with how GRUB refers to hard drives and partitions . Your Linux partition /dev/hda1 is called (hd0,0) under GRUB . Notice the parenthesis around the hd0,0 - they are required .

Hard drives count from zero rather than "a" and partitions start at zero rather than one . Be aware too that with the hd devices, only hard drives are counted, not atapi-ide devices such as cdrom players and burners . Also, the same construct is used with scsi drives . (Normally they get higher numbers than ide drives except when the bios is configured to boot from scsi devices . )

Assuming you have a hard drive on /dev/hda, a cdrom player on /dev/hdb, a burner on /dev/hdc, a second hard drive on /dev/hdd and no SCSI hard drive, /dev/hdd7 gets translated to (hd1,6) . It might sound tricky and tricky it is indeed, but as we will see, GRUB offers a tab completion mechanism that comes handy for those of you having a lot of hard drives and partitions and who are a little lost in the GRUB numbering scheme .

To start configuring GRUB, you type in grub . You'll be presented with the grub> grub command-line prompt . Now, you need to type in the right commands to install the GRUB boot record onto your hard drive .

Code Listing 2: Starting the GRUB shell

# grub

Note: If your system does not have any floppy drives, add the --no-floppy option to the above command to prevent grub from probing the (non-existing) floppy drives .

In the example configuration we want to install GRUB so that it reads its information from the boot-partition /dev/hda1, and installs the GRUB boot record on the hard drive's MBR (master boot record) so that the first thing we see when we turn on the computer is the GRUB prompt . Of course, if you haven't followed the example configuration during the installation, change the commands accordingly .

The tab completion mechanism of GRUB can be used from within GRUB . For instance, if you type in "root (" followed by a TAB, you will be presented with a list of devices (such as hd0) . If you type in "root (hd0," followed by a TAB, you will receive a list of available partitions to choose from (such as hd0,0) .

By using the tab completion, setting up GRUB should be not that hard . Now go on, configure GRUB, shall we? :-)

Code Listing 3: Installing GRUB in the MBR

grub> root (hd0,0) (Specify where your /boot partition resides)
grub> setup (hd0) (Install GRUB in the MBR)
grub> quit (Exit the GRUB shell)

Note: If you want to install GRUB in a certain partition instead of the MBR, you have to alter the setup command so it points to the right partition . For instance, if you want GRUB installed in /dev/hda3, then the command becomes setup (hd0,2) . Few users however want to do this .

Although GRUB is now installed, we still need to write up a configuration file for it, so that GRUB automatically boots your newly created kernel . Create /boot/grub/grub . conf with your favorite editor (vi, pico, nano) .

# Which listing to boot as default . 0 is the first, 1 the second etc .
default 0
# How many seconds to wait before the default listing is booted .
timeout 30
# Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed
splashimage=(hd0,3)/grub/splash . xpm . gz

title=Gentoo Linux 2 . 4 . 25
# Partition where the kernel image (or operating system) is located
root (hd0,0)
kernel /kernel-2 . 4 . 25-gentoo root=/dev/hda5

# The next three lines are only if you dualboot with a Windows system .
# In this case, Windows is hosted on /dev/hda6 .
title=Windows 2000
rootnoverify (hd0,0)
chainloader +1



It may seem like a bit to get your head around but its not really . Print it out and keep it by your side . Then when you boot Knoppix, open a root shell and type:
chroot /mnt/hdXX
where hdXX is your mounted root partition . Dont forget from there to mount your /boot partition within the chroot environment :-)

Hope this helps


Chill .
Chilling_Silence (9)
238948 2004-05-24 09:49:00 Correct me if I am wrong but I don't think that you can replace GRUB or LILO with XOSL. You have to chain them together. So if you had GRUB in the MBR you will have to either put it back there or use XOSL (or similar) in the mbr and place GRUB in the root partition. JohnD (509)
238949 2004-05-24 22:13:00 > Correct me if I am wrong but I don't think that you
> can replace GRUB or LILO with XOSL. You have to chain
> them together.

Ahhh.....

Good thing I gave instructions for Grub, with which you need not Xosl or Lilo :D
Chilling_Silence (9)
1