From Newsgroup: alt.os.linux.slackware
On Wed, 5 Mar 2025 13:55:47 -0800, The Real Bev wrote:
Nothing works...
I am trying to install 15.0 on a USB stick that is
to be used to boot into system which requires UEFI
boot. Before the install, I prepared the USB stick
with three gdisk partitions:
P1:500 mb EFI system file type ef00
P2:3GB BIOS boot system type ef02
P3:111Gb linux file system type 8300
The target system is a lenovo ideapad, on
which I booted into the 15.0 install USB.
The target USB was also plugged into the
laptop.
The target USB came up as /dev/sda with the
three partitions, and the USB install came
up. After booting into the install I ran
setup and set the target to /sda3.
I chose full install and let the process run.
When it came to a boot stick I declined.
When it came to installing lilo I declined.
I set up for Network Manager.
I chose the time zone
Upon completion I chose EXIT from the
install menu and dropped into a shell.
mount revealed that sda1 was mounted as was sda3.
I did chroot /mnt /bin/bash
then:
source /etc/profile
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
I got back: this doesn't look like an EFI directory to me and the install failed.
I went ahead with the grub-mkconfig anyhow.
I then exited the install and removed both USB sticks
from the laptop.
I took the two sticks and inserted them into another
computer.
I mounted the install USB and the target USB.
I verified that the install USB had /EFI.
I repeated the post install procedure and, again,
got the "doesn't look like an EFI directory to me.
The only thing I can think that went wrong is the
original install did not copy over the EFI material.
The install recognized that there was an EFI partition
on the target USB, but I never saw a message that it
was formatted vfat, or that anything was written to it.
What step(s) am I missing in the install? Is there anything
I can do to recover when I have the fully-installed USB
stick without going through the entire install process again?
Well, I got success!
But I'm not doing the same thing as you. Here's what I accomplished:
-I revised my script called "install" and some scripts and one function that it calls. These all belong to my SAM menu called Zombie--which I hope to release soon as a library. Script install uses rsync to clone a reference Slackware installation and then tweaks it to make changes needed for good behavior when installed to a flashdrive, plus some other helpful tweaks as well.
-Using my revised Zombie menu I installed ZombieSlack/Slackware-15.0 to a GPT partition on a flashdrive, making it EFI-bootable in the process. It took two tries to get the code right, but in the end it worked. I'm using it now to post this. I just plugged the flashdrive into my old Prodesk tower and booted the UEFI entry. Note that this is real Slackware, *with* persistence.
To answer your question about what you can do:
-I would guess that you can just run grub-install again until you get it right, without re-installing Slackware. That's what I did, anyway.
-Note that I did *not* use chroot. Here is the grub-install invocation that I used in my script.
grub-install --recheck \
--boot-directory /mnt/to/boot \
--removable \
--target x86_64-efi \
--efi-directory /mnt/EFI_install \
--bootloader-id grub \
$1
I gave "/dev/sdd" for "$1", as that's what the flashdrive happened to be when I ran the script. The flashdrive had a gpt partition table and four partitions (I used parted):
# f.s. mounted GB flags
1 ext2 /mnt/to 23
2 ext2 /mnt/keep_install 0.5
3 swap 1.0
4 fat32 /mnt/EFI_install 0.2 boot, esp
Let me say that this was just a "first success", so maybe there's a better way to do it.
Good luck to you!
-Joe
P.S. I used the "tips" you provided, prior experience, plus this website:
https://linuxlink.timesys.com/docs/engineering/wiki/HOWTO_Install_GRUB2_with_EFI_support
--- Synchronet 3.21d-Linux NewsLink 1.2