Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I've taken one thing too many for granted, it seems, and locked myself out of linux on my box. This post is coming to you courtesy of what I'm highly prejudiced against - m$ windows 11 . Now, my problem
The EFI partition (which is windows writable) has the partitions
Code:
EFI |
| - Boot
| - Microsoft
| - Slackware
It defaults to Slackware. But I tweaked elilo.conf and now it won't boot, and gives no error. So I pulled my liveslak usb key but that won't boot either. I made it new, tested it and it was fine. Now, nothing. I go through the menu, and when it can't find init, so it isn't mounting /. Can I edit Slackware\elilo.conf from win 11 and if so how?
Does your liveslak not boot with the error 'can't find init'? Which 'menu' are you referring to?
The link below is to the microsoft site explaining using bcdedit to modify UEFI entries. I don't see anything there that indicates it can modify non-windows entries. I didn't go through all the links on the page but you might take a look and see if there is anything helpful.
The EFI partition isn't visible from the file manager in windows but you can access it from Disk Management. Explained in the link below but there is no explanation of how/if you can edit entries. It's a windows filesystem so I would expect there would be some way but have never done it myself. The link below also explains how to use a command prompt in windows to access the partition so perhaps using a windows text editor here would work??
Does your liveslak not boot with the error 'can't find init'? Which 'menu' are you referring to?
I think I've exhausted my liveUSB otions. On my PC, I edited the grub menu and added 'root=/dev/sdb3' and got the "Can't find init' error. It's actually 'Can't load /sbin/init', around when it mounts / read only.
I gambled on being able to hold my retired laptop, ressurrected that, and tested the live usb, whish showed faults. I built it afresh from backups, but it seems like it's the end of the road for that particular usb drive. It's just got too many reformat & refill cycles on it.
Quote:
Originally Posted by yancek
The link below is to the microsoft site explaining using bcdedit to modify UEFI entries. I don't see anything there that indicates it can modify non-windows entries. I didn't go through all the links on the page but you might take a look and see if there is anything helpful.
The EFI partition isn't visible from the file manager in windows but you can access it from Disk Management. Explained in the link below but there is no explanation of how/if you can edit entries. It's a windows filesystem so I would expect there would be some way but have never done it myself. The link below also explains how to use a command prompt in windows to access the partition so perhaps using a windows text editor here would work??
Thanks for the links. The stuff I found was for editing windows boot entries from windows. Of course if the efi stuff needed editing, you wouldn't be able to get into windows If I can get a prompt or navigate the file/open menus, I should be fine - even in windows
What's irritating is that I have a sata disk in there also which should boot, but I haven't got it showing in the EFI menu.
Not a slack user, but came across your post in LQSpy and maybe some generic troubleshooting can help:
It won't boot with no error? Nothing on the screen at all?
If you can boot Windows and liveSlack at (least past the bootloader stage, which it seems is happening), your problem isn't EFI itself. Try another USB drive.
It is odd that when you specified root= that you'd still get that init error as you have booted to that point as you're not using your broklen bootloader. Did you install on a FS that liveSlack doesn't support OOB? Edit: on second thought, this is probably a kernel version mismatch. liveSlack boots its kernel, but your install may be using a different version, therefore the kernel can not find it's modules in /lib/modules, can't mount root, and you get that error.
If you press F9 or F12 which are the usual keys for bringing up the EFI boot menu, does Slackware show? If so, your EFI entry _may_ fine (see below), move on to the actual bootloader files.
If you can get a live distro working, at a shell prompt, type
Code:
efibootmgr -v
You should see the entries, look for something like
HD #1, GPT partitioning, a152xxx... is the partition UUID (lsblk -o PARTUUID) of the EFI boot partition. All of that needs to be correct. The last two numbers I am unsure of what they are, but they are the same on ALL of my installed entries (Windows, openSUSE, OpenCore). So perhaps a device or bus id.
As far as the SATA not showing, that's because it hasn't an entry in NVRAM. If it was bootable, and has an EFI folder, you could disable the non-booting drive and copy the contents of the EFI bootloader folder (for example \EFI\SLACKWARE) to \EFI\BOOT. \EFI\BOOT is supposed to be the fallback if there's no working entry found in NVRAM.
Edit 2:
You could also add it to the NVRAM:
Code:
efibootmgr --create --gpt (if GPT) --label name --disk /dev/sdXX --partition (partition number for the EFI system partition, 1 based) --loader (path_to_loader, ex: \EFI\linux\boot_x64.efi)
I have my ancient laptop booting. In an attempt to get my sata disk into play, I have somehow upset the boot priority, and currently nothing works. I see the MSI logo on boot up. I can't even get into the BIOS! I felt it might select sata by default if I removed the NVME, but I can't do that as one of my arms is paralyzed. The thing that is supposed to exit you from the BIOS now doesn't. I have a decent keyboard/mouse, but if I try to use them in the laptop, it fails. The bit of the tracker pad that controls the scroll refuses to. But if I try and type the screen scrolls all over.
In short, I feel like I'm in the Twilight Zone or the Bermuda Triangle. Fagan in the Movie 'Oliver' has this song near the end, where nearly every verse ends "I think I'd better think it out again!" I'm coming up for air, trying to civilize the BIOS, and we'll go from there.
If you can't even get into the bios - and you're having issues with hardware - it sounds like something was already on the way out, and your messing around with ELilo was just unfortunate timing and has nothing to do with your problem.
Open cmd with administrator privileges, use diskpart to select disk, list volume, select volume <number> of efi partition, assign an unused letter, exit, cd to slackware and use notepad from cmd to open elilo.conf
Last edited by colorpurple21859; 05-05-2023 at 12:41 PM.
If you can't even get into the bios - and you're having issues with hardware - it sounds like something was already on the way out, and your messing around with ELilo was just unfortunate timing and has nothing to do with your problem.
Well, some of that. The box is new, this year's. Since everything peripheral around here was dying. I pulled out a wired usb keyboard, and that works. The keyboard batteries had also chosen that particular moment to die! So my BIOS is back. I pulled out my lowest mileage sdcard and adapter and tried that burned as yet another liveslak usb. No dice. My backup liveslak may be AWOL, which would explain the usb failures. I had only shoved on 2 disk images on that particular sd card, so that would be a quick death indeed.
Next try will be a slackware-15.0 install iso, because if that boots I can mount my root partition, and chroot to it. Then attach the EFI partition and hopefully make the one necessary edit in elilo.conf. Then, buy some usb keys, and stop fixing stuff for a while.
FTR, m$ don't acknowledge the existence of other OSes in their documents. That's probably wise, given the average technical ability & IQ of their users. Diskpart is a piece of commercial software, from what I gather, a sort of fdisk on steroids. And the win 11 command prompt run as administrator seems very toothless indeed. There's no editor in Diskpart.
you don't use diskpart to edit a file, you use it to assign a drive letter to the efi partition so it can be accessed, quit diskpart, and type notepad to open notepad editor
Open cmd with administrator privileges, use diskpart to select disk, list volume, select volume <number> of efi partition, assign an unused letter, exit, cd to slackware and use notepad from cmd to open elilo.conf
I had sent my last post before I saw this.
Thanks very much for the reply. As soon as I read this, I had myself sorted myself out in 5 minutes. I didn't know diskpart was part of windows 11. When you're sent to 'diskpart.com' I presume commercial. You were even kind enough to use the exact diskpart commands in telling me what to do. The only place that came unstuck was (after Ihad selected my EFI partition) assigning a letter to the EFI partition. The syntax there was
assign letter=M
That letter now shows in the file/open menu of notepad.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.