LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware and the grub boot loader. (https://www.linuxquestions.org/questions/slackware-14/slackware-and-the-grub-boot-loader-4175677924/)

stf92 06-30-2020 06:19 PM

Slackware and the grub boot loader.
 
Hi: Two questions:
(a) Do you know anybody using slackware with grub? I mean grub loads the Slackware operating system.

(b) Does grub come with the Slackware installation disks?

colorpurple21859 06-30-2020 06:53 PM

Yes and yes. Grub isn't used as the bootloader by default. You can install grub manually by chroot into your system.
at the elilo/lilo prompt open another console
chroot /mnt
then run grub-install and grub-mkconfig

Richard Cranium 06-30-2020 07:00 PM

Everything that @colorpurple21859 wrote.

I think that I don't have any physical machines left that use lilo/elilo.

In fact, I just installed grub 2.04 on my Slackware64 14.2 machine so I could easily boot into windows 10 on that particular machine. 2 of the other machines don't have to deal with windows, so I don't need to upgrade grub on them. The last machine is running -current, so grub 2.04 is already there.

stf92 06-30-2020 07:22 PM

Thanks. Is there a detailed procedure, assuming I already have the grub boot loader in the MBR, to make the boot loader to load Slackware? I think the procedure is quite simple, only involving at most two steps. Perhaps in the Slackware documentation there are precise instructions to follow?

I have already tried using grub with Slackware in the past but the result has been complete failure and it is already three years that I lack Slackware in my machine.

colorpurple21859 06-30-2020 07:26 PM

after installing bootloader to mbr run
Code:

grub-mkconfig -o /boot/grub/grub.cfg
That will give you a grub menu. Slackware doesn't auto-run that command with kernel updates to update the grub menu for kernel changes.

upnort 06-30-2020 07:32 PM

I use GRUB.

I've been using GRUB since before I started using Slackware, when GRUB was version 0.9x. Back in those days I was multi-booting a lot. I found GRUB more suited to that environment. Just edit menu.lst and not worry about forgetting to run lilo.

I don't think GRUB was included in Slackware until around 10.1 and was in the /extra branch.

I use lilo in throwaway Slackware VMs.

stf92 06-30-2020 08:21 PM

Quote:

Originally Posted by colorpurple21859 (Post 6139922)
after installing bootloader to mbr run
Code:

grub-mkconfig -o /boot/grub/grub.cfg
That will give you a grub menu. Slackware doesn't auto-run that command with kernel updates to update the grub menu for kernel changes.

I have debian 10 in another partition. Shall I still be able to boot debian after running that command?

upnort 06-30-2020 09:18 PM

Quote:

I have debian 10 in another partition. Shall I still be able to boot debian after running that command?
One of the systems needs to be the primary GRUB source. On one system or the other, enable /etc/grub.d/30_os-prober (chmod +x). Then run grub-mkconfig on that system. Debian systems support a grub-mkconfig script wrapper named update-grub.

colorpurple21859 06-30-2020 09:21 PM

Quote:

I have debian 10 in another partition
If you only have one drive, whichever distro was last to run
Code:

grub-install /dev/sda
assuming your one drive is sda, will display the boot menu of /boot/grub/grub.cfg of that distro.
Yes you should be able to boot debian after running that command, but there maybe other issues that we aren't aware of at this time.

stf92 07-01-2020 10:41 PM

This is the grub.cfg I got:
Code:

bill@darkstar:/boot/grub$ cat grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
  set default="${next_entry}"
  set next_entry=
  save_env next_entry
  set boot_once=true
else
  set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
  font=unicode
else
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
else
  search --no-floppy --fs-uuid --set=root 3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
else
  search --no-floppy --fs-uuid --set=root 3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
fi
insmod png
if background_image /usr/share/desktop-base/futureprototype-theme/grub/grub-4x3.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
        set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3b7be193-a2fd-4b48-8d07-bd2311b0f5ba' {
        load_video
        insmod gzio
        if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
        insmod part_msdos
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
        else
          search --no-floppy --fs-uuid --set=root 3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
        fi
        echo        'Loading Linux 4.19.0-8-amd64 ...'
        linux        /boot/vmlinuz-4.19.0-8-amd64 root=UUID=3b7be193-a2fd-4b48-8d07-bd2311b0f5ba ro edd=off noapic i8042.nopnp quiet
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-4.19.0-8-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-3b7be193-a2fd-4b48-8d07-bd2311b0f5ba' {
        menuentry 'Debian GNU/Linux, with Linux 4.19.0-8-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-8-amd64-advanced-3b7be193-a2fd-4b48-8d07-bd2311b0f5ba' {
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
                else
                  search --no-floppy --fs-uuid --set=root 3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
                fi
                echo        'Loading Linux 4.19.0-8-amd64 ...'
                linux        /boot/vmlinuz-4.19.0-8-amd64 root=UUID=3b7be193-a2fd-4b48-8d07-bd2311b0f5ba ro edd=off noapic i8042.nopnp quiet
                echo        'Loading initial ramdisk ...'
                initrd        /boot/initrd.img-4.19.0-8-amd64
        }
        menuentry 'Debian GNU/Linux, with Linux 4.19.0-8-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-8-amd64-recovery-3b7be193-a2fd-4b48-8d07-bd2311b0f5ba' {
                load_video
                insmod gzio
                if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
                else
                  search --no-floppy --fs-uuid --set=root 3b7be193-a2fd-4b48-8d07-bd2311b0f5ba
                fi
                echo        'Loading Linux 4.19.0-8-amd64 ...'
                linux        /boot/vmlinuz-4.19.0-8-amd64 root=UUID=3b7be193-a2fd-4b48-8d07-bd2311b0f5ba ro single edd=off noapic i8042.nopnp
                echo        'Loading initial ramdisk ...'
                initrd        /boot/initrd.img-4.19.0-8-amd64
        }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class slackware --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
        insmod part_msdos
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
        else
          search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
        fi
        linux /boot/vmlinuz root=/dev/mmcblk0p2 edd=off noapic
}
submenu 'Advanced options for Slackware 14.2 (on /dev/mmcblk0p2)' $menuentry_id_option 'osprober-gnulinux-advanced-2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz root=/dev/mmcblk0p2
        }
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz root=/dev/mmcblk0p2
        }
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz-generic root=/dev/mmcblk0p2
        }
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-4.4.14--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz-generic-4.4.14 root=/dev/mmcblk0p2
        }
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-smp--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz-generic-smp root=/dev/mmcblk0p2
        }
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-generic-smp-4.4.14-smp--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz-generic-smp-4.4.14-smp root=/dev/mmcblk0p2
        }
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz-huge root=/dev/mmcblk0p2
        }
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-4.4.14--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz-huge-4.4.14 root=/dev/mmcblk0p2
        }
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-smp--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz-huge-smp root=/dev/mmcblk0p2
        }
        menuentry 'Slackware 14.2 (on /dev/mmcblk0p2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-huge-smp-4.4.14-smp--2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
                insmod part_msdos
                insmod ext2
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                else
                  search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
                fi
                linux /boot/vmlinuz-huge-smp-4.4.14-smp root=/dev/mmcblk0p2
        }
}

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
bill@darkstar:/boot/grub$

