LinuxQuestions.org
Review your favorite Linux distribution.
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 11-10-2015, 04:13 AM   #1
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Rep: Reputation: 47
Newly installed Slackware 14.1 with no bootloader


I just installed Slackware 14.1 on my machine which already has Windows on one partition and Debian on another, with grub in mbr with its files on a separate tiny partition. The Debian partition has grub2 on it.

While installing Slackware I omitted to install lilo thinking that I can boot it with grub. However, I find that there is no initrd file in boot partition of newly installed Slackware. I tried to boot with command 'kernel vmlinuz' (without any initrd statement) but it lead to kernel panic. I tried changing the kernel to generic, generic-smp, generic-huge and generic-huge-smp, but none works. How can I solve this and boot into the newly installed Slackware? I can boot into initial grub (of mbr) and also to my Debian partition which has grub2.

Thanks for your help.
 
Old 11-10-2015, 04:27 AM   #2
Hasek39
Member
 
Registered: Jul 2015
Location: Pittsburgh, PA, US
Distribution: Slackware
Posts: 120

Rep: Reputation: Disabled
Code:
grub2-mkconfig -o /boot/grub2/grub.cfg
Have you done this in Debian? If not, do.

Last edited by Hasek39; 11-10-2015 at 06:05 AM.
 
Old 11-10-2015, 04:34 AM   #3
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
I was thinking of giving following commands from Debian terminal (sda3 has new Slackware) to install grub2 on new Slackware partition:

Code:
# grub-install /dev/sda3  
# grub-mkconfig -o /media/username/sda3_name/boot/grub/grub.cfg
Will it be OK?

Last edited by rng; 11-10-2015 at 04:36 AM.
 
Old 11-10-2015, 04:35 AM   #4
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
Lilo would boot windows fine. And you could have booted into slackware to install grub. Now you can put your install disk in and boot the partition you want just read what it says when you start the install disk.
after it is running. you can type startx and now you can use your firefox browser go here.
http://docs.slackware.com/howtos:sla..._first_install
 
Old 11-10-2015, 05:01 AM   #5
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
I used your "grub2-mkconfig -o /boot/grub2/grub.cfg" command to update grub2 of Debian. Now I have all options of Slackware linux also in grub2 menu but none of them works. Booting starts but soon ends in kernel panic. What could be the problem?
 
Old 11-10-2015, 05:29 AM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
From Debian maybe show the content of your grub.cfg and also of "ls -l <mounted Slackware>/boot"
 
Old 11-10-2015, 05:37 AM   #7
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
I modified kernel line in grub-legacy and it worked:

Quote:
kernel=vmlinuz ro root=/dev/sda3
It needed ro and root- parts.

But on starting it ends in login prompt. I have login as root and then startx. How can it go straight to KDE after booting?

Last edited by rng; 11-10-2015 at 05:38 AM.
 
Old 11-10-2015, 05:49 AM   #8
Hasek39
Member
 
Registered: Jul 2015
Location: Pittsburgh, PA, US
Distribution: Slackware
Posts: 120

Rep: Reputation: Disabled
OK, let's try the following:

1. Restart your computer and when you see grub (or grub2) menu press <c> button (or something like this -- look at the tip in the bottom of grub screen) -- it will bring you to grub's console.
2. In grub's console you should type something like that
Code:
set root=(hd0,msdosX)
linux /boot/vmlinuz-huge root=/dev/sdaX
boot
where X is the root partition / for Slackware. I suggest you press <TAB> button after after "/boot/vmlinuz-huge" so grub will autocomplete possible cases (I think there will be /boot/vmlinuz-huge-3.10.17 but better press <TAB>).
3. I expect that after this you will be able to boot into Slackware's console.

P.S. Sorry for my English if there are any mistakes.

Last edited by Hasek39; 11-10-2015 at 06:05 AM.
 
Old 11-10-2015, 05:52 AM   #9
Hasek39
Member
 
Registered: Jul 2015
Location: Pittsburgh, PA, US
Distribution: Slackware
Posts: 120

Rep: Reputation: Disabled
Edit /etc/inittab and change "id:3:initdefault:" to "id:4:initdefault:".

Last edited by Hasek39; 11-10-2015 at 06:06 AM.
 
Old 11-10-2015, 06:01 AM   #10
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Thanks for all your help. I will try it. I am now writing from Slackware and it is very good.

@Hasek39 : Please note you do not need to quote all my posts while answering questions; I think it duplicates written matter here unnecessarily. Even now you can edit your posts to remove these extra quotes.
 
Old 11-10-2015, 08:32 PM   #11
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Two points:

1. It is surprising that grub-mkconfig of grub2 did not make a proper menu entry for Slackware.

2. Can I now install lilo on Slackware partition boot record? I think I can but I am not sure of the steps. First correct the lilo.conf file and then run lilo command?
 
Old 11-10-2015, 09:16 PM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
It is surprising that the grub-mkconfig didn't detect Slackware. I'm wondering if the following had anything to do with it.

Quote:
I modified kernel line in grub-legacy and it worked:
Debian has been using Grub2 for several releases. Do you actually have Grub Legacy booting from Debian? If that's the case, it is not surprising the grub-mkconfig didn't work.

If you are booting the kernel in Slackware directly from Debian, there is no need to install Lilo but if you want you can. Instructions at the Slackware site below.

