xCuri0 / ReBarUEFI

Resizable BAR for (almost) any UEFI system
MIT License
1.32k stars 59 forks source link

Problem that bios is in exe format #103

Closed mojarrah closed 6 months ago

mojarrah commented 6 months ago

System Alienware a51 R4 pc

Hey. Hope you are doing great. I wanted to follow your steps to activate rebar. but I was surprised that dell bios is .exe and not .bin

How can we fix it?

This is the bios link

https://dl.dell.com/FOLDER08945518M/1/Alienware_Area_51_R4_2.0.7.exe

xCuri0 commented 6 months ago

On most prebuilts usually the only way to flash is through use of a hardware flasher like CH341A (take multiple backups of BIOS when doing this)

@Electron-PSO might know more about this

mojarrah commented 6 months ago

Could we talk on discord? whats your username

Electron-PSO commented 6 months ago

Hello @mojarrah

You can extract the .rom file from the EXE file by using the /writeromfile switch at the command line

Alienware_Area_51_R4_2.0.7.exe /writeromfile

Once you have the file, you should be able to use the AMI AFUWin64 v3.05.04 with GAN support to flash it.

As xCuri0 said, make backups first though

AFUWINx64.EXE /O to save current ROM image to file

mojarrah commented 6 months ago

@Electron-PSO Got it, but could we discuss it on Discord now? whats your username? mine uchihamj

mojarrah commented 6 months ago

@Electron-PSO here or there, Use what's best for you. The problem is that any version of the bios I can't even open the exe file normally when clicking it in windows 11. Any version of the bios. It gives an error unable to load driver!!! Can you try please to extract it on your side and upload it. That would be l insanely helpful!!!

Electron-PSO commented 6 months ago

Hello @mojarrah,

Here is the rom file extracted from the 2.0.7 exe you posted

alienware_area_51_r4_2.0.7.rom.zip

Did you use the command line when you tried to extract it? Like this?

Writeromfile
mojarrah commented 6 months ago

Hello @Electron-PSO

Can confirm the ROM is working. Thanks

Moreover, I have written the same command but didn't work on the machine. It is Windows 11. Maybe it needs to be on Windows 10 to be extracted

Plus, can you please now in the form of steps, tell me exactly what I should do now(anything other than the rebar steps since they are on the site) and if you name any program send its link please

Electron-PSO commented 6 months ago

Hello @mojarrah ,

After you have the ReBAR modified file, you'll need something like AMI AFUWin64 v3.05.04 with GAN support to flash it.

See this guide for instructions. I'm not sure about Win11, but I have managed to get Dell Alienware machines to flash in windows before.

https://winraid.level1techs.com/t/guide-how-to-flash-a-modded-ami-uefi-bios/30627

mojarrah commented 6 months ago

@Electron-PSO Downloaded the correct AMI version now

Can you mod the rom file with the uefirebar and upload it, please? since it is different from what other people have shown

Electron-PSO commented 6 months ago

Hello @mojarrah ,

It shouldn't be that different.

Search for the DXE section and insert the ReBar ffs at the end of it?

mojarrah commented 6 months ago

@Electron-PSO Look what it is giving me

image

mojarrah commented 6 months ago

@Electron-PSO also modded the bios successfully

mojarrah commented 6 months ago

@Electron-PSO But it is giving this error when trying to flash

Electron-PSO commented 6 months ago

You might want to try making a USB boot stick using Rufus and selecting FreeDOS

Then boot from the stick and try the command line things there

Win11 might be the issue or it might be an unsupported Flash Chip

Try it first, if there is still a problem, we'll have to find an alternative.

https://rufus.ie/en/

Electron-PSO commented 6 months ago

P.S I'm at work, so it is difficult for me to respond quickly.

mojarrah commented 6 months ago

@Electron-PSO downloaded windows 10. Now. The problem was from windows 11

But when flashing, it gives an error

Rom file size doesn't match the bios file and that true

Rom file 16mb

.exe around 8mb

image

Electron-PSO commented 6 months ago

Can you read the BIOS chip with the /O option?

Electron-PSO commented 6 months ago

AFUWINx64.EXE backup.rom /O to save current ROM image to file

mojarrah commented 6 months ago

@Electron-PSO image

It is showing this when writing the command

mojarrah commented 6 months ago

@Electron-PSO tried multiple times, it opens another cmd that shows the options I can use

