LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   booting Slackware with existing Grub (https://www.linuxquestions.org/questions/slackware-14/booting-slackware-with-existing-grub-470285/)

thelonius 08-02-2006 11:09 PM

booting Slackware with existing Grub
 
Hello,

I've just installed SW 10.2 on third partition of ide hard disk (mounted on /dev/hdc). During installation, it proposed to install lilo on mbr, but since i have already debian on the first partition, i didn't install lilo. i try now to load SW from Grub command line:

Code:

root (hd0,3)
kernel /boot/vmlinuz-2.6.15-1-486 root=/dev/hdc4 ro
initrd /boot/initrd.img-2.6.15-1-486
boot

values for kernel and initrd are obtained when i type 'kernel' or 'initrd' commands and press tab-key. And the commands sequence is the mimic of debian's.

Well, it loads a lot of staff, but then it freezes after messages:

Code:

INIT: Id "1" respawning too fast
...
INIT: Id "6" ...
INIT: no more processes left in this runlevel

So, where is my mistake ?

Thank you.

cwwilson721 08-03-2006 12:46 AM

Quote:

Originally Posted by thelonius
I've just installed SW 10.2 on third partition of ide hard disk (mounted on /dev/hdc). ...

Code:

root (hd0,3)
kernel /boot/vmlinuz-1.6.15-1-486 root=/dev/hdc4 ro
initrd /boot/initrd-1.6.15-1-486
boot


Maybe that could be the issue?

Nylex 08-03-2006 12:51 AM

Do you have 3 disks in your machine? According to your stanza, your boot partition is on /dev/hda4:

root (0,3).

cwwilson721 has already mentioned your root partition, so I won't mention it again :). Also, are you sure those are the correct values for the kernel image and initrd? Did you use a different kernel to the default in Slack? Which filesystem are you using on your root partition?

Alien Bob 08-03-2006 01:31 AM

Also,
Code:

kernel /boot/vmlinuz-1.6.15-1-486 root=/dev/hdc4 ro
initrd /boot/initrd-1.6.15-1-486

Never saw a kernel or an initrd with that version number in any Slackware. Are you sure you picked the right files? What if you mount your Slackware partition in Debian and have a look at the files that are present in Slackware's /boot directory?

What you can also do is install Slackware's LILO into the root sector of the Slackware partition (i.e. not in the MBR) and then add this to the Grub menu:
Code:

title Slackware
        rootnoverify (hd0,3)
        chainloader +1

You will have to find out whether (hd0,3) is the correct indicator for your Slackware partition (see the other posts).
You will have to use a bootable CD or boot into your Debian to be able to install LILO.

Eric

rkrishna 08-03-2006 01:35 AM

i am not familiar with grub but i think u have to
Quote:

During installation, it proposed to install lilo on mbr, but since i have already debian on the first partition, i didn't install lilo.
so u didnt install lilo and added
Quote:

root (hd0,3)
kernel /boot/vmlinuz-1.6.15-1-486 root=/dev/hdc4 ro
initrd /boot/initrd-1.6.15-1-486
boot
here u mentioned "/boot/vmlinuz-1.6.15-1-486" but "deb grub" will confuse with /boot 's it will search for /boot in debian(u cant do like this in lilo, lilo will search in the boot partition of corresponding os only)

1. do wee need the initrd line?
2. are u sure u installed the kernel?
from where u get this kernel "vmlinuz-1.6.15-1-486" a custom one?;)
3.
Quote:

on third partition of ide hard disk
grub way of doing things are different, so ur 3rd partition means u have to write like "root (hd0,2)"
4.as Nylex mentioned are u sure ur disk is /dev/hdc?
5.go through the deb menu.lst or grub.conf and see the entry for root like "root (hd0,0)" get the "hd0" one, make sure that

U CAN TRY ANY OF THESE(i am a slacker and uses lilo only)2 mor options.
add these options and check which one works
6.i will suggest u to install lilo to the root partition (/)of slack(from slack), when it asks(liloconfig) and add an entry in grub like
Code:

title  Slack
        root (hd0,2)
        chainloader +1

7.
Code:

title Slack
kernel (hd0,2) /boot/vmlinuz-1.6.15-1-486 root=/dev/hdc3

not sure confused with /boot entry but try
best of luck

rkrishna 08-03-2006 01:40 AM

while i was typing "Alien Bob " wrote one but i think that entry is wrong for 3rd partition
Quote:

rootnoverify (hd0,3)
it would have been (hd0,2)

but it is good if u write "rootnoverify " this one best suit for windows like things where linux cant have a marked access for linuxxs it can get the kernel from other partition, i think

anyway i am glad that we both thought in same way

rkrishna 08-03-2006 01:50 AM

Quote:

You will have to use a bootable CD or boot into your Debian to be able to install LILO.
little confused
if u want to install lilo to root partition of slack, as "Alien Bob" said 2 ways
1.if u want to get into slack ?
use slack 1st cd, simple and best choice at teh boot prompt type
boot: bare.i root=/dev/hdc3 noinitrd ro (assumed u used bare.i for install)
2.boot into your Debian ? u need to chroot into slack partition then only we can installl lilo(it is not grub;)) so u can't simply edit lilo.conf but u need to run "lilo" so from other os u cant do this