http://www.slackbook.org/html/booting.html
 
Old 11-10-2015, 09:31 PM   #13
rng
Senior Member
 
Registered: Aug 2011
Posts: 1,198

Original Poster
Rep: Reputation: 47
Grub2 did detect Slackware and added a menu entry but it did not work - booting started but there was kernel panic (see my earlier post). Apparently, it is not adding root=/dev/sda3 parameter. This parameter, when manually added to grub-legacy entry, worked.
 
Old 11-10-2015, 10:20 PM   #14
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
This might help (save in /etc/grub.d/09_slackware_linux). It's a shameful rip-off of the debian grub-mkconfig helper script.

Code:
#! /bin/sh
set -e
# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009,2010  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"

. "${datarootdir}/grub/grub-mkconfig_lib"

export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"

CLASS="--class gnu-linux --class gnu --class os"

if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
  OS=GNU/Linux
else
  OS="${GRUB_DISTRIBUTOR} GNU/Linux"
  CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]') ${CLASS}"
fi

# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
  /dev/loop/*|/dev/loop[0-9])
    GRUB_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
  ;;
esac

if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
else
  LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi

linux_entry ()
{
  os="$1"
  tag="$2"
  version="$3"
  recovery="$4"
  args="$5"
  if ${recovery} ; then
    title="$(gettext "%s, with Linux %s [%s] (recovery mode)")"
  else
    title="$(gettext "%s, with Linux %s [%s]")"
  fi
  printf "menuentry \"${title}\" ${CLASS} {\n" "${os}" "${version}" "${tag}"
  save_default_entry | sed -e "s/^/\t/"

  # Use ELILO's generic "efifb" when it's known to be available.
  # FIXME: We need an interface to select vesafb in case efifb can't be used.
  if [ "x$GRUB_GFXPAYLOAD_LINUX" = x ]; then
      if grep -qx "CONFIG_FB_EFI=y" /boot/config-${version} 2> /dev/null \
	  && grep -qx "CONFIG_VT_HW_CONSOLE_BINDING=y" /boot/config-${version} 2> /dev/null; then
	  cat << EOF
	set gfxpayload=keep
EOF
      fi
  else
	  cat << EOF
	set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
EOF
  fi

  if [ -z "${prepare_boot_cache}" ]; then
    prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
  fi
  printf '%s\n' "${prepare_boot_cache}"
  cat << EOF
	echo	$(printf "$(gettext "Loading Linux %s ...")" ${version})
	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
  if test -n "${initrd}" ; then
    cat << EOF
	echo	$(gettext "Loading initial ramdisk ...")
	initrd	${rel_dirname}/${initrd}
EOF
  fi
  cat << EOF
}
EOF
}


process_list ()
{
    mylist="$1"
    tag="$2"
    initrd_allowed="$3"
    while [ "x$mylist" != "x" ] ; do
	linux=`version_find_latest $mylist`
	echo "Found linux image: $linux" >&2
	basename=`basename $linux`
	dirname=`dirname $linux`
	rel_dirname=`make_system_path_relative_to_its_root $dirname`
	version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
	alt_version=`echo $version | sed -e "s,\.old$,,g"`
	linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
        initrd=
	if [ "x${initrd_allowed}" = "xtrue" ]; then
	    for i in "initrd-${version}.gz" "initrd.gz" \
		"initrd.img-${version}" "initrd-${version}.img" \
		"initrd-${version}" "initrd.img-${alt_version}" \
		"initrd-${alt_version}.img" "initrd-${alt_version}"; do
		if test -e "${dirname}/${i}" ; then
		    initrd="$i"
		    break
		fi
	    done
	    if test -n "${initrd}" ; then
		echo "Found initrd image: ${dirname}/${initrd}" >&2
	    else
                # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
		linux_root_device_thisversion=${GRUB_DEVICE}
	    fi
	else
            # "UUID=" magic is parsed by initrds.  Since there's no initrd, it can't work here.
	    linux_root_device_thisversion=${GRUB_DEVICE}
	fi

	linux_entry "${OS}" "${tag}" "${version}" false \
	    "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
	if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
	    linux_entry "${OS}" "${tag}" "${version}" true \
		"single ${GRUB_CMDLINE_LINUX}"
	fi

	mylist=`echo $mylist | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
    done
}

prepare_boot_cache=

list=`for i in /boot/vmlinu[xz]-generic-* /vmlinu[xz]-generic-* ; do
        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
      done`

process_list "${list}" "generic" "true"

list=`for i in /boot/vmlinu[xz]-huge-* /vmlinu[xz]-huge-* ; do
        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
      done`
process_list "${list}" "huge" "false"
 
  


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
help with newly installed slackware 10.2!!!!! D_O_Y_L_E Slackware 4 03-17-2006 03:43 PM
help with newly installed slackware 10.2!!!!! D_O_Y_L_E Linux - Software 3 03-17-2006 01:25 AM
Hardware problems with newly installed Slackware 9.1.. Elite_Gamer04 Linux - Hardware 1 05-21-2004 07:03 AM
Newly installed slackware system will not boot yelo Slackware - Installation 5 05-11-2004 06:01 AM
Newly installed Slackware 9.1 error message sanfran49 Linux - Software 2 03-10-2004 07:06 AM

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

All times are GMT -5. The time now is 10:13 PM.

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