LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Add slackware to grub.conf (http://www.linuxquestions.org/questions/slackware-14/add-slackware-to-grub-conf-873928/)

Breeze 04-09-2011 03:33 AM

Add slackware to grub.conf
 
I boot my slackware through usb and I don't install lilo.
I want to add slackware to fedora grub.conf.I have tried some methods,but failed.
How can I do?

fedora grub.conf
Quote:

title Fedora (2.6.35.10-72.fc14.x86_64)
root (hd0,5)
kernel /vmlinuz-2.6.35.10-72.fc14.x86_64 ro root=UUID=5cc13bf9-725f-4e79-8c37-5ce4e15ab26b rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYTABLE=us rhgb quiet nouveau.modeset=0 rdblacklist=nouveau
initrd /initramfs-2.6.35.10-72.fc14.x86_64.img
title Slackware
root (hd0,7)
kernel /boot/vmlinuz-generic-2.6.33.4 root=/dev/sda8 ro vga=773
initrd /boot/initrd.gz
slackware /boot
Quote:

boot.0808 diag2.img System.map-generic-2.6.33.4
boot.080A initrd.gz System.map-huge-2.6.33.4
boot_message.txt initrd-tree/ vmlinuz@
config@ map vmlinuz-generic-2.6.33.4
config-generic-2.6.33.4 README.initrd@ vmlinuz-huge-2.6.33.4
config-huge-2.6.33.4 slack.bmp
diag1.img System.map@

Snark1994 04-09-2011 04:31 AM

Have you tried running
Code:

update-grub
on the OS which grub is installed in? (from your post, I'm guessing Fedora)

This should hopefully detect OSes automagically and add them to the menu

Breeze 04-09-2011 04:42 AM

Quote:

Originally Posted by Snark1994 (Post 4318928)
Have you tried running
Code:

update-grub
on the OS which grub is installed in? (from your post, I'm guessing Fedora)

This should hopefully detect OSes automagically and add them to the menu

No,no need to update-grub.After the grub have installed,we can boot the OS added to the grub.conf.

colorpurple21859 04-09-2011 07:26 AM

Quote:

slackware /boot
Quote:
boot.0808 diag2.img System.map-generic-2.6.33.4
boot.080A initrd.gz System.map-huge-2.6.33.4
boot_message.txt initrd-tree/ vmlinuz@
config@ map vmlinuz-generic-2.6.33.4
config-generic-2.6.33.4 README.initrd@ vmlinuz-huge-2.6.33.4
config-huge-2.6.33.4 slack.bmp
diag1.img System.map@
If that is all that is in your Slackware /boot directory you don't have any kernels installed. Vmlinuz-generic-2.6.33.4 and the initrd are not listed. Are they maybe installed on a different partition/boot? If so change the Slackware root (hd0,?) line to reflect the partition the Slackware kernel is located and keep everything else the same.
Or is this "boot.0808 diag2.img System.map-generic-2.6.33.4" your kernel? If so change the kernel line to /boot/boot.0808 diag2.img System.map-generic-2.6.33.4 and the initrd line also to match.

hakan56 04-09-2011 09:37 AM

I believe you are using grub-legacy (0.97) and I can't see anything wrong in grub.conf so I make a wild guess that your sda8 is to far away on the disk so Grub can't reach it...I have that problem.

Make a directory /boot/slack on the fedora partition (sda6) and copy all of slackware's /boot to it then change the entry for slackware...
Code:

title Slackware
root (hd0,5)
kernel /boot/slack/vmlinuz-generic-2.6.33.4 root=/dev/sda8 ro vga=773
initrd /boot/slack/initrd.gz

/Håkan

Breeze 04-09-2011 10:26 AM

Quote:

Originally Posted by hakan56 (Post 4319161)
I believe you are using grub-legacy (0.97) and I can't see anything wrong in grub.conf so I make a wild guess that your sda8 is to far away on the disk so Grub can't reach it...I have that problem.

Make a directory /boot/slack on the fedora partition (sda6) and copy all of slackware's /boot to it then change the entry for slackware...
Code:

title Slackware
root (hd0,5)
kernel /boot/slack/vmlinuz-generic-2.6.33.4 root=/dev/sda8 ro vga=773
initrd /boot/slack/initrd.gz

/Håkan

Thanks!
Yeah,I'm using grub 0.97.But not far.
Quote:

/dev/sda6 58605246 59585084 489919+ 83 Linux
/dev/sda7 59585148 67392674 3903763+ 82 Linux swap / Solaris
/dev/sda8 67394723 122463494 27534386 83 Linux
/dev/sda6 is my grub and /dev/sda8 is my slackware.
Anyway,I tried what you say,but not work.Thanks.

hakan56 04-09-2011 10:40 AM

Is there any error message, grub use to print something when it stops.

/Håkan

hakan56 04-09-2011 11:00 AM

I dont have grub on this computer and I dont remember the command you can give when grub start to get to the "prompt", but there you can use "find"...
http://www.gnu.org/software/grub/man...grub.html#find
Code:

grub> find /boot/vmlinuz-generic-2.6.33.4
grub> find /boot/initrd.gz

..that should give you where they are, and then...
http://www.gnu.org/software/grub/man...#GNU_002fLinux
..if it is /dev/sda8
Code:

grub> root (hd0,7)
grub> kernel /boot/vmlinuz-generic-2.6.33.4 root=/dev/sda8 ro
grub> initrd /boot/initrd.gz
grub> boot

/Håkan
Found the command, when grub start press c for the "prompt"

ChrisAbela 04-09-2011 03:16 PM

1. Use the Huge kernel. You will have a better chance of booting from a USB drive.
2. include a rootdelay parameter in /etc/grub/menu.lst Slackware stanza: e.g.

title Slackware
root (hd0,7)
image=/boot/vmlinuz
append="rootdelay=10 root=/dev/sda8"
read-only

colorpurple21859 04-09-2011 08:38 PM

Your grub legacy might not be able to see your Slackware partition if the slackware partition was formatted using the slackware installer. There are some distros that have that problem with grub legacy. If so you have one of Three options to try.
1. You can update your grub software and see if that helps.
2. Install lilo to the Slackware root partition using the Slackware installer and chainload
3. Use whatever software you use in the distro that your grub is located to format the Slackware partition, and when you go to reinstall Slackware do not format the slackware partition when asked.

Breeze 04-09-2011 09:39 PM

Quote:

Originally Posted by hakan56 (Post 4319224)
I dont have grub on this computer and I dont remember the command you can give when grub start to get to the "prompt", but there you can use "find"...
http://www.gnu.org/software/grub/man...grub.html#find
Code:

grub> find /boot/vmlinuz-generic-2.6.33.4
grub> find /boot/initrd.gz

..that should give you where they are, and then...
http://www.gnu.org/software/grub/man...#GNU_002fLinux
..if it is /dev/sda8
Code:

grub> root (hd0,7)
grub> kernel /boot/vmlinuz-generic-2.6.33.4 root=/dev/sda8 ro
grub> initrd /boot/initrd.gz
grub> boot

/Håkan
Found the command, when grub start press c for the "prompt"

Thanks.the same error before.
Quote:

/boot/initrd.gz:Loading kernel modules from initrd image:
mount:mounting /dev/sda8 on /mnt failed:No such device
ERROR:No /sbin/init found on rootdev (or not mounted).Trouble ahead.
You can try to fix it.Type 'exit' when things are done.
Why mount /dev/sda8 on /mnt?

colorpurple21859 04-09-2011 09:51 PM

Quote:

root (hd0,7)
kernel /boot/vmlinuz root=/dev/sda8 ro
If Slackware will boot with this, then there is something wrong with the your /boot/initrd.gz

Breeze 04-09-2011 10:18 PM

Quote:

Originally Posted by colorpurple21859 (Post 4319615)
If Slackware will boot with this, then there is something wrong with the your /boot/initrd.gz

How can I do with this? What's the right way to boot? Thanks!

colorpurple21859 04-09-2011 10:47 PM

In most installs of Slackware /boot/vmlinuz is a link to the vmlinuz-huge-2.6.33.4 kernel which makes it easier to use instead of trying to remember what version of kernel to use.
The huge kernel has everthing installed into it so you do not have to use a initrd.gz file. however because of this, the huge kernel is larger therefore your system won't be as fast as it would be with the generic kernel. Until you get a correctly working initrd.gz you will have to boot your slackware with either /boot/vmlinuz or /boot/vmlinuz-huge-2.6.33.4. After booting into your slackware system with the huge kernel run the following to help with mkinitrd.
Quote:

"$(/usr/share/mkinitrd/mkinitrd_command_generator.sh)"
so for right now see if slackware will boot with this;
Quote:

title Slackware
root (hd0,7)
kernel /boot/vmlinuz root=/dev/sda8 ro vga=773

Breeze 04-09-2011 11:03 PM

Quote:

Originally Posted by colorpurple21859 (Post 4319631)
In most installs of Slackware /boot/vmlinuz is a link to the vmlinuz-huge-2.6.33.4 kernel which makes it easier to use instead of trying to remember what version of kernel to use.
The huge kernel has everthing installed into it so you do not have to use a initrd.gz file. however because of this, the huge kernel is larger therefore your system won't be as fast as it would be with the generic kernel. Until you get a correctly working initrd.gz you will have to boot your slackware with either /boot/vmlinuz or /boot/vmlinuz-huge-2.6.33.4. After booting into your slackware system with the huge kernel run the following to help with mkinitrd.

so for right now see if slackware will boot with this;

Thanks! I boot with this
Quote:

title Slackware
root (hd0,7)
kernel /boot/vmlinuz-huge-2.6.33.4 root=/dev/sda8 ro
and that's work. Thanks!


All times are GMT -5. The time now is 01:30 AM.