Electron-PSO commented 6 months ago

You need to specify the file name you want to make

AFUWINx64.EXE backup.rom /O

mojarrah commented 6 months ago

Did and it said it's done. I restarted then used rebar program to to put 32 value. It said it did success. Restarted again but it still shows as disabled in gpuz

image

mojarrah commented 6 months ago

@Electron-PSO look

image

xCuri0 commented 6 months ago

Make sure you have updated vbios on 3090

NVIDIA put out an update for it that's required for resizable bar to work

mojarrah commented 6 months ago

@Electron-PSO @xCuri0

vbios and everything updated image

mojarrah commented 6 months ago

Literary the only option saying no in gpu z about rebar is: enabled in bios: no

mojarrah commented 6 months ago

@xCuri0 what do you think?

mojarrah commented 6 months ago

@Electron-PSO I used /O command again to check if the bios really flashed. And put it in uefi tool. And it's still the same. It didn't flash the modded bios

Electron-PSO commented 6 months ago

Did you run ReBarState.exe to set the BAR size?

mojarrah commented 6 months ago

@Electron-PSO Yes

mojarrah commented 6 months ago

@Electron-PSO also,

I used /O command again to check if the bios really flashed. And then I did put it in uefi tool. And the result were the bios didn't change. It didn't apply the modded bios. it's still the same. It didn't flash the modded bios

mojarrah commented 6 months ago

@Electron-PSO Is there a way to force it 100% to flash?

xCuri0 commented 6 months ago

Maybe you need to set service jumper or something for it to flash

But best and safest method for flashing prebuilts is using a hardware flasher like Ch341a

On Tue, Dec 12, 2023, 3:50 PM Mohammad Jarrah @.***> wrote:

@Electron-PSO https://github.com/Electron-PSO Is there a way to force it 100% to flash?

— Reply to this email directly, view it on GitHub https://github.com/xCuri0/ReBarUEFI/issues/103#issuecomment-1851745897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHBJLVLXLLEY5Q52FTQXP5DYJAVWFAVCNFSM6AAAAABAOPZDSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJRG42DKOBZG4 . You are receiving this because you were mentioned.Message ID: @.***>

mojarrah commented 6 months ago

@xCuri0 Damn, I don't have a hardware flasher currently. Is their another way/software I can try

Electron-PSO commented 6 months ago

Would ReBarState be happy if the flash hadn't worked?

mojarrah commented 6 months ago

Didn't get what you mean @Electron-PSO

Electron-PSO commented 6 months ago

Did you use the /GAN command to flash the BIOS file?

It might not be needed, but worth a try.

AFUWINx64.exe modified.rom /GAN

mojarrah commented 6 months ago

Yes

Electron-PSO commented 6 months ago

If ReBarState couldn't set the variable it should error?

Try setting it to 1GB bar size

Then reboot

Then check with CPU-Z

mojarrah commented 6 months ago

Tried but didn't work also!!

Electron-PSO commented 6 months ago

OK

Ignore that last post

I see it does create and is happy with the variable on systems without the BIOS mod

Electron-PSO commented 6 months ago

So ReBarState shows it is set to some GB?

mojarrah commented 6 months ago

I set it to 10, which is 1gb(as far as I now) and it says successful. But still says disabled after reboot

image

xCuri0 commented 6 months ago

Would ReBarState be happy if the flash hadn't worked?

Yes all it does is write a UEFI variable

mojarrah commented 6 months ago

So what to do?

Electron-PSO commented 6 months ago

I'm still finding it hard to believe the flash program can erase, program and verify without it actually doing it.

Not sure what to do now.

You could try a different flashing program or you could just do it the physical way.

If I had the board on my desk I would do this:

But that depends on your ability to do the job.

mojarrah commented 6 months ago

@Electron-PSO Do you recommend another flashing program? What is it?

Also, is their somehow a bios settings that is activated that didn't allow it to be flashed

Btw, when it flashed it didn't reboot by itself like I would expect it to happen, it just closed the cmd pop up. I rebooted manually

Electron-PSO commented 6 months ago

For some Dell machines, I have used a Windows GUI version of the AMI flash tool

Electron-PSO commented 6 months ago

I'll have a look for it

Electron-PSO commented 6 months ago

Here is the official link to the AMI flash utilities

https://www.ami.com/bios-uefi-utilities/

There are Win GUI versions in the zip folders

x64