LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Cannot boot from SATA drives. (https://www.linuxquestions.org/questions/slackware-14/cannot-boot-from-sata-drives-4175592990/)

PhiloPolyMath 11-05-2016 06:51 PM

Cannot boot from SATA drives.
 
Ok I have a weird one for you guys and gals.

I have a desktop I built myself with intel processor and nvidia graphics card. I have an ssd for booting and an hdd for home. I had Debian with UEFI running fine originally and then I switched to Slackware a couple years ago. It's been running fine for the most part when I haven't done something stupid. (This may be another one of those times).

I also have a Thinkpad X220 that I like to run OpenBSD on. I decided I was going to pick up a little SSD and throw it in the desktop to mess around with OpenBSD on better hardware and play with some snapshots (essentially their version of -current). I used dd to make a bootable usb for the OpenBSD install, shut down my machine, unplugged it, installed new hard drive in a cage, and even disconnected my linux drives to make sure I didn't screw anything up with them. The install went as expected. No issues from the installer. However, when I went to boot up my machine freezes at the BIOS logo. It does that as long as the drive with OpenBSD installed is plugged in.

Now, I decide to power down and plug my linux drives back in and I disconnect the BSD drive. When I boot up my motherboard comes back with "reboot and select proper boot device". If I reboot with a puppy linux usb I keep around for such issues I can mount all linux drives and partitions and see that I have a proper boot partition with my efi config setup just as it should be. I'm not sure what is going on here or where things could have gone awry.

Edit: So my Puppy Linux USB can boot fine but when I found my old Slackware install thumb drive it says that this isn't valid to boot from either.

Edit 2: So I used the same thumb drive that I previously used to install 14.1 and dd'ed 14.2 iso to it. It will not boot. I tried using the usbboot.img approach. It will not boot. I'm not sure what the hell happened to my motherboard to start rejecting everything but puppy linux.

STDOUBT 11-05-2016 10:35 PM

Not sure about the OpenBSD SSD drive, but one thing to note is you need to run "isohybrid" on the Slackware *.iso in order to "dd it" to a USB stick.

bassmadrigal 11-05-2016 10:48 PM

Quote:

Originally Posted by STDOUBT (Post 5627480)
...but one thing to note is you need to run "isohybrid" on the Slackware *.iso in order to "dd it" to a USB stick.

This is not the case with any official ISOs from 14.1 and newer. The have already had isohybrid run on them. Erik's ISOs also are already processed by isohybrid. But, if you use his mirror-slackware-current script to create the iso, you need to run isohybrid on the resulting ISO or pass "-u" to the script to have it done for you.

PhiloPolyMath 11-06-2016 08:34 PM

Ok, finally fixed it. I don't know what happened to my EFI partition but it must have gotten messed up somehow. I'm not sure exactly how since the drives containing that partition were disconnected during the OpenBSD install but here it goes:

I was finally able to get a 14.2 thumb drive made that would boot. I don't know what the hell was going on with the previous 14.1 thumb drive that I used to actually install Slackware in the first place. I dropped to a shell, mounted my EFI partition, and followed the directions in the link below to create a /boot/efi/EFI/boot/ directory and copy over the appropriate elilo.conf, initrd, generic kernel, and renamed the elilo.efi file to bootx64.efi. After that it seemed to work. Not sure why, but I'll take it.

http://docs.slackware.com/howtos:sla...uefi_and_elilo

Edit: So after looking at the link I provided a little closer and seeing that the CMOS battery being replaced can cause this it has me thinking. I disconnected all power to the desktop before disconnecting the drives and before plugging the new drive in. I'm wondering if my battery has gone bad and when I disconnected power it reset my UEFI settings. Anyone have any thoughts?

aqrwsftj 11-12-2016 10:38 AM

Exactly the same thing just happened to me. I unplugged my drive with debian on it (to ensure no accidents or ambiguity) to experiment with openbsd 6.0. I dd'd install.fs (openbsd installer) to a usb drive and installed on a sata drive. Interesting experience, but upon loading I found it had no desktop environment, so to speak (I'm from windows and will have to keep learning before I can use it). I unplug the openbsd drive and plug my debian drive in, and when I start up I get "reboot and select proper boot device". I'm messing around with BIOS settings and unplugging unneeded devices for 20 mins wondering what happened, turning UEFI on and off. I assumed the openbsd installer must have altered the bios somehow so I reset to optimised defaults, then cleared the bios with the jumper, then reflashed the bios (because someone on another forum said updating their bios fixed a similar issue after a openbsd install).

Found this thread with google and did a grub efi reinstall as described in the debian wiki and instantly fixed.

I sure would be interested to know how an openbsd install manages to bork operating systems on disconnected drives. I'm not sure if it'll matter, but when installing openbsd I selected "configure whole drive automatically with GPT".

PhiloPolyMath 11-12-2016 01:29 PM

Did you happen to notice if your hardware clock needed to be changed back before flashing the bios? Because in the Slackware docs link I posted it says a cmos battery going out can cause issues with efi settings being reset. I don't see how it makes any sense that an openbsd install on a separate drive would affect others that are disconnected. And yet here we are. At least you can boot into your openbsd drive. I'm still at the point where if that drive is connected the bios freezes at the startup logo.

I would lookup BSDnow.tv tutorial on how to setup an openbsd desktop for a quick starter. It's a little old but still useful. Also there is a link titled "OpenBSD is hard to install (not really)" or something close to that. I'm on mobile or I would link them. You can get some performance improvements with editing a couple config files. Also google "pledge and fstab. "

aqrwsftj 11-13-2016 12:30 AM

So today I plugged my openbsd drive back in to have another look and booted. I unplug it and plug debian back in and again it won't start ... another EFI reinstall and it's working. Really strange.

My hardware clock went back to 1/1/2008 when I tried the clear cmos jumper yesterday, but didn't seem to affect anything, and was automatically updated as soon as I loaded debian again, and couldn't have had any effect today.

PhiloPolyMath 11-13-2016 11:33 AM

That's really bizarre. May have to contact some OpenBSD people on IRC about this to see what they think. Really the only common denominator I can think of in this situation is the BIOS. I am going to switch around some drives in and out of my laptop to see if I get the same behavior. I have my old slackware drive for it and currently it is running OpenBSD on an ssd. Between those 2 drives and the third ssd I installed OpenBSD to maybe I can get some answers.


All times are GMT -5. The time now is 11:23 AM.