LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-26-2007, 12:22 PM   #16
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258

I think your problem has to do with the length of the "image =" path name (I am still trying to investigate the error message).

Try shortenting "vmlinuz-2.6.18-1.2798.fc6xen" by renaming the kernel file to "vmlinuzfc". The combination of the mount path plus the kernel file name exceeds 31 characters. Why LILO would limit that to 31 characters I have no idea.
 
Old 01-26-2007, 12:36 PM   #17
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
No thats not the problem , I had tried it anyways!
 
Old 01-26-2007, 12:38 PM   #18
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
I don't like to boot several Linux "directly" by calling their kernel as you need to be pretty accurate with the partition references, the kernel names and the initrd file names.

It is a lot easier to boot all of them "indirectly" using the exact technoque of booting a Windows.

In this case I would mount the /boot partition of FC6 in Slackware, change root into it and do a grub-install so that Grub is inside the /boot partition. Say this is hda6 then FC6 will be fired up if Slackware's lilo.conf has these two lines
Code:
other=/dev/hda6
label=FC6
The last link of my signature has detials of how to restore Grub (or Lilo or NTLDR) into its root partition, making it "chainloadable". Task D1 or D2 refers.
 
Old 01-26-2007, 12:41 PM   #19
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
But then wouldn't that result in you havng just too many bootloaders? (145 if I am right! )

Anyways I will try it out .... hang around ... lets see what happens
 
Old 01-26-2007, 12:41 PM   #20
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
OK, the error has nothing to do with the length of the file name

I found this in the Linux Kernel 2.4 Internals document.
Quote:
The size of the bootsector is always 512 bytes. The size of the setup must be greater than 4 sectors but is limited above by about 12K - the rule is:
0x4000 bytes >= 512 + setup_sects * 512 + room for stack while running bootsector/setup
Either LILO did not correctly find the kernel file that you referred to in "image=" or LILO doesn't like the file format. LILO says that the setup information (executable code) in the Linux kernel image is too large (greater than 31 sectors).

You may need a newer version of LILO, different kernel options when building the kernel, or a different boot loader such as GRUB.
 
Old 01-26-2007, 12:45 PM   #21
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
Eric: Thanks a lot! But isn't it weird , I would have thought even the earliest boot loader would allow 2 different distros at the minimum!

Saikee:
Quote:
bash-3.1# chroot /win_installs
sh-3.1# grub-install /dev/hdb8
Probing devices to guess BIOS drives. This may take a long time.
No suitable drive was found in the generated device map.
Invoking the grub menu doesn't help either , if I do root (hd1,8) it gives me drive doesn't exist!

Tell me , if I am using /dev/hdb8 as FC6 root then in grub it refers to as (hd1,8) right?

Last edited by duryodhan; 01-26-2007 at 12:48 PM.
 
Old 01-26-2007, 01:01 PM   #22
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
OK, what I think might be the problem is that when you copied the Fedora kernel you copied the "vmlinux" file instead of the "bzImage" file.

What you should have copied is "arch/i386/bzImage".

I do something like this to copy my kernel after compiling it.

Code:
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz
cp /usr/src/linux/System.map /boot/System.map

Last edited by Erik_FL; 01-26-2007 at 01:06 PM.
 
Old 01-26-2007, 01:06 PM   #23
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
But I didn't do anything like that ... I just installed FC6 fresh and refused to install GRUB.
 
Old 01-26-2007, 01:14 PM   #24
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
Grub counts from 0 and so if you have hda as the first disk and hdb the 2nd then hdb8 should be known to Grub as (hd1,7).

Post the output of "fdisk-l" here if you still have a problem. Also /boot/grub/menu.lst helps too as your Fedora is likely to have a LVM and its address is located by a hard disk Label instead of a device name.

Using one boot loader to boot another boot loader is possibly the most lethal weapon in booting because there is no OS that you can't boot. Think about Solaris and all the BSD! ALso there is only one method for all.

If I know anything about booting it is because the boot loaders in the 137 Linux taught me how each accomplishes its task!

Last edited by saikee; 01-26-2007 at 01:18 PM.
 
Old 01-26-2007, 01:17 PM   #25
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
OK, I still don't know why you get the error from LILO but LILO obviously doesn't understand the format of the Fedora kernel image. It may be a problem with LILO.

I do know why "(hd1,8)" doesn't work for GRUB.

GRUB numbers partitions differently than Linux.

First partition - Linux hda1 - GRUB (hd0,0)
...
Eighth partition - Linux hda8 - GRUB (hd0,7)

For the eighth partition on the second hard disk "hdb8" you should use (hd1,7) in GRUB.

GRUB partition number = (Linux partition number - 1)
GRUB numbers disks based on the BIOS and NOT necessarily how Linux numbers the disks. For example (hd1) is always BIOS ID 0x81 and might be called something else in Linux like "/dev/sda".
 