But there is no line for initrd. Should I add one? And how should it read?

Richard Cranium 07-01-2020 10:44 PM

Quote:

Originally Posted by stf92 (Post 6139920)
Thanks. Is there a detailed procedure, assuming I already have the grub boot loader in the MBR, to make the boot loader to load Slackware? I think the procedure is quite simple, only involving at most two steps. Perhaps in the Slackware documentation there are precise instructions to follow?

I have already tried using grub with Slackware in the past but the result has been complete failure and it is already three years that I lack Slackware in my machine.

Well, there's https://github.com/Richard-Cranium/SlackwareGrub2

colorpurple21859 07-02-2020 01:52 AM

Do you have an initrd.gz?
If you only use the first slackware entry to boot and it works without the initrd.gz line, I wouldn't worrry about it.

Otherwise grub is versatile so there is several ways of doing this.
1. As per Richard Cranium post 11

2. Copy the slackware menu entries that you want to use to /etc/grub.d/40_custom and insert the initrd=/boot/initrd.gz between the vmlinuz line and the } line and run update-grub. Be aware that is file is static and won't change with a kernel version change.

3.Chainload slackware grub.cfg with this entry
Code:

menuentry 'Slackware chainload (on /dev/mmcblk0p2)' --class slackware --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-2d63e598-b1b4-4e32-a781-9fe9ceae2c11' {
        insmod part_msdos
        insmod ext2
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root  2d63e598-b1b4-4e32-a781-9fe9ceae2c11
        else
          search --no-floppy --fs-uuid --set=root 2d63e598-b1b4-4e32-a781-9fe9ceae2c11
        fi
        configfile /boot/grub/grub.cfg
}


