Slackware - Installation This forum is for the discussion of installation issues with Slackware. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
04-04-2020, 12:00 AM
|
#1
|
LQ Newbie
Registered: Apr 2020
Location: Argentina
Distribution: Slackware!
Posts: 17
Rep: 
|
Finishing a slackware-current install on mmcblk device with UEFI
Hi all.
I have been using Slackware since many years (I think I used it first back in 1997), version 3, 7, 10, 11, 13 and now 14. What I love about it is they didn't changed the install procedure too much (iow: still console and still the same installer philosofy).- Over the years I followed the standard procedure (with a few modifications like not setting up a swap partition in favor of a swap file) and had no problems.
Today I have downloaded Alienbob current iso, dd it to a usb stick and I was able to install it on a cheap Chinese notebook (almost no brand name, can provide details of it if you need it), which only has UEFI boot and hard disk is /dev/mmcblk0
erased the partitions (it had Win10) and created the new ones: 100M for EFI and the rest for the Linux. then mkfs.vfat /dev/mmcblkp0p1
Installation went no problem with the sole exception of eliloconfig. During the setup process, when asked to install a boot menu entry, a line appears at the bottom saying "Could not prepare Boot variable: Success".
rebooted, then I was drop into EFI shell, which turns out is just a glorified modified MS-DOS shell. so I did
fs0:
cd EFI
cd Slackware
type elilo.conf
Quote:
chooser=simple
delay=1
timeout=1
#
image=vmlinuz
label=vmlinuz
initrd=initrd.gz
read-only
append="root=/dev/mmcblk0p2 vga=normal ro"
|
then I ran elilo.efi which boots linux
kernel loads then during the kernel boot it drop an error:
Quote:
mounting /dev/mmcblk0p2 on /mnt failed: no such File or directory
|
after that it says "No /sbin/init found on rootdev
I'm drop on a rescue shell but no /dev/mmcblk0 device is present. Tried to cheat using mknod but didn't work ( fdisk /dev/mmcblk0 it says cant open device) also tried modprobe mmc_core, no luck.
after reading a lot about UEFI installs and mmcblk, and since it is my first time dealing with a UEFI only computer, I decided to create a VMware with UEFI boot and did a normal install and everything was fine, and just to be sure it wasn't a setup problem.
can someone point me out what I am missing to make it boot completly ? *(I dont mind the EFI shell issue for now, unless I'm missing something important)
thanks in advance
|
|
|
04-04-2020, 01:34 PM
|
#2
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,418
|
First of all, we need more info on your box - as much as you have.
For UEFI on which I am no expert,I think you need 3 partitions, EFI, /boot, & /
Exactly what goes on them I don't know, but that's easily googled.
|
|
|
04-04-2020, 01:53 PM
|
#3
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,809
|
Quote:
For UEFI on which I am no expert,I think you need 3 partitions, EFI, /boot, & /
|
Two minimum, the efi partition for the efi bootloader and the / partition.
Maybe a driver for the mmcblk is missing from the kernel. an initrd may be needed.
Last edited by colorpurple21859; 04-04-2020 at 02:01 PM.
|
|
|
04-04-2020, 02:34 PM
|
#4
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,418
|
There is another feature. On boot, it's your bios talking to the sdcard reader. As soon as linux takes over, all sdcard drivers will all fall down, because they expect to be loaded after usb drivers, not before. So their code will be handing usb transactions to a usb driver which may not be loaded yet.
|
|
|
04-04-2020, 04:15 PM
|
#5
|
LQ Newbie
Registered: Apr 2020
Location: Argentina
Distribution: Slackware!
Posts: 17
Original Poster
Rep: 
|
Quote:
Originally Posted by colorpurple21859
Two minimum, the efi partition for the efi bootloader and the / partition.
Maybe a driver for the mmcblk is missing from the kernel. an initrd may be needed.
|
just built an initrd.gz on the virtual machine.
mkinitrd -m mmc_core
copied to a pen drive
then on the notebook, booted with the installer
mkdir linux
mount /deb/mmcblk0p2 /linux
mount /deb/mmcblk0p1 /linux/boot/efi
cd /linux/boot/efi/EFI/Slackware
mv initrd.gz initrd.gz.old
cp /pen/initrd.gz .
kernel boot says loading kernel modules from initrd.gz but error message stays the same
after that I repeated mkinitrd on the virtual machine, added -m mmc_core,mmc_block, same result but with the addition of keyboard freeze (or kernel hung)
about the computer, a kernel error says: hardware name Advantec CX23200W/Cherry Trail CR. Couldn't find on the net which kernel modules are really needed for this.
thanks again.
|
|
|
04-05-2020, 03:45 AM
|
#6
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,418
|
Frankly, I don't think you'll get away with grub or an initrd.
If you're want to give it what I think is your best shot, compile in your filesystem module, xhci_hcd and your sdcard reader module.I would dd that to the / (presuming it's mmcblk0p1 - EFI, & mmcblk0p2 - /) and hope the Bios gets you there. If the BIOS is uefi compliant, it has to get you past the partition table. mmcblk0p1 should be formatted FAT, incidentally.
|
|
|
04-05-2020, 06:37 AM
|
#7
|
Member
Registered: Oct 2005
Location: Connecticut USA
Distribution: SalixOS
Posts: 206
Rep: 
|
From your opening post, you appear to have two problems. The first is an uefi booting problem with the menu entry that was created (or attempted to be created) during the Slackware install. Dropping into UEFI shell is normal behavior for the uefi firmware if it cannot find a valid menu entry to boot. Since you have a workaround using the UEFI shell for this I would ignore it for now since most likely it due to some quirk in the uefi firmware.
The second problem is that there is a mounting issue with the slackware root file system during booting of the installed Slackware. For some reason its being mounted on /mnt instead of /.
Code:
mounting /dev/mmcblk0p2 on /mnt failed: no such File or directory
I'm not sure why this is happening, but I suggest your try chrooting into your Slackware install on /dev/mmcblk0p2 and rerun eliloconfig.
Once you get a working slackware install then you can resolve the uefi menu problem.
|
|
|
04-05-2020, 09:30 PM
|
#8
|
LQ Newbie
Registered: Apr 2020
Location: Argentina
Distribution: Slackware!
Posts: 17
Original Poster
Rep: 
|
solved the task but not the problem.
Quote:
Originally Posted by business_kid
Frankly, I don't think you'll get away with grub or an initrd.
If you're want to give it what I think is your best shot, compile in your filesystem module, xhci_hcd and your sdcard reader module.I would dd that to the / (presuming it's mmcblk0p1 - EFI, & mmcblk0p2 - /) and hope the Bios gets you there. If the BIOS is uefi compliant, it has to get you past the partition table. mmcblk0p1 should be formatted FAT, incidentally.
|
ty for your replies. It doesn't have bios emulation, just UEFI. I did read the posts you made before but since I have little info of this particular hardware it was hard for me to search on google for the propper modules. I was considering compiling a kernel (I have done it in the past but I'm not a fan of it because if you need to move the disk to another computer it may not boot) but without knowing which options I should enable, I realized I was going to get into a lot of trials until I get it to work. Also I did formated mmcblk0p1 as vfat.
My last try was to create a initrd using the modules loaded from the installer kernel, but it also failed.
I think I'm missing some more important and I guess I will have to read kernel docs.
Quote:
Originally Posted by laprjns
From your opening post, you appear to have two problems. The first is an uefi booting problem with the menu entry that was created (or attempted to be created) during the Slackware install. Dropping into UEFI shell is normal behavior for the uefi firmware if it cannot find a valid menu entry to boot. Since you have a workaround using the UEFI shell for this I would ignore it for now since most likely it due to some quirk in the uefi firmware.
The second problem is that there is a mounting issue with the slackware root file system during booting of the installed Slackware. For some reason its being mounted on /mnt instead of /.
Code:
mounting /dev/mmcblk0p2 on /mnt failed: no such File or directory
I'm not sure why this is happening, but I suggest your try chrooting into your Slackware install on /dev/mmcblk0p2 and rerun eliloconfig.
Once you get a working slackware install then you can resolve the uefi menu problem.
|
ty for your reply. As far I could get in that kernel rescue shell, /dev/mmcblk0 was missing. I tried to create it even with the modules loaded but no luck.
Also I remember I did tried to run eliloconfig after chroot from the installer shell but couldnt get it to work either. (yes I did mounted proc and sys under chroot). By "coulnd't get it to work" I mean I gave me an error about the menu entry like I said in my first post, but that's all.
Later I also tried slackware-current live from usb, using the iso2usb.sh from Alienbob, screen went blank when selecting the first option and computer hang.
I wish I could provide more hardware info. If it were my hardware I would have trashed it, and since its going to be used for very simple tasks (just a web browser and a libreoffice package with a few documents) I ended up installing ubuntu on it : asked installer to wipe entire partitions and everything went fine. I'm not exactly an ubuntu fan.
even if I have solved my problem at hand I will not mark this as solved because I'm pretty sure I will run into a similar problem some day.
thank you again.
Last edited by rudymartinx; 04-05-2020 at 09:32 PM.
Reason: fix minor mistake on efi partition mention
|
|
|
04-06-2020, 04:25 AM
|
#9
|
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 17,418
|
Quote:
mounting /dev/mmcblk0p2 on /mnt failed: no such File or directory
|
In an install, / is the dvd, or usb is and it has a small basic system. Mounting on /mnt is good, because it can use commands like 'installpkg ROOT=/mnt <blah>' and run your install from there.
|
|
|
04-06-2020, 02:55 PM
|
#10
|
LQ Newbie
Registered: Apr 2020
Location: Argentina
Distribution: Slackware!
Posts: 17
Original Poster
Rep: 
|
Quote:
Originally Posted by business_kid
In an install, / is the dvd, or usb is and it has a small basic system. Mounting on /mnt is good, because it can use commands like 'installpkg ROOT=/mnt <blah>' and run your install from there.
|
since I can't copy/paste another computer screen I had to type it by hand. There's a chance I could have made a mistake, but I believe that's indeed what I copied from the installed kernel messages during a booting test.
thank you anyway for the pointers.
|
|
|
04-06-2020, 04:48 PM
|
#11
|
Member
Registered: Nov 2018
Distribution: Slackware
Posts: 906
|
The init script in slackware's initrd mounts the root device (the line passed by root=/dev/mmcblk0p2) on /mnt and then change_root's into the /mnt directory to finish booting the system from the init program on the disk. At least that's the way its supposed to work when booting with an initrd. I'm guessing since you don't have the proper modules loaded the mount command fails, and then it fails at finding init.
What happens when you try loading the huge kernel, without an initrd?
You could try that by changing your elilo.conf line to "image=vmlinuz-huge" and delete the "initrd=" line. If that boots and you still want to try the generic kernel then you could poke around with the /usr/share/mkinitrd_command_generator.sh script in slackware to find out what drivers you need to boot from an initrd.
|
|
|
04-07-2020, 03:38 PM
|
#12
|
LQ Newbie
Registered: Apr 2020
Location: Argentina
Distribution: Slackware!
Posts: 17
Original Poster
Rep: 
|
going to give it another try and see what happens.
Quote:
Originally Posted by 0XBF
The init script in slackware's initrd mounts the root device (the line passed by root=/dev/mmcblk0p2) on /mnt and then change_root's into the /mnt directory to finish booting the system from the init program on the disk. At least that's the way its supposed to work when booting with an initrd. I'm guessing since you don't have the proper modules loaded the mount command fails, and then it fails at finding init.
What happens when you try loading the huge kernel, without an initrd?
You could try that by changing your elilo.conf line to "image=vmlinuz-huge" and delete the "initrd=" line. If that boots and you still want to try the generic kernel then you could poke around with the /usr/share/mkinitrd_command_generator.sh script in slackware to find out what drivers you need to boot from an initrd.
|
Thank you for your reply. What I understand from what are you telling me, the installed kernel is not the huge and that's new to me. Also I totally forgot/missed to mention the init error.
I'm about to give it another try to see what happens (at least I know I can make it work with ubuntu but I like more slackware's defects than ubuntu's virtues).-
thank you again.
|
|
|
04-07-2020, 03:49 PM
|
#13
|
LQ Newbie
Registered: Apr 2020
Location: Argentina
Distribution: Slackware!
Posts: 17
Original Poster
Rep: 
|
also: in case it doesn't work, I don't mind if I have to chroot the installed partition and build a kernel, but I would like to know which options I should look for.
|
|
|
04-07-2020, 04:39 PM
|
#14
|
Member
Registered: Nov 2018
Distribution: Slackware
Posts: 906
|
Quote:
Originally Posted by rudymartinx
Thank you for your reply. What I understand from what are you telling me, the installed kernel is not the huge and that's new to me. Also I totally forgot/missed to mention the init error.
I'm about to give it another try to see what happens (at least I know I can make it work with ubuntu but I like more slackware's defects than ubuntu's virtues).-
thank you again.
|
Usually slackware comes with the huge and generic kernel so you should have both in your /boot directory from the install. "vmlinuz" is just a link to one of these, usually the huge AFAIK. You could try leaving that as-is and removing the initrd line from your elilo.conf first. Huge kernel should have all modules built in so its good to try that first. If its still having troubles then you might have to go with the initrd to get the right drivers loaded first. I don't have any machines with "mmcblk" devices so I'm not 100% sure whats needs to be loaded for them.
|
|
|
04-07-2020, 05:32 PM
|
#15
|
LQ Newbie
Registered: Apr 2020
Location: Argentina
Distribution: Slackware!
Posts: 17
Original Poster
Rep: 
|
I MADE IT !!!!
Quote:
Originally Posted by 0XBF
The init script in slackware's initrd mounts the root device (the line passed by root=/dev/mmcblk0p2) on /mnt and then change_root's into the /mnt directory to finish booting the system from the init program on the disk. At least that's the way its supposed to work when booting with an initrd. I'm guessing since you don't have the proper modules loaded the mount command fails, and then it fails at finding init.
What happens when you try loading the huge kernel, without an initrd?
You could try that by changing your elilo.conf line to "image=vmlinuz-huge" and delete the "initrd=" line. If that boots and you still want to try the generic kernel then you could poke around with the /usr/share/mkinitrd_command_generator.sh script in slackware to find out what drivers you need to boot from an initrd.
|
I did what you suggested but no luck (still the same errors with the huge.s, with or without initrd generated from the install disk). Scrolled up the kernel messages and I saw mmc_core being using insmod. Rescue shell shows it too and it also states its being used by sdhic, mmc_block (which I suspect its missing during boot) and sdhcpi_api.
Had to delete the grub efi section installed by ubuntu to be able to boot using efi shell because grub shell seems more obscure to me. New EFI entries shows on computer setup, I guess I will have to find a way to delete them later.
after many tries what I did was:
chroot /dev/mmcblk0p2 from install disk:
Quote:
mkdir linux
mount /dev/mmcblk0p2 /linux
mount /dev/mmcblk0p1 /linux/boot/efi
chroot linux
|
rebuild initrd including mmc_block which added mmc_core
copied /boot/vmlinuz-huge to efi slackware directory
modified elilo.conf as you suggested but included initrd:
image=vmlinuz-huge (copied from /boot)
initrd=initrd.gz (copied from /boot)
edit: by the time I have rebuild initrd there was an initrd-tree, I guess it was left by the installer, which missed to include the mentioned module.
now whats left is to solve the efi shell problem.
thank you!
Last edited by rudymartinx; 04-07-2020 at 05:34 PM.
Reason: added comment about initrd
|
|
|
All times are GMT -5. The time now is 08:40 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|