PDA

View Full Version : LINUX, XP PRO, LILO AND GRUB



beama
29-03-2004, 11:19 PM
laptop Compaq Presario 700, 128 meg, Mobile Amd Duron 1.1

partion info
/dev/hda1 ntfs 9994 gig
/dev/hda2 linux swap 256 meg
/dev/hda4 ext3 6032 gig
linux install here (hda4) I set this up in disk druid as /boot
/dev/hda3 extended
/dev/hda5 vfat recovery partion

problem
I can boot from a linux boot disk, but no matter how I configure Lilo or grub I cant get either boot loaders to work
The install went well once I found a non destructive partioning tool for ntfs ( BootItNg (http://terabyteunlimited.com))

The penguin has great games and utilities ;)

JohnD
29-03-2004, 11:28 PM
I presume that /dev/hda3 must be the root partition?

What error messages do you get when you try to boot with LILO or GRUB?

JohnD
29-03-2004, 11:35 PM
Sorry - misread (/dev/hda3 is an extended partition).

You cannot have installed without a root (/) partition - so I presume the root partition is /dev/hda3 and /boot is not a separate partition - just a folder in /.

JohnD
29-03-2004, 11:37 PM
I really should shut up tonight!! I mean:

You cannot have installed without a root (/) partition - so I presume the root partition is /dev/hda4 and /boot is not a separate partition - just a folder in /.

beama
29-03-2004, 11:43 PM
no error message just boots to xp

beama
29-03-2004, 11:46 PM
John
I think Its A bit late for both of us :) hda4 is root

Chilling_Silence
29-03-2004, 11:46 PM
I know what those days are like John ;-)

Beama>
We'll roll with Grub this time okay, try this:
As root, type:
grub
It'll work its magic, and you'll get:

GNU GRUB version 0.93 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]

grub>

Or something to that effect. Next, you want to:
root (hd0,2)
setup (hd0)
quit

Next, depending on where your grub.conf file is (/boot/grub or /etc) then you'll need to edit it. It should look something like mine, a little tailored (hopefully) to your scenario):
# 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 10
# Nice, fat splash-image to spice things up :)
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Linux
# Partition where the kernel image (or operating system) is located
root (hd0,3)
kernel /boot/kernel-2.4.24 root=/dev/hda4

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

Give that a try and see how you get on.

Cheers


Chill.

Chilling_Silence
29-03-2004, 11:49 PM
> # In this case, Windows is hosted on /dev/hda6.
> title=Windows XP
> rootnoverify (hd0,0)
> chainloader +1[/b]

Should note that I've modified it for /dev/hda1, not hda6...

You'll need to change the kernel version to whatever it is... Check the grub.conf first before hacking away at it, it may be fine...!


Chill.

beama
29-03-2004, 11:53 PM
Chill and John Thanks very much
Chill, Ill give that a go tommorrow, Thanks, I ve already had to much excitement and coffee tonite ;\

beama
30-03-2004, 09:18 PM
error messages chill and john

as root user

root (hda0,2) - file system type unknown, partion type 0xf
setup (hd0) - error 17: cannot mount selected partion
quit (heres one command that did what it was told :) )

so I did

mount hda1 - cant find hda1 in /etc/fstab or /etc/mtab
cd /
cd /etc
locate fstab
vi fstab and yes the mount point is not defined help

btw
lilo command entered in bash (i think)returned "you may need to enable lba32" message

Chilling_Silence
30-03-2004, 10:35 PM
> error messages chill and john
>
> as root user
>
> root (hda0,2) - file system type unknown, partion
> type 0xf
> setup (hd0) - error 17: cannot mount selected
> partion

That's because I said (hd0,3)....

Chilling_Silence
30-03-2004, 10:36 PM
> That's because I said (hd0,3)....

Grrr... Bloody "a" key...
Should be:
root (hda0,3)


Chill.

JohnD
30-03-2004, 10:47 PM
beama - can you clarify something - do you see the GRUB boot loader screen or is the system just booting straight to XP?

beama
30-03-2004, 11:48 PM
Before I go any futher guys THANK YOU

I used from root
grub-install /dev/hda

now grub is working sort of
will boot xp but
linux boot i get
Booting ' RED HAT Linux (2.4.20-8) '
kernel /boot/kernel -2.4.20-8 root=/dev/hda4
Error 15: File not found

I guess thats from my fiddling in grub.conf, guess what should have know better didnt back itup

Hey But Im having fun and cutting costs on hair cut

JohnD
31-03-2004, 12:03 AM
Looks like it cannot find the kernel file - check the version number and the presence of spaces where there shouldn't be.

Chilling_Silence
31-03-2004, 12:36 AM
John is right, its just that the kernel file-name is different
Run:
ls -l /boot
Then check through for your kernel image.

IIRC, it may need an initrd setting too.... :-(

What _did_ your grub.conf file consist of?

Is there anybody here with the same Distro who could post the grub.conf file for future reference?


Chill.

beama
31-03-2004, 12:45 AM
> IIRC, it may need an initrd setting too.... :-(
I was fearful of that deleted that line but there options open to me

(i) rename grub.conf and do a repair, get anaconda to rebuild it, ( I have tried this without renaming the file didnt write anymore information to the file)

(ii)Keep booting off the floppy disk

(iii)or worse case, reinstall

Chilling_Silence
31-03-2004, 01:02 AM
I'd just wait for somebody with your Distro to post their grub.conf file....

Theres gotta be somebody here using it!


Chill.

Murray P
31-03-2004, 10:57 PM
Beama, just a thought. Have you tried using a live CD distro to repair your boot problems. Knoppix or Mepis? I'm new to Linux but there seem to be a few distro's out there that are handy for repairing. Mepis seems a particular talent in this respect and to be fairly laptop friendly too from what I've seen exploring it's twists and turns but, take heed of my limited experience and act accordingly.

Cheers Murray P

Jen C
31-03-2004, 11:55 PM
For you information, Error 15 according to here (http://www.gnu.org/software/grub/manual/html_node/Stage2-errors.html) is:
15 : File not found
This error is returned if the specified file name cannot be found, but everything else (like the disk/partition info) is OK.

I have also dug up a RH9 grub.conf compliments of google :p # grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.20-8.img
You can use this as an example of how your grub.conf should read for the initrd reference line, which appears to be currently missing.

beama
31-03-2004, 11:56 PM
chill john and murray
I cheated and cleaned out all the partions
xp is now on what would be hda3, swap hda1 and root (/boot) is hda2, hey and grub works to.
I think the problem (grub not installing to the boot sector) could have been related to 1024 cylnder restriction in the boot loader and this laptop not supporting lba32
sorry if this seems repeative but thank you for your help and two warnings :)
win modem on this laptop
and getting it to connect to my network

I found somthing you may enjoy also while researching my problem (google got used often)

"linux is user friendly..... its just picky about its friends" :D

Hopefully myself and linux will become good friends

Chilling_Silence
01-04-2004, 12:58 AM
> xp is now on what would be hda3, swap hda1 and root
> (/boot) is hda2, hey and grub works to.
Good to hear :-)

> I think the problem (grub not installing to the boot
> sector) could have been related to 1024 cylnder
> restriction in the boot loader and this laptop not
> supporting lba32
IIRC, this only affected old versions of LILO.

> win modem on this laptop
> and getting it to connect to my network
Ive got a Modem Ive gotta sort out on my laptop too, only Ive not run Windows on it, ever, so it'll be interesting....

> "linux is user friendly..... its just picky about its
> friends" :D
Very cool :D

> Hopefully myself and linux will become good friends
Just dont be too picky :p


Chill.