LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Can't boot from /boot/grub/menu.lst entry for SW13 (https://www.linuxquestions.org/questions/slackware-14/cant-boot-from-boot-grub-menu-lst-entry-for-sw13-755439/)

lestoil 09-15-2009 03:15 PM

Can't boot from /boot/grub/menu.lst entry for SW13
 
I installed(full)SW13 to /dev/hdb6 (aka/dev/sdb6) the 2nd (sata) disk on my pc. lilo was put in root partition and I'm trying to edit Ubuntu's grub/menu.lst to boot SW13. Trying chainloader method asks for kernel.
Trying Title SW13 (on/dev/hdb6 or /dev/sdb6) then root (hd1,5) and kernel /boot/vmlinuz-generic-smp-2.6.29 root=/dev/hdb6 (or /dev/sdb6) ro
then initrd (hd1,5)/boot/initrd.img give me file not found error. I'm assuming the full install includes the initrd image. Did I miss something? The installer did not ask if I wanted to do a mkinitrd. Thanx.

gegechris99 09-15-2009 03:45 PM

Quote:

Originally Posted by lestoil (Post 3684078)
Trying Title SW13 (on/dev/hdb6 or /dev/sdb6) then root (hd1,5) and kernel /boot/vmlinuz-generic-smp-2.6.29 root=/dev/hdb6 (or /dev/sdb6) ro
then initrd (hd1,5)/boot/initrd.img give me file not found error.

First, the kernel name will be:

Code:

vmlinuz-generic-smp-2.6.29.6-smp
Second, you need to create a initrd.gz image file with the generic kernel. This is explained in CHANGES_AND_HINTS.TXT available at the root directory of the installation media (DVD or CD):

Quote:

Use one of the provided generic kernels for daily use. Do not report
bugs until/unless you have reproduced them using one of the stock
generic kernels. You will need to create an initrd in order to boot
the generic kernels - see /boot/README.initrd for instructions.
The huge kernels are primarily intended as "installer" and "emergency"
kernels in case you forget to make an initrd. For most systems, you
should use the generic SMP kernel if it will run, even if your system is
not SMP-capable. Some newer hardware needs the local APIC enabled in the
SMP kernel, and theoretically there should not be a performance penalty
with using the SMP-capable kernel on a uniprocessor machine, as the SMP
kernel tests for this and makes necessary adjustments. Furthermore, the
kernel sources shipped with Slackware are configured for SMP usage, so you
won't have to modify those to build external modules (such as NVidia or
ATI proprietary drivers) if you use the SMP kernel.
Refer to README.initrd for instructions on how to do it.

brianL 09-15-2009 03:48 PM

Run this as root in the terminal:
Code:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
It will give you a suitable command to run to create an initrd.

brianL 09-15-2009 04:08 PM

Oh, then add a line to the entry for the generic kernel in your menu.list.
initrd /boot/initrd.gz

lestoil 09-15-2009 04:11 PM

So If I boot the install cd I login as root, cd to /boot and run command mkinitrd -c -k generic-smp-2.6.29.6-smp -m mbcache:jbd:ext3 -f ext3 -r /dev/hdb6 for ext3 root partition? Then edit /etc/lilo.conf to include initrd = /boot/initrd.gz and run # lilo. Then I can edit the /boot/grub/menu.lst in ubuntu and add SW13. Is that about it? This the 1st time trying the mkinitrd command in more than 8yrs of using linux. Thx for your patient response.

lestoil 09-15-2009 04:34 PM

brianL running that /usr/share...generator.sh said could not find error when I booted default hugesmp.s kernel and logged in as root. Cd to /usr/share and ls -aF doesn't show any mkinitrd file. Should I boot with vmlinuz-generic-smp-2.6.29.6-smp kernel instead? Thx. And cd /boot didn't work to try the readme file way.

gegechris99 09-15-2009 04:36 PM

The correct syntax would be:

Code:

mkinitrd -c -k generic-2.6.29.6-smp -m mbcache:jbd:ext3 -f ext3 -r /dev/hdb6
The kernel is 2.6.29.6-smp but for whatever reason, the vmlinuz file in /boot is named vmlinuz-generic-smp-2.6.29.6-smp

brianL 09-15-2009 05:19 PM

Ah, I should have mentioned running this before running the mkinitrd_command_generator.sh:
Code:

chmod +x /usr/share/mkinitrd/mkinitrd_command_generator.sh

lestoil 09-15-2009 05:20 PM

I tried booting huge kernel(default) then as root cd /boot doesn't work. # cd / ls -aF shows @boot no /boot. Tried /mnt /dev/hdd(install dvd) and it wont so I can do the readme.initrd installpkgs and mkinitrd..... steps. What am I missing here? I did do full install without error messages.

lestoil 09-15-2009 05:46 PM

After # /mnt /dev/hdb6--it's been so long- I can cd /boot but mkinitrd step says something about missing candidate. Installpkg for kernel* kernel-modules and mkinitrd are no go too. # cd /usr/share has nothing about mkinitrd too. This has got to be simpler:( Thx.

hurry_hui 09-15-2009 07:13 PM

Have you tried to boot manually..?

from the grub prompt (you can enter this by pressing c after given menu by grub from e.g. Ubuntu)
Code:

grub> root (hd1,5)
press ENTER, if you are not sure check the drive with
Code:

grub> geometry (hd0)
or
Code:

grub> geometry (hd1)
you can also check it by press TAB after root ( and manually type option given by grub, then type

Code:

grub> kernel /boot/
press TAB to see available kernel..e.g. try vmlinuz and followed by root=/dev/sdb6 ro

your stanza will be:

Code:

grub > kernel /boot/vmlinuz root=/dev/sdb6 ro
press ENTER to see whether the kernel is OK, if it is then since you do not need initrd.img when using huge kernel type

Code:

grub > boot
to start booting slackware

or you can chainload if lilo installed in root /dev/sdb6

Code:

grub > root (hd1,5)
press ENTER

Code:

grub > chainloader +1
press ENTER

Code:

grub > boot
press ENTER to boot slackware via lilo


HTH

PS: I have tried this one, for me i add 'rootdelay=10' option since I use USB HDD

XGizzmo 09-15-2009 10:24 PM

Is this an ext4 filesystem? If so grub can not boot an ext4 filesystem.

lestoil 09-16-2009 12:12 AM

Thx for replies. Booting now(with default huge kernel) into SW13 using Ubuntu's /boot/grub/menu.lst entry of
Title Linux (on /dev/sdb6)
root (hd1,5)
chainloader +1
boot
and selecting SW from lilo menu. Can be marked as solved pls:)

mobinskariya 09-16-2009 12:15 AM

you can mark it using thread tools since you are OP.

lestoil 09-17-2009 03:42 PM

done thx


All times are GMT -5. The time now is 04:22 AM.