LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   efi setup for windows10 and slackware (https://www.linuxquestions.org/questions/slackware-14/efi-setup-for-windows10-and-slackware-4175672020/)

jwc1936 03-26-2020 11:47 AM

efi setup for windows10 and slackware
 
I recently got a refirb desktop running windows 10 on a ssd (/devsda) with the idea of adding slackware 14.2-current. I also added a second ssd (/devsdb) on which I have successfully loaded slackware 14.2 current. Here is my problem:
When I shrunk the windows partition and added slackware on /dev/sda I used lilo instead of going through the efi routine. I learned my lesson and installed slackware correctly on /dev/sdb and I can boot to it now. But I now cannot boot to windows on the other disk. Here is the partition table /dev/sda:

1007.0 kb free space
1 350 mb Microsoft basic data
2 202 mb Microsoft basic data
940.0 kb free space
4 274.2 gb linux file system
3 750.0 windows re
1.2 Mb free space.


and question is two-fold:
1) It looks like it is ok to use the 1007.0 kb free space for the efi space, is that correct?
2) if I do that will I be able to boot to /dev/sda as well as /dev/sdb as I can now.

I know this is a mess and I can get by with using slackware only but I do occasionally have need for windows so it would be a convenience to be able to access it as well.
Thanks for your help, jwc

yancek 03-27-2020 09:05 AM

A default install of windows 10 will be UEFI. Did you check the partitions on the windows drive to verify that it is UEFI? Partitions 1 or 2 in the output you posted could be an EFI partition, verify that from a terminal as root with the command: parted -l That should tell you whether you have an EFI partition on the widows disk. Did you install Slackware on the 2nd disk as UEFI, using elilo rather than lilo? I haven't used lilo/elilo for years so I"m not sure but I know that a Legacy Grub will not boot an EFI install of windows so I expect that it would be the same for lilo.

phalange 03-27-2020 09:07 AM

So is the question about how to repair the windows drive? And do you mean you used eLilo for Slackware or Grub?

colorpurple21859 03-27-2020 09:14 AM

The windows recovery partition is larger than either one of the other windows partitions, there is something wrong with that, unless that is a typo error.
Quote:

windows 10 on a ssd (/devsda)
Here is the partition table /dev/sda:

1 350 mb Microsoft basic data
2 202 mb Microsoft basic data
3 750.0 windows re

jwc1936 03-27-2020 09:56 AM

Thanks for the inputs. I'm trying to answer all three with this one reply.

to yancek: Using parted -l as you suggest, on /dev/sda, Partition 1 (windows 10) is uefi, partition 2 is linux. But the first part of the partition table, just before the windows10 data, is free space, not uefi, as I think it should be. It is just big enough to make it uefi but I want to make sure that if I do that I won't lose the windows10 installation. I can always reinstall slackware, but not windows10. I used uefi for installation, using gfdisk, for slackware on /dev/sdb, it went smoothly and it boots. My problem is that, as of now, I cannot boot to either installation on sda.

to phalange: I'm trying to make windows 10 on sda1 bootable at the same time as linux on sdb. I think the problem is that the empty space on /dev/sda1 should be uefi and I want to be sure that if I do that to the system as it is I will lose the windows10 that is already installed.

to colorpurple: my bad, the unit for windows re should be kb, while the others are mb.

To everybody: right now I can only boot slackware on /dev/sdb. If I fix the uefi problem on /dev/sda what will happen when I boot? Will both disks be recognized or not?

Thanks again, jwc

VicFer 03-27-2020 11:38 AM

I did something similar in the past on an ASUS notebook with Windows 8.
I shrank the Windows partition on the HDD in order to make room for Slackware and then I installed it (it was 14.2 IIRC).
After that I was able to boot Windows or Slackware but I had to intercept the boot menu by tapping ESC at the very first seconds after power ON if I needed to change the OS to boot with. Not the easiest way but it did work for me because I did boot Windows very rarely.
I suppose there are other solutions but maybe it worth a try.

Bye

jwc1936 03-27-2020 11:47 AM

dear VicFer, thanks for the suggestion. I have some other irons in the fire right now but I'll give your method a try if they don't work.
Best, jwc

