How to install Slackware on HP Laptops - Envy and possibly others
by Ook from LinuxQuestions.org on (#6EEYH)
I was given an HP Envy laptop with Win11 installed. I wanted to install Slackware, which turned out to be very difficult. I eventually succeeded in doing so. This is what I did to get it to work.
tl;dr
First of all !!!WARNING!!!. If you attempt this and do not succeed, your laptop may no longer boot. Slackware won't run, and Windows may be gone. You should be able to reinstall Windows from scratch, but I can't guarantee that - it might be bricked. YMMV.
My Heartfelt Thanks to those that came before me and posted their struggles and solutions doing this, this is how I got it working. None of this is my original work, I just followed discussions until I finally cobbled together the steps to make it work.
There are a few things stopping this from working:
1) The Slackware install boot disk will not boot - it locks up shortly after loading initrd.img.
2) Once you get past the first problem, now you will find that the Slackware installer does not recognize the internal hdd/sdd drive(s). You cannot wipe the drive, delete partitions, format, etc. Nothing that I tried worked - gparted, fdisk, gdisk, etc.
3) Once you resolve the above and get Slackware installed, Slackware, as with the Install Disk, still doesn't boot but locks up shortly after loading initrd.img.
This is how I got it working. Note that I used a boot USB stick, not a CD/DVD.
1) Turn off secure boot in the BIOS if you have not already done so.
2) Set the slack boot disk to boot with grub instead of lili/elilo.
Instructions to do so are found here: https://www.linuxquestions.org/quest...re-4175671086/
I followed those instructions word for word and it worked perfectly. There is additional discussion in the thread, but the first post contains the instructions, and they worked perfectly for me.
This fixes the problem with the boot disk not booting. Now you can boot the install disk. You still can't setup your partitions.
3) Disable RAID in BIOS.
WARNING - This is the point of no return! If you do this:
a) You will no longer be able to boot to Windows, so if you are not successful finishing the install of Slackware, you may have bricked your laptop.
b) I can't find a way to revert these settings in BIOS. It appears to be a one-way change. I suspect there is an HP/Intel utility somewhere to reconfigure RAID. You could probably reinstall Windows without the RAID, but have not tried it.
Go into BIOS -> Configuration -> EUFI HII Configuration -> Intel(R) Rapid Storage Technology. At this screen, disable RAID. You want the drive to have a Status of Non-Raid. It will ask you if you really want to do this. If your BIOS settings are different, look around. You want to DISABLE Raid.
For some reason, the first time I did this it did not take. Save, exit, reboot, went back in and old settings were still there. Did it again. This time it worked. Go figure?
Now you should see normal drives. Mine is nvme0p1.
4) I used GPARTED to configure the drive because I could not do it from the slackware boot disk - it complained that the old settings were still in use, but after a reboot the old settings remained. Whatever remains on the disk still stops things from working. So I use GPARTED.
Boot laptop with Gparted boot disk and wipe the drive and setup your partitions. You also need to crate an EFI system partition as well as your data drive.
a) Wipe the drive. Remove partitions. Remove all existing partition tables via the Device menu.
b) Create a GPT partition table.
c) Create a 100MB partition of type fat32, format to fat32. Set the boot flag and eps flag. This will cause the partition to be recognized as EFI system/boot partition. If you don't do this, Slackware install will fail when it tries to install elilo. If the Slackware installation complains that there is no EFI partition, then you did not properly create the EFI partition. Try again. The above worked for me.
d) Create other partitions as desired, I created one data partition and a 4GB swap at the top of the drive.
5) Now we are ready to install Slackware. Boot from slackware boot disk/usb stick, and install slackware. Tell it to use elilo. DO NOT REBOOT OR SHUTDOWN after finishing the install. Instead exit to the console.
6) Lastly we have to set Slackware itself to boot with grub, not elilo. DO NOT SKIP THIS STEP. Follow these instructions when you exit the installer to the console:
Code:mkdir test
mount /dev/sda2 test
mount -o bind proc test/proc
mount -o bind sys test/sys
mount -o bind dev test/dev
mount /dev/sda1 test/boot/efi/
chroot test
grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda2.
The above comes from this thread: https://www.linuxquestions.org/quest...ck-4175719072/
I followed it exactly, and it worked.
Reboot and with a bit of luck, your laptop will now boot to Slackware.
The above worked perfectly for me. It may or may not work for you. YMMV.
tl;dr
First of all !!!WARNING!!!. If you attempt this and do not succeed, your laptop may no longer boot. Slackware won't run, and Windows may be gone. You should be able to reinstall Windows from scratch, but I can't guarantee that - it might be bricked. YMMV.
My Heartfelt Thanks to those that came before me and posted their struggles and solutions doing this, this is how I got it working. None of this is my original work, I just followed discussions until I finally cobbled together the steps to make it work.
There are a few things stopping this from working:
1) The Slackware install boot disk will not boot - it locks up shortly after loading initrd.img.
2) Once you get past the first problem, now you will find that the Slackware installer does not recognize the internal hdd/sdd drive(s). You cannot wipe the drive, delete partitions, format, etc. Nothing that I tried worked - gparted, fdisk, gdisk, etc.
3) Once you resolve the above and get Slackware installed, Slackware, as with the Install Disk, still doesn't boot but locks up shortly after loading initrd.img.
This is how I got it working. Note that I used a boot USB stick, not a CD/DVD.
1) Turn off secure boot in the BIOS if you have not already done so.
2) Set the slack boot disk to boot with grub instead of lili/elilo.
Instructions to do so are found here: https://www.linuxquestions.org/quest...re-4175671086/
I followed those instructions word for word and it worked perfectly. There is additional discussion in the thread, but the first post contains the instructions, and they worked perfectly for me.
This fixes the problem with the boot disk not booting. Now you can boot the install disk. You still can't setup your partitions.
3) Disable RAID in BIOS.
WARNING - This is the point of no return! If you do this:
a) You will no longer be able to boot to Windows, so if you are not successful finishing the install of Slackware, you may have bricked your laptop.
b) I can't find a way to revert these settings in BIOS. It appears to be a one-way change. I suspect there is an HP/Intel utility somewhere to reconfigure RAID. You could probably reinstall Windows without the RAID, but have not tried it.
Go into BIOS -> Configuration -> EUFI HII Configuration -> Intel(R) Rapid Storage Technology. At this screen, disable RAID. You want the drive to have a Status of Non-Raid. It will ask you if you really want to do this. If your BIOS settings are different, look around. You want to DISABLE Raid.
For some reason, the first time I did this it did not take. Save, exit, reboot, went back in and old settings were still there. Did it again. This time it worked. Go figure?
Now you should see normal drives. Mine is nvme0p1.
4) I used GPARTED to configure the drive because I could not do it from the slackware boot disk - it complained that the old settings were still in use, but after a reboot the old settings remained. Whatever remains on the disk still stops things from working. So I use GPARTED.
Boot laptop with Gparted boot disk and wipe the drive and setup your partitions. You also need to crate an EFI system partition as well as your data drive.
a) Wipe the drive. Remove partitions. Remove all existing partition tables via the Device menu.
b) Create a GPT partition table.
c) Create a 100MB partition of type fat32, format to fat32. Set the boot flag and eps flag. This will cause the partition to be recognized as EFI system/boot partition. If you don't do this, Slackware install will fail when it tries to install elilo. If the Slackware installation complains that there is no EFI partition, then you did not properly create the EFI partition. Try again. The above worked for me.
d) Create other partitions as desired, I created one data partition and a 4GB swap at the top of the drive.
5) Now we are ready to install Slackware. Boot from slackware boot disk/usb stick, and install slackware. Tell it to use elilo. DO NOT REBOOT OR SHUTDOWN after finishing the install. Instead exit to the console.
6) Lastly we have to set Slackware itself to boot with grub, not elilo. DO NOT SKIP THIS STEP. Follow these instructions when you exit the installer to the console:
Code:mkdir test
mount /dev/sda2 test
mount -o bind proc test/proc
mount -o bind sys test/sys
mount -o bind dev test/dev
mount /dev/sda1 test/boot/efi/
chroot test
grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda2.
The above comes from this thread: https://www.linuxquestions.org/quest...ck-4175719072/
I followed it exactly, and it worked.
Reboot and with a bit of luck, your laptop will now boot to Slackware.
The above worked perfectly for me. It may or may not work for you. YMMV.