Old 01-26-2007, 01:28 PM   #26
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
Quote:
bash-3.1# fdisk -l

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1217 9729 68380200 f W95 Ext'd (LBA)
Partition 1 does not end on cylinder boundary.
/dev/hdb2 1 966 7759363+ 83 Linux
/dev/hdb3 967 1216 2008125 82 Linux swap
/dev/hdb5 1217 2432 9767488+ b W95 FAT32
/dev/hdb6 4865 7904 24418768+ 7 HPFS/NTFS
/dev/hdb7 7905 9729 14658808+ b W95 FAT32
/dev/hdb8 * 2433 3476 8385898+ 83 Linux

Partition table entries are not in disk order

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/sda2 1913 19456 140922180 f W95 Ext'd (LBA)
/dev/sda5 1913 3824 15358108+ 7 HPFS/NTFS
/dev/sda6 3825 19456 125564008+ 7 HPFS/NTFS
After I chroot to /dev/hdb8 (after mounting it)
Quote:
grub> root (hd1,7)

Error 21: Selected disk does not exist
I dont have any menu.lst in /boot/grub/. I guess this is because I completely refused Grub Installation.
 
Old 01-26-2007, 01:29 PM   #27
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
My hypothesis about the LILO error is that Fedora is using an uncompressed kernel image file. GRUB does support uncompressed kernel image files (as well as compressed image files). LILO might only support compressed image files and not be able to understand the uncompressed Fedora kernel image.

If that's the case you could possibly use LILO if you created a compressed image file for Fedora. That would either mean recompiling the kernel or running a program that compresses the kernel. I'm not well versed in kernel compilation so I can't say for sure.

It seems that using GRUB is the simplest solution if that works for you.
 
Old 01-26-2007, 01:37 PM   #28
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
You can use a "device.map" file with following format to let grub know the assignments of GRUB devices to Linux devices:

Code:
(fd0)  /dev/fd0 
(hd0)  /dev/hda 
(hd1)  /dev/hdb 
(hd2)  /dev/hdc 
(hd3)  /dev/hdd
IMPORTANT: The GRUB device names "(hd0)", etc. correspond to the BIOS drive ID that will be used during boot. For example, "(hd0)" will always be accessed using drive id 0x80. If the disk called "/dev/hda" can only be accessed using drive ID 0x81 at boot then you have to call that device "(hd1)" in the map file and the GRUB menu file. You should choose the disk drive name in the GRUB menu file based on how the BIOS will see the drive at boot time.

Then tell GRUB to use the map file when starting GRUB.

Code:
grub --device-map=/boot/grub/device.map
grub> root (hd1,7)
If you have trouble identifying the mapping between BIOS drive IDs and Linux devices the best thing to do is make a GRUB boot floppy. Boot the GRUB floppy, and use GRUB in "native" mode to identify the location of the disk that you want to boot. I did that with my RAID controller in order to install GRUB using "native" mode. It avoided the need to create the "device.map" file as well.

Last edited by Erik_FL; 01-26-2007 at 01:48 PM.
 
Old 01-26-2007, 01:46 PM   #29
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Original Poster
Rep: Reputation: 46
yeah... thats what I seem to have realized too but it isn't working!

Your idea doesn't seem to work. Same old error.


Anyways I also thought that I could install lilo to my FC6 root
So I edited lilo.conf to include boot=/dev/hdb8 at the top and only the FC6 name in it.

Then I saved it to /win_installs/etc/lilo.conf (where I have mounted my FC6 root)

then I did
Quote:
lilo -r /win_installs
but it still gives error!
Quote:
bash-3.1# lilo -r /win_installs
Fatal: raid_setup: stat("/dev/hdb8")

Last edited by duryodhan; 01-26-2007 at 01:58 PM.
 
Old 01-26-2007, 01:55 PM   #30
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
You have two disks; a Sata sda and a Pata hooked as the slave of the primary IDE cable.

It is possible that your fiest bootable disk is hdb, as you suggested in Post #1 having Lilo in the MBR of hdb.

Therefore restoring Grub in Fedora partition using a Grub shell should be
Code:
root (hd0,7)
setup (hd0,7)
If you have no /boot/grub/menu.lst Grub will give up a Grub prompt and that is enough to fire FC6 up.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LILO in Linux Distro dolphs Linux - General 5 02-26-2006 02:59 PM
GRUB or LILO won't boot linux!!! for ANY distro stelmate Linux - Hardware 12 05-27-2005 06:42 PM
appending grub - add other linux distro machiner Fedora 2 10-10-2004 02:38 PM
how to add windows to lilo? mrgrieves Linux - Software 9 06-27-2004 02:09 PM
How to add LILO to existing Linux? Freederick Linux - Newbie 9 03-28-2004 05:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration