Files in /etc/grub.d not included in /boot/grub/grub.cfg.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
it is default search patterns .. if it is in the other directory then it will pick it up and look at it, else move on.
seeings how this thread is a continuation of this one only for the last few post where you were offered a script to try, https://www.linuxquestions.org/quest...39#post5859539
I am not sure how you installed slack on your EMMC card. but, if you installed it just like a normal hdd and it took, and it booted up into a freshly installed Slack, and all you're wanting to do is change the Kernel to the smaller one, then try treating it as a normal Slack install as if it is installed on a hdd.
install slack
select mirror
update gpg
update cache list
install new
upgrade system
change kernel
You will need to create an initial RAM disk (“initrd” for short). The initrd functions as a temporary root file system during
the intial stage of the kernel booting, and it helps get the actual root system mounted when your system boots. Run this, as
root:
This command will not actually do anything. It is informational only, and will output something like this - depending on your kernel version, your hardware configuration, the root filesystem you chose when you installed Slackware and so on:
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
Skip the LiLO stuff as I said before, Have you even given that a try yet, because they have to match. here is a post on Slack where someone had a similar issue it looks like " Grub2...can't load generic" marked solved. https://www.linuxquestions.org/quest...eneric-854190/
It's simple. I booted the installer from a USB stick (flash memory) and went through the usual procedure when installing from a CD, skipping the lilo creation. By the way I only installed the basic series (don't remember its name), that is, only one series, that which among other things creates the directory structure. I have two partitions, one of which has Arch on it and the other I intend to use for Slackware. Some time ago the scenario was:
partition 1: arch
partition 2: debian
Neither had any problem in booting. Only slackware won't boot. Back to arch/slackware: I ran the mkinitrd_command_generator.sh script and used the output. Everything was fine because among other things that gave me the drivers for the eMMC device (the "hard disk"). I think I now have a good initrd.gz file. and that only thing lacking is the bootloader. Unfortunately use of lilo with eMMC is for gurus, so I must fall back on grub, which I never had used before.
So the file 11_slackware_linux in /etc/grub.d is not included by grub-mkconfig in grub.cfg because that same file should be in another directory also?
EDIT: "Skip the LiLO stuff as I said before, Have you even given that a try yet, because they have to match". What has to match with what?
the match is the initrd.gz has to match with the kernel its made from. you cannot just point to the generic kernel and use the same initrd.gz because it is made from the huge kernel.
Did you follow the instructions on that grub2 extra file on the git page?
so you did a partial install of Slack. My Option is install the full install, then skip lilo install, use Arch's gurb to control boot. run that script to create a new initrd.gz and let Arch grub pick it up, in most cases you're not going to see much difference between the huge and the generic, I went through all of that got to change it because ... ??? thing, then got past that feeling, and didn't really see any performance boost, so now I just use the huge and it just works out for me.
If it was booting alright just by what you did install for Slack with the huge kernel, and didn't start giving you grief until you tried to change it? If it did, then the full install part you might still be able to get past that and just use Arches Grub to control the boot for both.
this is how I do (sometimes) install slack if it is a second install, just like you, skip the lilo install and let the other distro boot, update grub and let it control the boot list.
so every time the second or more get a kernal update you have to boot back into the controlling Grub distro and run update grub so it can pick up the new kernel for the other distro. Otherwise it might not boot that other distro until you do because the kernel has been changed. if you get to playing around with it enough you should see the cause and effects. then hopefully pick up what to do in response to them.
so as it stands,
just to like you did with installing Slack, and running that that script for change kernels
the match is the initrd.gz has to match with the kernel its made from. you cannot just point to the generic kernel and use the same initrd.gz because it is made from the huge kernel.
Did you follow the instructions on that grub2 extra file on the git page?
I did but the file has a syntax error as declared by grub-mkconfig. Unfortunate case.[quote
Quote:
If it was booting alright just by what you did install for Slack with the huge kernel, and didn't start giving you grief until you tried to change it? If it did, then the full install part you might still be able to get past that and just use Arches Grub to control the boot for both.
Slackware never booted from disk, because I skipped the lilo thing while running setup. If I could just boot it under whatever circumstances then I would be happy. But I am not happy. Never once since I have this machine did Slackware booted from the hard disk (eMMC).
Quote:
Then boot again into Arch and run its update grub, then see if it catches Slack
I did but the file has a syntax error as declared by grub-mkconfig. Unfortunate case.[quote
Slackware never booted from disk, because I skipped the lilo thing while running setup. If I could just boot it under whatever circumstances then I would be happy. But I am not happy. Never once since I have this machine did Slackware booted from the hard disk (eMMC).
update grub: you mean run grub-mkconfig?
when installing slack, when you get to part where it asks, install LilO yes, or skip, I pick skip, finish the set up, then boot right into my other distro, then run its update-grub, which yes is just a wrapper for the most part, for that command, grub-mkconfig .
As that is a old debain hangover part i carried with me back into slack, I just put that command into a file call it update-grub, then make it executable, then put that in /local/bin/ saves me time in writing it out. Anyways,
that maybe why you're not getting Slack to boot, skipping the lilo install and not getting something else to see it, that is where Arch comes in with what ever command they use to update the grub file.
if it was in fact Arch that was adding that EOF crap in the file, then I have no idea why, that is Arch, and well come to think of it, I did just installed Manjaro a few days ago, and its a arch knock off, but I have not looked into everything about it(yet). though, when I run its update-grub command it picks up my slack and windows with out issues. as that is what its is suppose to do.
what happened to Arch and its grub? who was in control of grub before when you had arch and debian on it?
if debain and you cannot get into Arch now either, then, supergrub2 burn it to a usb stick use that to pick up your OS'es then the one you boot into use that to install grub to your mbr? or efi (which I have no real experience in).
anyways this is getting too involved in all of the variables it could be in my head then trying to cover them all here.
Look: if Slack is installing properly as it were a hdd, as that is what it is suppose to do even if it is a eMMC card. the steps are then when you skip install of Lilo is to have a back up method to boot into that OS. Ie. someone elses grub from a distro already installed on your system.
Then that is the means in which you use to boot any other system by updating its grub so it can add any other OS's to its listing. I think that it is as simple as that. you skipped that part, using Arch to take control over it.
2: you could get a copy of supergrub2 and use that as I have in the past when I've lost grub and go into rescue mode, I just pull that out and use that to boot into my distro then reestablish grub inside of the ditro I booted into using supergrub2.
if this part that has a missing part
I did but the file has a syntax error as declared by grub-mkconfig. Unfortunate case.[quote
is suggesting that Arch grub is causing you grief by putting that error in the grub.cfg. then I would get supergrub2 and use that to see if it will get me into slack. then use Slack to install its grub then run the grub-mkconfig command and let it take over your system. supergrub2 is a program that boots off a USB Stick then searches your hdd for installs it can boot, then gives you a list and you pick from them until you find one that works. you'll see what I am talking about if you decide to try it.
I am no just trying to look at it from a starting point, being a fresh install, no install lilo, have your other distro use its grub to pick up slack ( as this is what I've have and still do without issues). Whence you've established that you can in fact get into Slackware then go from there, as personally I see no point in changing the kernel. but if you still want to then as in your other post you have been given advice on that already.
first things first you need to get into Slack via Grub, you have a dual boot, that is where the other Distro comes in to help you achieve your goal.
You wanted to know how I got Arch and Debian running in the same machine. Very simply: first I ran the Zen Installer from the USB stick and that gave a running Arch. Now I booted from a Stretch Debian iso image (stick) and that gave me a running (on the disk always) Debian, but Debian meddled with grub and as a result I was left without Arch. Alright. Then I ran the Zen Installer (of course this installs some sort of Arch) again and this time I could accsess both OS's. A pity the same does not happen with slackware. It's installer only offers lilo and so I have to skip the lilo setup, for the hd really is eMMC and lilo seems not to understand it. All right.
Lately, by advice of Volkerdi, I booted the slackware stick, immediately pressed Enter and then I was root. I did then a couple of things:
Code:
# mount /dev/mmcblk0p3 /mnt
# mount -o bind /dev /mnt/dev
# mount -o bind /proc /mnt/proc
# mount -o bind /sys /mnt/sys
# chroot /mnt
# . /etc/profile /* Just to feel comfortable in the new env.*/
Now I ran the initrd_command_generator.sh script, cd to /boot and ran the output line. That gave one of the drivers to drive the eMMC. Once all this done, I whent over to the grub question which,simple as it is (for my case) is still a stumbling block in my way.
Quote:
Originally Posted by BW-userx
I am no just trying to look at it from a starting point, being a fresh install, no install lilo, have your other distro use its grub to pick up slack ( as this is what I've have and still do without issues).
The other distro is Arch (or rather the Zen Installer) trying to use Arch to run grub is all we are speaking about. Though I did not test running the Zen Installer again with slackware in the other partition.
Quote:
Whence you've established that you can in fact get into Slackware then go from there, as personally I see no point in changing the kernel. but if you still want to then as in your other post you have been given advice on that already.
Please see what I said above. Slackware was running in memory (RAM).
Quote:
first things first you need to get into Slack via Grub, you have a dual boot, that is where the other Distro comes in to help you achieve your goal.
[/quote]
So you recognize I should now work with grub. But that's the subject matter of this thread!
OIC I did not know as you did not specify, that is the only OS you're working with. get supergrub2 burn it onto a different USB Stick , hopefully this is doable. Install Slack, skip lilo finish installing it, boot your system with supergrub2 and have it search your "hdd" for a bootable, or you could try this first, after you install slack, skip lilo, finish install, boot with your USB Stick again and it gives you an option to boot using that to kernel to mount your hdd then install grub when you inside of Slack on your "hdd" I think it is something like.
root=/path/to ro=rw
you should know where you installed root to during install, remember that because you're going to need to use that path to boot into your fresh install using the kernel on your USB Stick. the other part you have to write is shown during that process.
It seems there are only two files you can meddle with: /etc/default/grub and /etc/grub.d/40_custom. That's the reason why 09_slack_linux was no being read. Alright. Now suppose in 40_custom I write 'Do this' but the 30_os-prober section says 'Do not do this'. Which has precedence? There can be collisions of a 40_custom command and a 30_os-prober command???!!! This is a question.
how are you getting into it to mod files in grub.d ?
you can try this hack, just change the path to to reflect your system, and kernel as this is a "good working" grub.cfg and back up what you have then copy it over the other one. using your original as a guild line as well. do not generate a new one just mod it and use it to see if that will get you in. you'll need to know your UUID as well.
Code:
sudo cp grub.cfg grub.cfg.org
to back up your original one. then move or copy you hack over top of the other one.
Code:
#
# 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
load_env
fi
set default="0"
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=dejavusansmono
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 b735eacf-f619-406d-a995-d89b8083d086
else
search --no-floppy --fs-uuid --set=root b735eacf-f619-406d-a995-d89b8083d086
fi
font="/usr/share/grub/dejavusansmono.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
set timeout=10
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Slackware-14.2 GNU/Linux' --class slackware-14.2 --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-b735eacf-f619-406d-a995-d89b8083d086' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 b735eacf-f619-406d-a995-d89b8083d086
else
search --no-floppy --fs-uuid --set=root b735eacf-f619-406d-a995-d89b8083d086
fi
echo 'Loading Linux 4.4.118 ...'
linux /boot/vmlinuz-huge-4.4.118 root=/dev/sda5 ro
}
}
### END /etc/grub.d/10_linux ###
just make it match up to your system UUID and root
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.