# Freeze boot FreeBSD 13.0



## freejlr (Aug 21, 2021)

I've been using FreeBSD on a virtual machine for a while now, for the reason that I'm a noob, in case it breaks something.

Well I have decided to use FreeBSD as the base system, but my problem is that it is impossible for me to boot FreeBSD. I followed the steps in the manual, I got the specific image for USB stick, check the integrity of the image with shasum(1) and it's fine.

I have created the partitioning system with gpart, I have tried it with MBR, EFI, GPT and I don't think this is the problem, I don't know if I'm wrong.

Then I have formatted it, and I have burned the FreeBSD image with dd as the handbook says. I can only get to the beginning when the boot beastie wizard appears, but when I want to start the boot, it does not start the kernel, it is frozen in "Loading Kernel".

My machine is a Dell LATITUDE E6500 BIOS ver: A18

Regards.


----------



## grahamperrin@ (Aug 22, 2021)

freejlr said:


> … frozen in "Loading Kernel". …



Can you share a photograph? 

Thanks


----------



## freejlr (Aug 22, 2021)

I managed to get it started by chance, I can't understand what may be causing the problem. When I let the counter go to zero and auto start on when it freezes, or when I hit enter to skip the counter.

But if I switch to boot options, and boot if it works. You can see it in the video. It is not a coincidence I tried it many times, what could be causing this problem?

Also as you can see the usb led stops working, indicating its inactivity.





_View: https://youtu.be/Adu2chRetXw_


Regards.


----------



## grahamperrin@ (Aug 23, 2021)

For _any other key to stop_: at 0:16, which key do you choose?

Is the blackout at 0:33 in response to a manual reset by you?