why all this first try the second choise of me (so no need for install lilo if it works :))
best of luck and thank u Alien Bob

thelonius 08-03-2006 08:42 AM

thank you everybody for replies

1. i forgot swap which is mounted on second partition (it was done by debian). and i have hurd on third partition. so SW is on the fourth partition - /dev/hdc4. why hdc, and not hda ? because cdrom is on hda (it'd be bios' decision, i think).

2. it was my mistake in the first post. the correct files are:

Code:

/boot/vmlinuz-2.6.15-1-486
/boot/initrd.img-2.6.15-1-486

i did nothing 'custom', i've just picked up what was proposed by install cd. i think it was smth in '.../bare.i/...'

3. i did install lilo, not on mbr, but on the boot sector of SW's partition, so when from grub i make

Code:

rootnoverify (hd0,3)
chainloader +1
boot

i do enter in lilo which proposes me one option - 'Linux'. impossible to see-modify whatever in lilo... when i boot 'linux', it gives after a shortwhile

Code:

VFS: cannot open root device "1604" or unknown-block(22,4)
Please append a correct "root=" boot option

but as i say, i cannot modify boot options in lilo

4. in debian, when i mount SW

Code:

mount -t ext2 /dev/hdc4 /mnt/data
i can see the files vmlinuz* and initrd* in /mnt/data/boot. they are different from what i see in /boot.

but what bothers me is that i also see /mnt/data/grub/menu.lst with debian's content, which is impossible thing. and this is what i don't understand - how is it possible that on a mounted partition one can see content of another partition ?


Thank you

vharishankar 08-03-2006 10:46 AM

Why all this hassle? I easily managed to boot Slackware directly from Grub without even installing LILO.

I would never recommend chainloading unless you have an incompatible OS which uses its own loader.

I think it would be best to remove the boot partition of Slackware and reinstall Slackware without LILO and use grub directly to do the loading. It works because I did it that way. The other way is to simply use LILO in the MBR if you're more comfortable with it and configure it to load Debian after booting into Slackware.

Always keep the list of partitions handy in your notebook so that you can easily refer which partition refers to which os.

vharishankar 08-03-2006 10:52 AM

Oh, another thing. When you edit Debian's /boot/grub/menu.lst, be sure to put all your own entries after this line

Code:

### END DEBIAN AUTOMAGIC KERNELS LIST
Or before this line
Code:

### BEGIN AUTOMAGIC KERNELS LIST
Because if you put your entries within these lines it will erase them when you next upgrade your Debian kernel.

simcox1 08-03-2006 11:02 AM

also /dev/hdc4 would be

root (hd2,3)

I think.

thelonius 08-03-2006 11:02 AM

Quote:

Originally Posted by Harishankar
Why all this hassle? I easily managed to boot Slackware directly from Grub without even installing LILO.

i will try to reinstall SW w/o lilo. strangely enough, it might be the reason. because this is what i do - i boot SW from grub and there is smth in SW that doesn't like it.

thank you.

thelonius 08-03-2006 11:04 AM

Quote:

Originally Posted by simcox1
also /dev/hdc4 would be

root (hd2,3)

I think.

this is another mystery - grub sees hdc as (hd0)... because debian boots normally from (hd0,0). and not only debian. hurd and freebsd too (it is inplace of freebsd that i want SW).

vharishankar 08-03-2006 11:09 AM

Quote:

i will try to reinstall SW w/o lilo. strangely enough, it might be the reason. because this is what i do - i boot SW from grub and there is smth in SW that doesn't like it.
If you haven't managed to boot to Slackware even once, it might be just a corrupt install. This happens rarely, but it does happen.

Also I'm curious about initrd. Slackware doesn't use initrd AFAIK. How did you get that with a stock kernel? And secondly if you compiled your own kernel, that could be the problem as well. A badly configured kernel will not boot.

Just trying to think of possibilities ;)

And seeing your first post, it appears that you actually tried to boot into the Slackware partition using your Debian kernel. That would account for the cryptic message and freeze. (I know because I did this once - mismatching the kernel= and the root=)

thelonius 08-03-2006 11:14 AM

Quote:

Originally Posted by Harishankar
If you haven't managed to boot to Slackware even once, it might be just a corrupt install. This happens rarely, but it does happen.

even w/o any error message ?

Quote:

Also I'm curious about initrd. Slackware doesn't use initrd AFAIK. How did you get that with a stock kernel?
i know there is no such thing as magic, but honestly, i did nothing custom. i installed SW from cd, basically choosen all default options, and thst's all.

Quote:

And secondly if you compiled your own kernel, that could be the problem as well. A badly configured kernel will not boot.

Just trying to think of possibilities ;)
oh no, i didn't have time neither reason to compile my kernel. first i'd like to see SW in work, and then, if everything's fine, i could do smth complicated.


All times are GMT -5. The time now is 11:06 AM.