captain_sensible 07-02-2020 04:09 AM

I would like to ask how the approach to installing grub2 if you have uefi differs

Quote:

I already have the grub boot loader in the MBR, to m

the above implies bios ?

Previously I had a pc using bios; i booted up in lilo , removed it ,installed grub2 ran command

grub-mkconfig -o /boot/grub/grub.cfg from memory and everything worked. Then if i understand it grub stage 1 was on mbr and that pointed to grub stage2.

For myself and probably many others having a /dev/sda with a gpt label, a 100MB of EFI and presently using elilo ,how would the approach to installing grub2 differ than if you have say a bios pc and lilo?


I see in boot there is a grub folder. Would installing grub2 put files there are creates another directory called grub2 ?

enorbet 07-02-2020 06:50 AM

@captain_sensible - you can preview what grub will see and how it will function if you have rEFInd installed for EFI booting. Just load your Slackware install media and select it with rEFInd and the grub bootloader for UEFI media boot will appear and display all the kernels it finds (even some you may have no intention of using excepting recovery) and you can test each and every one.

Didier Spaier 07-02-2020 07:32 AM

1 Attachment(s)
Quote:

Originally Posted by enorbet (Post 6140508)
@captain_sensible - you can preview what grub will see and how it will function if you have rEFInd installed for EFI booting. Just load your Slackware install media and select it with rEFInd and the grub bootloader for UEFI media boot will appear and display all the kernels it finds (even some you may have no intention of using excepting recovery) and you can test each and every one.

You can do that from a running Slint typing grub-emu in a terminal. Users will be proposed to run it at end of Slint installation in next Slint installer, which will help blind users to know the layout of the GRUB menu after reboot, otherwise not accessible to them.

stf92 07-02-2020 08:27 AM

Quote:

Originally Posted by colorpurple21859 (Post 6140421)
Do you have an initrd.gz?
If you only use the first slackware entry to boot and it works without the initrd.gz line, I wouldn't worrry about it.

Otherwise grub is versatile so there is several ways of doing this.
1. As per Richard Cranium post 11

2. Copy the slackware menu entries that you want to use to /etc/grub.d/40_custom and insert the initrd=/boot/initrd.gz between the vmlinuz line and the } line and run update-grub. Be aware that is file is static and won't change with a kernel version change.

3.Chainload slackware grub.cfg with this entry [...]

I don't have an initrd.gz in the Slackware partition. The initrd is generated by mkinitrd which I can't run because I can't boot Slackware yet. So, let's omit the initrd thing for the moment.

After running grub-mkconfig under debian and with the slackware 14.2 already installed, I booted and got this:
Code:

Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block (0,0)
Here a new piece of information: this laptop uses eMMC instead of a hard disk. Though I have already successfully installed debian and linux arch on it, I think Slackware simply does not understand it, which is odd because the installer works fine, writing to the eMMC a lot of data.

In view of this, I'll start a separate thread under the title "Slackware and eMMC". Thanks for all the feedback.

BrunoLafleur 07-02-2020 10:02 AM

Quote:

Originally Posted by stf92 (Post 6140540)
I don't have an initrd.gz in the Slackware partition. The initrd is generated by mkinitrd which I can't run because I can't boot Slackware yet. So, let's omit the initrd thing for the moment.

If you install the Slackware, there is a initrd.gz by default which comes with the default huge kerneL.

I don't think Slackware will boot without it.

enorbet 07-02-2020 10:11 AM

Quote:

Originally Posted by BrunoLafleur (Post 6140568)
If you install the Slackware, there is a initrd.gz by default which comes with the default huge kerneL.

I don't think Slackware will boot without it.

Is that actually accurate? It is my understanding that what makes the Huge kernel huge is almost everything is checked and therefore no initrd is needed. IIRC a sample initrd is included for the Generic kernel only with the expectation that each user will generate his own for his hardware and software specifics. FWIW the only reason I would ever employ initrd is for encrypted file systems. I have never used one in over 20 years.

cwizardone 07-02-2020 10:17 AM

Quote:

