Change boot order


#1

Hi,

I have a Librem v2 with two disks, and i would like to change the boot order.
I tried to use the F1-F12 keys to access to the BIOS (as i used to do in my older laptops) but it’s not working. Is there any way to achieve this?

Thanks!

Ming


#2

Press Escape when Purism logo appears. If you want to change it permanently, it includes reflashing coreboot. Contact support by mail, I’ll send the instructions to you.


#3

I actually wanted to publish the instructions in a new thread in the forums and this is the best place to do it I guess.

I’ve made a small script to change the boot order for you, it’s available here : https://www.dropbox.com/s/6o2mk1ajt8r99l1/bootorder.tar.gz?dl=0

Just run change_bootorder.sh as root:

sudo sh change_bootorder.sh

MAKE SURE you don’t interrupt the process once it starts flashing coreboot, and make sure you have enough battery left and you are connected to the power supply, in case of a blackout.

This should technically work on any OS, but I’ve only tested it on PureOS. I’ve built flashrom without ftdi support so you won’t have to worry about that dependency, and this version of flashrom has skylake support (which isn’t available in the latest release of flashrom).

It should be 99.9999999% safe, but as usual, standard disclaimer applies (“provided AS IS, we are not responsible for any damage this might do to your hardware”, etc).

This is a much simpler/limited script compared to the more complete ‘purism-librem-coreboot-updater’ script, but that script only supports librem 13 v1, and I haven’t finished adding librem 13 v2, and librem 15 v3 support to it, but once I do, it will become more mainstream, a single tool to update coreboot or change the boot order, and neutralize the ME, etc…


Librem 15v3 won't boot
#4

Thanks, kakaroto, it worked like a charm!


#5

Will this script also work for the Librem 15v3?


#6

Yes, it will work for both Librem 13 v2 and Librem 15 v3.


#7

I felt a bit uncertain on using the flash script of kakaroto, so I managed by simply installing grub on the M2-disk.


#8

Hey Forum,

I have tried to run the script you provided.
It was successful once, but now I would like to revert my changes and make my non-M.2-SSD the primary harddrive to start.

When I run the script and make my choice, I get the following output, which exits with an error

Select the default order in which devices will attempt booting:
1 - Boot order: M.2 SSD disk first, 2.5" SATA disk second
2 - Boot order: 2.5" SATA disk first, M.2 SSD second

** Note: regardless of the option chosen above, you can always select
** a different boot device by pressing ‘ESC’ at boot time.
Enter your choice (default: 1): 2
flashrom v0.9.9-1-stable-11-d36385d-dirty on Linux 4.16.0-2-amd64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Calibrating delay loop… OK.
coreboot table found at 0x7aad3000.

WARNING! You seem to be running flashrom on an unsupported laptop.
Laptops, notebooks and netbooks are difficult to support and we
recommend to use the vendor flashing utility. The embedded controller
(EC) in these machines often interacts badly with flashing.
See the manpage and https://flashrom.org/Laptops for details.

If flash is shared with the EC, erase is guaranteed to brick your laptop
and write may brick your laptop.
Read and probe may irritate your EC and cause fan failure, backlight
failure and sudden poweroff.
You have been warned.

Proceeding anyway because user forced us to.
Found chipset “Intel Skylake U Premium”.
This chipset is marked as untested. If you are using an up-to-date version
of flashrom and were (not) able to successfully update your firmware with it,
then please email a report to flashrom@flashrom.org including a verbose (-V) log.
Thank you!
Enabling flash write… Warning: Setting Bios Control at 0xdc from 0x8b to 0x89 failed.
New value is 0x8b.
Warning: SPI Configuration Lockdown activated.
OK.
No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn’t found automatically.

Unable to read coreboot image

I hope you can help me. As I said, it used to work once, so I find it quite strange that it does not work anymore.

I have tried to run it under PureOS (latest version; dist-upgrade today) and Gentoo. In both I ran “(sudo) bash change_bootloader.sh”. Under Gentoo I did not use sudo but root directly.

If there is anything else you need to troubleshoot, please let me know.

P.S. no idea why some text in the output is bigger


#9

Hi, I’m unsure, as I’ve never seen this problem before. Can you try two things :
1 - Boot with the kernel argument ‘iomem=relaxed’ added to the linux line in grub
2 - try the command ./flashrom -V -p internal:laptop=force_I_want_a_brick and post the full output someone and link to it here