Is the issue reproducible with the same stick plugged into a separate internal controller? (I can't tell whether you have more than one.)

Gut feeling: probably a bug, and probably reported although it might be difficult to find a matching bug.

If no matching bug, maybe follow what's below.



freejlr said:


> image for USB stick



Get a second stick of a different type.

On each stick, have just one partition (as large as possible), give it to UFS then test with StressDisk –

`stressdisk run /dev/da⋯p1`

– if the run reaches round two, the stick is probably good enough.

If both sticks are good enough:

retry FreeBSD-13.0-RELEASE-amd64-memstick.img on the first stick
try FreeBSD-13.0-RELEASE-amd64-dvd1.iso on the first stick
try both images on the second stick.
For test purposes, you might try to boot the most recent installer for FreeBSD 14.0-CURRENT. There are recent improvements … although some of them are not enabled by default.


----------



## freejlr (Aug 23, 2021)

grahamperrin said:


> For _any other key to stop_: at 0:16, which key do you choose?
> 
> Is the blackout at 0:33 in response to a manual reset by you?
> 
> Is the issue reproducible with the same stick plugged into a separate internal controller? (I can't tell whether you have more than one.)



Any key works, but directly hit enter to start or leave the account behind so that it is only start generates the freeze. Yes, the black screen is due to the forced restart that I performed.

Unfortunately I have no other machine to test the Freebsd boot.

I have tried on other USB sticks with the same result, even create a bootable disk with Win32diskimager as the manual says. Also with Easy2Boot, all with the same bug.



grahamperrin said:


> Get a second stick of a different type.
> 
> On each stick, have just one partition (as large as possible), give it to UFS then test with StressDisk –
> 
> ...



No errors found with stressdisk, also try to boot FreeBSD-14 and some older version like 11.2, with the same bug.

I think the problem lies with my machine, it cannot be that with so many tests it is an image or disk error. Too bad I don't have another machine at hand, I'll take a USB stick with the FreeBSD image when I have the chance I'll try to boot into another machine.

From what I've been seeing in other threads, Dell machines have a lot of compatibility problems, right? But what a weirder bug, which could cause the problem, is there any way to debug to see where it crashes? Is that the problem is that it does not start the kernel.

Regards.


----------



## grahamperrin@ (Aug 24, 2021)

freejlr said:


> … frozen in "Loading Kernel". …





freejlr said:


> … View: https://youtu.be/Adu2chRetXw …



For convenience, part of a frame from the recording:


----------



## grahamperrin@ (Aug 24, 2021)

I spent five minutes or so seeking a matching bug, could not find one.

freejlr if you like, report the bug. Suggested title:

_Installer: Autoboot after 10 seconds succeeds, keying [Enter] to boot does not boot (no progress beyond 'Loading kernel...')_


*Postscript*



grahamperrin said:


> For _any other key to stop_: at 0:16, which key do you choose?



Sorry, that was an insanely phrased question. Of course, you're not _choosing_ to stop! Thanks for answering sanely.


----------



## freejlr (Aug 24, 2021)

I just tested the USB stick on a friend's Macbook right now. It works perfectly. Any problem.

It was to rule out any problems with memory. Which was already unlikely.

It is already evident that it is a problem with my machine. I will report the BUG, don't you think a bug of this type is weird?

What could be causing this bug?


----------



## grahamperrin@ (Aug 24, 2021)

freejlr said:


> … don't you think a bug of this type is weird?



I do, I'm not an expert. 

Someone with relevant expertise will probably find an explanation for the behaviour.



freejlr said:


> What could be causing this bug?



The sooner it's in FreeBSD's Bugzilla, the sooner it can be triaged. 

<https://bugs.freebsd.org/bugzilla/enter_bug.cgi?product=Base System>


----------



## freejlr (Aug 24, 2021)

Reported with suggested title.

Regards.


----------



## richardtoohey2 (Aug 25, 2021)

You could try fiddling with BIOS settings (or at least looking to see if any changes there make any difference) - but make notes of what you change so that you can change back.

You could look for firmware upgrades for the machine.  Again, might be dragons here if you try and it goes wrong.  Might end up with a paperweight.

You could try another BSD or Linux - do they have any issues?  If they do then suggests something about your machine/BIOS config is upsetting open source / non-Windows OSs.  If they all seem to boot fine then might be something specific about what FreeBSD is doing.


----------



## Argentum (Aug 25, 2021)

freejlr said:


> I just tested the USB stick on a friend's Macbook right now. It works perfectly. Any problem.
> 
> What could be causing this bug?


The whole story looks familiar... and you just said that the stick is good and boots with Macbook. I think this is a BIOS problem. I have no experience with Dell, but are there any BIOS upgrades available? Boot method (legacy or UEFI) may be culprit.

Also, you can think about workaround - take the HDD (or SSD) out of the computer, connect to another machine, install the system and put the drive back.


----------



## freejlr (Aug 26, 2021)

richardtoohey2 said:


> You could try fiddling with BIOS settings (or at least looking to see if any changes there make any difference) - but make notes of what you change so that you can change back.
> 
> You could look for firmware upgrades for the machine.  Again, might be dragons here if you try and it goes wrong.  Might end up with a paperweight.
> 
> You could try another BSD or Linux - do they have any issues?  If they do then suggests something about your machine/BIOS config is upsetting open source / non-Windows OSs.  If they all seem to boot fine then might be something specific about what FreeBSD is doing.



Yes, I tried to update my Bios to a more current version, the problem is that when executing the binary it asks you to have the battery and a minimum of 10% power to be able to carry out the update.

Unfortunately, my machine does not have a battery as it was broken and I discarded it, and I did not buy a new one because I do not use it.

I found a solution, if you can call this a solution. I reverse engineered the binary to override the inspection it does on the battery and the percentage.

The binari use the function GetSystemPowerStatus (Windows 10). To check if you have the battery connected and the percentage, cancel that function so that it could continue in the process, manage to execute the binary successfully without problems, canceling that step.

But I do not dare to install the new BIOS, really do you need the battery? What happens with desktop machines without battery, I do not understand the truth.


Try OpenBSD without any problem, and other linux livecd without problems.



Argentum said:


> Also, you can think about workaround - take the HDD (or SSD) out of the computer, connect to another machine, install the system and put the drive back.



I'm not understanding anything, by chance it occurred to me to deactivate Beastie from the boot, and surprise the kernel loads without problems, it is to activate it and have the problem.

What does all this have to do with it? Also I could not complete the installation since I have problems with all the USB memories.

https://ibb.co/93Vpkqj

There are some times that I can enter the installation menu, but as shown in the image in that case, no?

I think I'll use another BSD, it's a shame since I was already getting familiar with FreeBSD. If I'm not mistaken I have compatibility problems. If someone wants a video showing the boot without Beastie, to comment it will be without problems, the truth is I do not see the sense of that.

Regards.


----------



## grahamperrin@ (Aug 26, 2021)

freejlr said:


> … problems with all the USB memories.
> 
> https://ibb.co/93Vpkqj



A few hours ago I had repeated, _almost_ consistently reproducible problems with a hard disk drive in a _Winstars Communicator C2_ (combo hard drive docking station) directly connected to the eSATA/USB 2.0 combo port of an HP EliteBook 8570p. Retries exhausted, as shown in your photograph.

After moving the connection to one of four USB 3.0 ports on the side of an HP 2012 120W Advanced Docking Station: no problem.


----------



## freejlr (Aug 27, 2021)

I also tried to see what happened with a CD-ROM, I went expressly for one.

Nothing happens in the Boot, it works perfectly, I do not have the problems as with USB memories. But apparently when it loads the kernel, I also have problems.

https://ibb.co/PwhRtZj

I think I am going to leave it, I will use another BSD that does not have compatibility problems with my machine.

Thanks.


----------



## grahamperrin@ (Aug 27, 2021)

freejlr said:


> Reported with suggested title.








						258032 – Installer: Autoboot after 10 seconds succeeds, keying [Enter] to boot does not boot (no progress beyond 'Loading kernel...')
					






					bugs.freebsd.org
				






freejlr said:


> IMG-20210828-000710264
> 
> 
> Image IMG-20210828-000710264 hosted in ImgBB
> ...



I'm seeking advice in IRC …


----------



## freejlr (Sep 2, 2021)

Apparently I am not the only one with this problem, I found a thread on github.

https://github.com/helloSystem/hello/issues/107

in this case with hello system, but being based on FreeBSD.

For my part, I have not managed to solve anything.

Regards.


----------



## grahamperrin@ (Sep 3, 2021)

freejlr said:


> https://github.com/helloSystem/hello/issues/107



There we have a variety of symptoms, some of which are specific to helloSystem.



freejlr said:


> … I have not managed to solve anything.



If you find yourself inadvertently keying Enter too soon (triggering the bug in your case), you might reduce the likelihood by having the line below in your /boot/loader.conf

`autoboot_delay="3"`

Any less than three seconds might be unexpectedly frustrating, if ever you _do_ want to pause for thought before choosing a menu option. 

If you're adventurous: values of `0` or `-1` might be of interest. 

loader(8)

loader.conf(5)


----------



## freejlr (Oct 4, 2021)

In the end, the only solution was to buy a compatible laptop, I was guided by the Freebsd wiki:

https://wiki.freebsd.org/Laptops

I saw a Lenovo ThinkPad t430 at a good price on eBay and I did not think twice.

Now everything seems to be in order, on my Dell I still have the same problem.

Thanks for the support.


----------