Originally Posted by BrunoLafleur (Post 6140568)
If you install the Slackware, there is a initrd.gz by default which comes with the default huge kerneL.

I don't think Slackware will boot without it.

As pointed out in post #18, the huge kernel does not need a initrd.gz to boot.

bassmadrigal 07-02-2020 10:25 AM

Quote:

Originally Posted by BrunoLafleur (Post 6140568)
If you install the Slackware, there is a initrd.gz by default which comes with the default huge kerneL.

I don't think Slackware will boot without it.

This is partially true. On -current and most likely 15.0+ releases, Slackware will include an initrd after installation, but it will be booting the generic kernel with that initrd. The huge kernel is still available (for now) if people want to switch to it. For 14.2 and earlier, it will install both the generic and huge and boot off the huge by default. The admin would be required to set up and initrd and switch to the generic kernel, which is recommended by Pat.

cwizardone 07-02-2020 10:37 AM

-current boots the huge kernel perfectly without a initrd.gz.
With "modern" hardware there is no perceived benefit to using the generic kernel and a initrd.gz.

colorpurple21859 07-02-2020 11:30 AM

I think you will need initrd.gz with eMMC
at the grub menu highlight the slackware menu entry Press e for edit
add a new line after the linux line with this

initrd /boot/initrd.gz

boot and see what happens.
If that doesn't work and/or a initrd.gz doesn't exist, at he grub menu edit the linux line
change the root=/dev/mmcblk0p2 on the linux line to root=UUID=2d63e598-b1b4-4e32-a781-9fe9ceae2c11

Petri Kaukasoina 07-02-2020 11:34 AM

Quote:

Originally Posted by stf92 (Post 6140540)
I don't have an initrd.gz in the Slackware partition.

Though I have already successfully installed debian and linux arch on it, I think Slackware simply does not understand it, which is odd because the installer works fine, writing to the eMMC a lot of data.

Quote:

Originally Posted by BrunoLafleur (Post 6140568)
If you install the Slackware, there is a initrd.gz by default which comes with the default huge kerneL.

I don't think Slackware will boot without it.

Quote:

Originally Posted by enorbet (Post 6140570)
Is that actually accurate? It is my understanding that what makes the Huge kernel huge is almost everything is checked and therefore no initrd is needed. IIRC a sample initrd is included for the Generic kernel only with the expectation that each user will generate his own for his hardware and software specifics. FWIW the only reason I would ever employ initrd is for encrypted file systems. I have never used one in over 20 years.

I don't know anything about eMMC. But the installer actually is an initrd and it contains lots of modules, see
Code:

bsdtar tvf slackware64-14.2/isolinux/initrd.img lib/modules/4.4.14
so if the installer can write to the eMMC but the installed system does not recognize it, it's possible that even the huge kernel may need an initrd for an installed system to boot, with some modules the installer's initrd.img has.

stf92 07-02-2020 11:37 AM

Quote:

Originally Posted by colorpurple21859 (Post 6140589)
I think you will need initrd.gz with eMMC
at the grub menu highlight the slackware menu entry Press e for edit
add a new line after the linux line with this

initrd /boot/initrd.gz

boot and see what happens.
If that doesn't work and/or a initrd.gz doesn't exist, at he grub menu edit the linux line
change the root=/dev/mmcblk0p2 on the linux line to root=UUID=2d63e598-b1b4-4e32-a781-9fe9ceae2c11

I looked at the /boot directory in the slackware partition and did not find any initrd.gz. What is UUID=2d63e598-b1b4-4e32-a781-9fe9ceae2c11?

Petri Kaukasoina 07-02-2020 11:52 AM

Quote:

Originally Posted by stf92 (Post 6140540)
I think Slackware simply does not understand it, which is odd because the installer works fine, writing to the eMMC a lot of data.

While running the installer, what does "lsmod" print out (in another virtual console)?

colorpurple21859 07-02-2020 12:09 PM

That is the blkid of the slackware partition, but just remembered that has to have an initrd to work, so scratch that one.

colorpurple21859 07-02-2020 12:16 PM

open a terminal in debian as root, this is assuming "/dev/mmcblk0p2" this is the correct /dev for slackware partition.

Code:

mount /dev/mmcblk0p2 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount -o bind /run /mnt/run
chroot /mnt
sh /usr/share/mkinitrd/mkinitrd_command_generator.sh