colorpurple21859 03-27-2020 11:48 AM

Boot into slackware and post the output of
lsblk -f

jwc1936 03-27-2020 12:38 PM

colorpurplw21859, here is the requested output of lsblk -f (sda is the windows/slackware ssd and sdb is the slackware only ssd)
The headings are: Name Fstype Fsver Label UUID
under sda:
--sda1 ntfs System 40844ED7844ECF5A 322.1M 8% /Windows
--sda2 ntfs Windows 1ED44F47D44F207F 169.2G 16% /mnt/sda2
--sda3 (no entry on this line)
--sda4 ext4 1.0 1d14aa59-eefc-4936-87db-b9c8ca0bafc7 (this is the slackware part, I don't know why the size isn't given)

under sdb:
--sdb1 vfat FAT32 0A9C-1C89 83.1M 16% /boot/efi
--sdb2 ext4 1.0 203d3c48-8cc1-43a5-b45b-bcb2308bd21d 414.9G 4% /

I booted from /dev/sdb because I can't boot from sda

jwc

PS I had to type all this in because I couldn't figure out how to copy and paste from the original)

captain_sensible 03-27-2020 01:23 PM

1 Attachment(s)
@jwc1936 is 1000kb enough for efi - no 1000kb is circa 1mb

Mr V recommends 100mb, I got i new laptop that had windows 10 using efi. In my haste i wiped everything including the efi; but put efi partition back. Recommended is 100Mb of type EF00

[QUOTE]
But I do want to use UEFI, and keep my existing Windows installation!

Great! First things first. You'll need to enter the UEFI menus and
disable Secure Boot, since Slackware does not currently work if Secure
Boot is enabled. Windows will continue to work fine without it.
[QUOTE]


So i am using ELILO but i went into bios and opted for legacy boot.


When you have things set up and slackware installed just re-running elilo should pick up windows (if you really need it) probabably by

$ ->su-># eliloconfig

yancek 03-27-2020 01:27 PM

The info in your last post shows the Linux drive with an EFI partition. The windows drive does not show an EFI partition. Not sure why you can't copy and paste as it basically works the same on any computer or OS. Doing that would give more accurate infomration. I don't use elilo but I expect that if it works the same as Grub, you will not be able to boot windows from the Slack install as you mixed Legacy and UEFI installations so the only way to boot is to select from the BIOS firmware on boot and make the change to windows and when you want, make the change to Slackware.

It's surprising that windows 10 isn't (at least doesn't appear to be) an EFI install. Was this an upgrade from windows 7?

jwc1936 03-27-2020 02:29 PM

yancek, No, the pc came with windows 10 on the disk. I shrunk the windows partition and then botched the linux install by using lilo instead of doing a uefi install. That is what I am trying to correct. Since I have slackware on the other disk (/dev/sdb) I can do without the slackware partition on /dev/sda but I still need to install a efi partition on /dev/sda. What I don't know is whether that needs to be the first part of the disk or if it can be anywhere. If it can be anywhere I can just blow away the slackkware part and install it there. Would that work?

colorpurple21859 03-27-2020 03:36 PM

boot into slackware open a terminal as root
Code:

mount /dev/sda1 /mnt
post the output of
Code:

ls -R /mnt

jwc1936 03-28-2020 09:24 AM

colorpurple21859, I ran the above command and put the results in a file called windows-file but my attempt to provide a link to the file failed. Any advice on that score would be appreciated.
Jwc

RadicalDreamer 03-28-2020 10:05 AM

Repairing Windows boot.
https://hetmanrecovery.com/recovery_...oot-loader.htm

rEFInd rules
https://www.rodsbooks.com/refind/
https://slackbuilds.org/repository/14.2/system/rEFInd/
have to run
Code:

sh /usr/share/refind-0.11.5/refind-install
to install it.

Update Kernel, run eliloconfig, set efibootmgr to rEFInd.. done. Also the bios probably has boot options and UEFI boot options would be shown there.
Maybe consider creating a Slackware USB boot disk with a usbboot.img found on a Slackware mirror
and reinstall windows with this: https://www.microsoft.com/en-us/soft...d/windows10ISO


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