run the command genererated for mkinitrd
Code:

exit
update-grub


stf92 07-02-2020 12:39 PM

Quote:

Originally Posted by Petri Kaukasoina (Post 6140599)
While running the installer, what does "lsmod" print out (in another virtual console)?

Well, among the lines printed out there is:
Code:

mmc_core 97537 4 mmc_block,sdhci,sdhci_acpi,sdhci_pci

Petri Kaukasoina 07-02-2020 12:49 PM

Quote:

Originally Posted by stf92 (Post 6140619)
Well, among the lines printed out there is:
Code:

mmc_core 97537 4 mmc_block,sdhci,sdhci_acpi,sdhci_pci

So, the huge kernel needs at least those modules in initrd.

stf92 07-02-2020 12:51 PM

Quote:

Originally Posted by colorpurple21859 (Post 6140614)
open a terminal in debian as root, this is assuming "/dev/mmcblk0p2" this is the correct /dev for slackware partition.

Code:

mount /dev/mmcblk0p2 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount -o bind /run /mnt/run
chroot /mnt
sh /usr/share/mkinitrd/mkinitrd_command_generator.sh

run the command genererated for mkinitrd
Code:

exit
update-grub


All sh did was to print the following:
Code:

Modules for kernel 4.19.0-8-amd64 aren't installed
Could it be because I installed 14.2 32-bit and this machine is 64-bit?

colorpurple21859 07-02-2020 01:01 PM

Code:

sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.14
Forgot to add the -k for your slackware kernel version.
Quote:

Could it be because I installed 14.2 32-bit and this machine is 64-bit?
No that is debians kernel version that is currently running and the script defaults to the running kernel if the -k option isn't supplied

colorpurple21859 07-02-2020 01:13 PM

If it still won't boot check-out the last 2 post in this thread https://www.linuxquestions.org/quest...ge-4175587811/

stf92 07-02-2020 01:22 PM

Alright. Assume I already have my initrd.gz. Why can't I just make grub.cfg writable and manually edit it to modify the line? I've already done it adding to the line the kernel parameters edd=off and noapic.

colorpurple21859 07-02-2020 01:31 PM

Quote:

Alright. Assume I already have my initrd.gz. Why can't I just make grub.cfg writable and manually edit it to modify the line?
yes you can do that, but the first debian update that runs update-grub will undo your edit. Slackware doesn't update the /boot/grub/grub.cfg when updating the system, but debian does. It should pick up the initrd.gz when update-grub is rerun

Quote:

I've already done it adding to the line the kernel parameters edd=off and noapic.
Those also will go away when debian updates the kernel. Edit /etc/default/grub and add it to the
Code:

GRUB_CMDLINE_LINUX=" edd=off noapic"
run update-grub

Petri Kaukasoina 07-02-2020 01:33 PM

I would not use mkinitrd_command_generator.sh running on the debian kernel but just try
Code:

mkinitrd -k 4.4.14 -m mmc_core:mmc_block:sdhci:sdhci_acpi:sdhci_pci
in that chroot.

stf92 07-02-2020 02:10 PM

Code:

Kernel panic - not syncing: VFS: unable to mount root fs on unknown-block (0,0)
I assume grub took notice of the 10_custom file, where the initrd line is. I'll see your link in post #32.

stf92 07-02-2020 03:59 PM

I tried with the initrd.gz made as in post #27 and I tried with the one made as in post #35 both cases resulting in Kernel panic (same message).

@colorpurple21859: I read the posts you suggested in post #32. But they assume you recompile the kernel, a work I am not willing to do.

In the eMMC there are two partitions which are not shown by cfdisk. One of them is EFI, I think. When I ran the installer I was surprised it had found an NTFS partition with size 512MB. That is one of the "hidden" partitions. One thing: are we sure the kernel panic message is caused by the eMMC thing? What remains true is that both arch linux and debian had no problem with the eMMC.

EDIT: I have a second machine with 14.2 running on it, in case that is helpful.

Petri Kaukasoina 07-02-2020 04:42 PM

When you run lsmod in the installer, maybe it listed some other modules than you wrote in #28 ? If so, try add them in the mkinitrd command in #35.

Jeebizz 07-02-2020 04:45 PM

This probably will never happen, but maybe Slackware could provide a choice? LILO / GRUB , ELILO/GRUB (UEFI) - without having to manually go in and install GRUB instead of LILO/ELILO. Just a thought.

stf92 07-02-2020 05:00 PM

Quote:

Originally Posted by Petri Kaukasoina (Post 6140714)
When you run lsmod in the installer, maybe it listed some other modules than you wrote in #28 ? If so, try add them in the mkinitrd command in #35.

I ran the installer and when it gave me the prompt I logged in as root and ran lsmod. Is it correct?

stf92 07-02-2020 05:42 PM

Quote:

Originally Posted by Jeebizz (Post 6140716)
This probably will never happen, but maybe Slackware could provide a choice? LILO / GRUB , ELILO/GRUB (UEFI) - without having to manually go in and install GRUB instead of LILO/ELILO. Just a thought.

Volkerdi himself told me lilo can't manage eMMC. I think if elilo can he would have told me.

I'll run the installer and after having run lsmod I'll use gpm (general purpose mouse) to paste the output into a file. Only thing is I don't know where gmp will be in the file system (I installed it).

colorpurple21859 07-02-2020 05:44 PM

Yes, run uname -r if the kernel version is the same as the one of the installed system rerun the commands of post 30 minus the update-grub

stf92 07-02-2020 06:49 PM

This is the output of 'uname -r' run while running the installer:
Code:

4.4.14-smp
Does it match the kernel version?

This is the output of 'lsmod' run while running the installer:
Code:

Module                  Size  Used by
uas                    12314  0
usb_storage            44630  1 uas
mmc_block              26186  2
drm                  277806  0
xhci_pci                4217  0
xhci_hcd              108007  1 xhci_pci
i2c_i801              14717  0
i2c_designware_pci      3257  0
agpgart                26940  1 drm
sdhci_pci              15331  0
i2c_algo_bit            5190  0
8250_fintek            2820  0
wmi                    7983  0
video                  24660  0
i2c_hid                11423  0
hid                    87731  1 i2c_hid
i2c_designware_platform    3675  0
i2c_designware_core    6748  2 i2c_designware_pci,i2c_designware_platform
i2c_core              41745  7 drm,i2c_designware_pci,i2c_i801,i2c_hid,i2c_designware_core,i2c_designware_platform,i2c_algo_bit
dwc3                  33222  0
sdhci_acpi              5145  0
8250_dw                5874  0
sdhci                  26312  2 sdhci_acpi,sdhci_pci
mmc_core              97537  4 mmc_block,sdhci,sdhci_acpi,sdhci_pci
fjes                  19156  0
pinctrl_cherryview    17811  1
button                  4494  0
processor              23453  0
loop                  17817  0


stf92 07-02-2020 07:14 PM

Quote:

Originally Posted by stf92 (Post 6140742)
This is the output of 'uname -r' run while running the installer:
Code:

4.4.14-smp
Does it match the kernel version?

Of course it does: I looked into the slackware /boot directory and the names of the images include '4.4.14-smp'. I did exactly what you said but still the same kernel panic message.

colorpurple21859 07-02-2020 07:45 PM

add rootdelay=15 to the linux line of the grub menu

colorpurple21859 07-02-2020 08:11 PM

did you try Petri Kaukasoina suggested mkinitrd line:
Code:

mkinitrd -k 4.4.14 -m mmc_core:mmc_block:sdhci:sdhci_acpi:sdhci_pci
and/or add this to the mkinitrd command that was generated.

AlleyTrotter 07-02-2020 08:13 PM

I read this thread and it is very easy to see why Pat does not make grub the default boot manager.
Just a Thought

colorpurple21859 07-02-2020 08:18 PM

This link has a section on creating an initrd for an emmc drive that may be of help, ignore the sections about efi. https://ansuz.sooke.bc.ca/entry/340

Petri Kaukasoina 07-03-2020 12:34 AM

Ok, I guess we tried to use modules for the wrong (non-smp) kernel. Try this:
Code:

mkinitrd -k 4.4.14-smp -m mmc_core:mmc_block:sdhci:sdhci_acpi:sdhci_pci

stf92 07-03-2020 06:49 AM

In order to paste the output of mkinitrd_command_generator.sh I run the commands of post #27 in a GUI terminal after doing 'su -' and then with the mouse I copy and paste. But I understand 'su -' is not exactly the same as using one of the consoles (dev/ttyN) as root. Is it OK if I use a GUI terminal?


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