Change boot device

29 replies [Last post]
Korax
Offline
Joined: 02/24/2021

Hello,

I'm new to GNU/Linux environment.

I recently bought an entirely free hardware/software PC, running free BIOS (SeaBIOS) and Trisquel.

I would like to try other distros.

I installed a second internal HD (SATA) and would like to switch boot device from one HD to the other.

When I press ESC while booting, I'm proposed to select my boot device, and although both HD are recognized, I'm not able to actually select an other device, and the PC automatically boots from the original HD running Trisquel.

I installed GRUB trying different settings, but without success.

Thank you for your help !

(I'd like to try QubesOS, Fedora and Debian)

Geshmy
Offline
Joined: 04/23/2015

I have no idea but a search found this

https://www.coreboot.org/SeaBIOS#Configuring_boot_order

Looks like a file named bootorder that reads like this:

Searching bootorder for: /pci@i0cf8/*@f/drive@1/disk@0
Searching bootorder for: /pci@i0cf8/*@f,1/drive@2/disk@1
Searching bootorder for: /pci@i0cf8/usb@10,4/*@2

would cause the PC to boot to whatever HD was connected and look for a USB if no HD is connected.

amenex
Offline
Joined: 01/03/2015

GRUB (grand unified bootloader) might just come to your rescue.

Once you get any one of your operating systems to run, open a terminal and type:
sudo update-grub

Upon later rebooting, the GRUB screen should appear, and you should be able to
navigate the GRUB menu with your mouse or trackpad.

If those don't respond, try the arrow keys (which I haven't tried recently).

The "advanced" selections in the GRUB menu lead to (paradoxically) earlier
versions of the operating systems. Recently some of these boot quicker than
the present (most recently installed) ones.

George Langford

Connochaetes

I am a member!

Offline
Joined: 12/13/2017

> Recently some of these boot quicker than the present (most recently installed) ones.
I don't care about even faster boot speed, but your post made me wonder if using an older version might prevent the frequent freeze-crashes that occur at seemingly random times. I'll try it out for some time and then report back.

Avron

I am a translator!

Offline
Joined: 08/18/2020

Can you see the GRUB menu when booting?

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

If not, little after you switch your computer on, try to press [Esc] or [Shift]. I never know which one. It is of course possible to configure GRUB to have the menu always show up: https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html

If you do not find entries for all your systems, execute in Trisquel's terminal the command amenex gave you:
$ sudo update-grub

If you want to modify GRUB's configuration, for instance to have the menu always show up, run the above command after saving /etc/default/grub. By the way, you need administrative privileges, hence sudo, to edit /etc/default/grub (here with Pluma, Trisquel's default graphical text editor):
$ sudo pluma /etc/default/grub

Korax
Offline
Joined: 02/24/2021

I tried to modify `/etc/default/grub` and change GRUB_TIMEOUT=0 [original configuration], to `=#` and then `=3` (as in the screen capt), but no menu would appear when booting.

When I press ESC, I'm proposed to select a boot device, but no key would respond, and the boot proceeds [Booting from Hard Disk].

Capture du 2021-02-26 09-03-06.png
Avron

I am a translator!

Offline
Joined: 08/18/2020

I have a D8 from Vikings, I also cannot see the GRUB menu and was told this is due to proprietary graphics drivers not loaded at boot time. Since loading them would defeat the purpose of having entirely free software, I did not look at that.

I did not investigate GRUB any further and in order to test other distros (Parabola, Hyperbola and GuixSD are my targets), I am now exploring the virtual machine options (with very limited success so far) but I am wondering whether GRUB has a purely text-based option without any menu, like GRUB just gives a command line prompt and one can type a command on the keyboard to tell GRUB what to boot. Perhaps that could solve the problem.

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

Try to have that in /etc/default/grub:
GRUB_TERMINAL=console
And do not forget to then execute:
$ sudo update-grub

Korax
Offline
Joined: 02/24/2021

Hello Avron,

I have a D8 from Vikings as well. I've considered virtual machine too, but I envisage to abandon Trisquel anyway. So I'd like to find a way to boot an other distro.

I've already bothered Vikings enough (I waited more than two months before my computer was delivered), and after few days of utilisation, I had them help me as the PC would't boot at all.

Any way.

It's a problem if ones needs to be a pro to simply boot from an other device.

Connochaetes

I am a member!

Offline
Joined: 12/13/2017

> after few days of utilisation, I had them help me as the PC would't boot at all.

Does that mean that (like me) at no point after switching on did you see anything on the screen?
If so, how did they manage to help you? How did you fix that?

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

GRUB_TIMEOUT_STYLE should be unset or set to "menu", not "hidden".

Geshmy
Offline
Joined: 04/23/2015

Avron,
just an idea,

https://libreboot.org/docs/gnulinux/encrypted_trisquel.html#booting-your-system-manually

Says 'At this point, you will have finished the installation. To boot system manually, at your GRUB boot screen, press C to get to the command line, and enter the following commands at the grub> prompt:' (You can read the rest at the link above)

Maybe if graphics are the problem but you are actually arriving at the boot menu and just can't see it, you could press C to get to a grub command line.

Korax
Offline
Joined: 02/24/2021

Well, I've got some result.

I vimed the grub file [see capture] ; and while pressing ESC during booting, the Grub Console showed.

It's not yet a question a boot device, but there is some improvement.

Capture du 2021-02-27 09-35-37.png consol.png
Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

Are all the filesystems with kernels (of all your installed distributions) mounted when you execute 'sudo update-grub' from Trisquel? What is the output of that command? To not have to take picture you can redirect the (standard and error) output with &> (here to a file named "out"):
$ sudo update-grub &> out

I repeat: if you want the menu to show up without having to press [Esc], GRUB_TIMEOUT_STYLE (in /etc/default/grub) should be unset or set to "menu", not "hidden".

Avron

I am a translator!

Offline
Joined: 08/18/2020

I see the same thing like Korax now, two entries only.

grub-update yields the following output:

Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.10.19-gnu
Found initrd image: /boot/initrd.img-5.10.19-gnu
Found linux image: /boot/vmlinuz-5.10.17-gnu
Found initrd image: /boot/initrd.img-5.10.17-gnu
Found linux image: /boot/vmlinuz-4.15.0-134-generic
Found initrd image: /boot/initrd.img-4.15.0-134-generic
done

When the menu appears, the caps lock led of my keyboard is on and it is unresponsive so I have no chance to select anything.

Here is the full content of /etc/default/grub that is not commented out:

GRUB_DEFAULT=0
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"
GRUB_CMDLINE_LINUX=""
GRUB_TERMINAL=console
Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

I see the same thing like Korax now

Do you also have other distributions installed (the kernels update-grub finds are all for Trisquel)? If so, are the filesystems with their kernels mounted when you execute 'sudo update-grub'?

When the menu appears, the caps lock led of my keyboard is on and it is unresponsive so I have no chance to select anything.

The down arrow and the Enter keys do not work with Caps Lock? Any way to disable Caps Lock in the BIOS?

(I imagine you are using Libreboot, with a peculiar way of booting the kernels: those here who use Libreboot would certainly provide more help than I can.)

Avron

I am a translator!

Offline
Joined: 08/18/2020

Do you also have other distributions installed (the kernels update-grub finds are all for Trisquel)?

No. I was expecting some option to select another installed kernel but maybe that was the second entry in the GUB menu?

The down arrow and the Enter keys do not work with Caps Lock? Any way to disable Caps Lock in the BIOS?

I checked, after Trisquel is started, down arrow and enter keys work even with Caps Lock, so this was probably not the issue.

I use a flat sensitive keyboard that makes a beep upon touching a key but when the GRUB menu was there it made no beep at all. I'll try connecting a more conventional keyboard at next reboot.

I imagine you are using Libreboot

No, this is a blobless coreboot with SeaBIOS but I never managed to see the BIOS menu, although I think I already tried with another keyboard.

My computer has a serial line and I could already see messages sent by coreboot on it. It seems GRUB has an option to be controlled via a serial line, I will try that if I don't manage with the keyboard.

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

I was expecting some option to select another installed kernel but maybe that was the second entry in the GUB menu?

Yes. They are under "Advanced options for Trisquel GNU/Linux" (or some similar wording).

I never managed to see the BIOS menu, although I think I already tried with another keyboard.

The key needed to enter the BIOS setup is usually displayed on the screen for a short time right after the computer switches one. If not, try the usual suspects: “Delete”, “Escape”, “F2”, “F9”, “F10”, “F11” or “F12”.

Avron

I am a translator!

Offline
Joined: 08/18/2020

When I boot with another keyboard, the keyboard is fully functional when the GRUB menu shows up so I can select things in GRUB now, thanks for the help !

More limited success with the BIOS: with that keyboad and ESC, I managed to enter a menu that proposes to select the boot order, but it seems a one-time selection only and I tried all keys at successive boots and did not get any other menu. I don't need to change the boot order right now though.

After that, I added HDDs but did not try that menu again, will do next time (but my intention is anyway not to boot on thoses HDDs). My current issue is that out of the 5 HDDs I just added, only 2 will show up during boot (on serial line) and after boot although they are all the same model and connected the same way. I am going to check serial numbers to see which are the undetected disks and disconnect and reconnect their cables.

amenex
Offline
Joined: 01/03/2015

All this discussion about GRUB brings up another question taken literally
from the Subject of the thread: Can one change the boot order with GParted ?

My installation of Trisquel_9 is in /dev/sda3, which is marked "\" in the
Mount Point column of GParted and "boot" in the Flags column. Can those
columns be edited ?

If so, running sudo update-grub immediately thereafter should place the
new location of the mount point and/or flagged boot location at the top
of the GRUB menu.

Just a thought, unverified. Don't try this at home in a computer you need.

Magic Banana

I am a member!

I am a translator!

Offline
Joined: 07/24/2010

The boot order of the disks is defined in the BIOS. The order of the entries in the bootloader (on the first bootable disk that has one installed) is defined in the configuration of the bootloader, GRUB by default on Trisquel (and on most other GNU/Linux distributions). Changing GRUB's order of entries is actually a headache. If you do not want the kernel with the highest version number (the default) to be the default, you probably want to settle with GRUB_DEFAULT=saved in /etc/default/grub: https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html

Connochaetes

I am a member!

Offline
Joined: 12/13/2017

Avron and Korax and anyone else who's got a D8, if and when you manage to install a different distro, I would much appreciate if you could share whether doing so seems to have fixed the issues you've encountered with Trisquel on your D8 computers.

I have tried both Trisquel 9 (presumably with 2020-12 Linux Libre) as well as Trisquel 9 Mini (or "Trisquel Mini 9"?, with 2020-12 Linux Libre) which I'm using now, and both of them freeze-crash a lot on this D8. Owing to my poor understanding and the complexity of the system, I don't know whether the main culprit is Trisquel, the version of Linux Libre I'm using, the hardware, something else or a combination of these.

I would prefer to use Trisquel, but if using something slightly to totally different will remedy the situation and work well with the hardware we've got, I'd be more than willing to try it out. Until I hear back from you, I'm going to try a few things out myself. If you have any advice that you are reluctant to post here due to the forum rules, I think we can contact each other directly through our profile pages.
Thanks in advance, looking forward to hear from you.

Connochaetes

I am a member!

Offline
Joined: 12/13/2017

In my previous post, I linked to FreeBSD as an example of something totally different from Trisquel but now regret doing so. From what I've read after posting that, I have got the impression that FreeBSD is perhaps worse than OpenBSD in terms of libre-ness, and OpenBSD is in turn worse than LibertyBSD which is unfortunately dormant, its website recommending HyperbolaBSD instead, which as far as I understand isn't ready to use yet. Long story short, I don't mean to recommend FreeBSD.

Avron

I am a translator!

Offline
Joined: 08/18/2020

Trisquel 9 works fine on my D8. I upgraded from Trisquel 8 initially installed with the command listed first to do that (can't remember the name now). The only issue is that upgrading has disabled jxself linux libre repostory without me noticing, so I didn't get kernel upgrades for a while but I fixed that by readding that repository and installing the package linux-libre-lts, I now have 5.10.19.

Do you have a GeForce GT 710 graphic card like me? I use a 2K monitor connected via HDMI.

For the freezes, you could check from another computer whether you can connect via SSH during a freeze. Otherwise, my idea would be to write down the time, wait a few minutes to see if it does not unfreeze, and after rebot check information in the log files in /var/log around the time where the freeze occurred.

I am far from an expert but my impression is that Trisqel 9 is one of the most reliable distros so I doubt using another distro would help. With respect to other FSF-endorsed distros:

- Parabola is nice but, unless you know Archlinux already, it is far more difficult than Trisquel to learn. I installed Parabola on a A20-OLinuXino-LIME2 because Trisquel does not support such boards, I learned a lot but I select and install every single piece one by one, it is extremly time consumming and from functional and security perpective, I am still far from what Trisquel does by default so I would never try this on my D8. In addition, it is a rolling release, you need to upgrade before installing any new package and before that you need to check official news as some things may require manual action to fix problems, or you may actually not want to do it given the unsolved issues.

- Hyperbola seems similar (based on Archlinux too) but it is not a rolling release. I did not check it so much.

- GuixSD looks promissing but it is a rolling release as well and it is a very young project that I would not want to rely on for a machine that needs to be working whatever. Especially, the kind of bugs and corrections I saw being reported looked like things that were fixed long time ago in other distros.

Connochaetes

I am a member!

Offline
Joined: 12/13/2017

Thanks for your reply.
I'm glad Trisquel works for you. It does for me on other computers.

Unfortunately, a more severe issue has come up that prevents me from trying out different kernel versions, distros or simply waiting for the freeze to thaw:
When I switch on the computer, I hear the fans (the constant noise is another issue I didn't expect when I ordered, but maybe you have a different setup), but the screen stays black even though I haven't changed any connections since it last worked. This has happened before, but now it's like this every time I try, so I'm writing this from another computer. I assume it's not starting anything, but I don't know how to tell as long as the screen stays black. The vendor has been very responsive and helpful so far, so I've just contacted them with more details about this, and I hope we'll find a solution one way or another.

> Do you have a GeForce GT 710 graphic card like me? I use a 2K monitor connected via HDMI.
Same here, except I've got WSXGA+ instead of 2K.

Avron

I am a translator!

Offline
Joined: 08/18/2020

Sometimes I need to press reset 5 or 6 times before something comes on the screen. It is less frustrating if you can see things on the serial line, you can press reset as soon as the boot stalls. I permanently leave a raspberry pi connected to it for that purpose.

Connochaetes

I am a member!

Offline
Joined: 12/13/2017

I see. I have no such device, and I must've tried more than a dozen times, to no avail. (I hope it doesn't have anything to do with my change to "GRUB_TERMINAL=menu", I don't know how to change it to e.g. "=console" now with the screen all black, but then why would it have worked earlier, I'm not aware of having changed anything since it last worked.)

What I find interesting is the monitor's behaviour when I switch on the computer:
At some tries, the monitor doesn't even get out of sleeping mode.
At others, it stays black but doesn't lapse into sleep mode even though I'm not pressing any keys.
And at yet others (but I think only among those times when I have pressed keys), it will alternate between going to sleep and waking up for a while (but with quite a lag after key presses, if it even has anything to do with them).
I haven't really checked if these behaviours somehow correlate with whether I used to normal "on" switch or the restart button on the computer, or whether I had switched the monitor off (and the time of me switching it on).

Another interesting quirk is that when I push the restart button, the expected very short time when fan activity stops occurs with quite a lag after me pushing the button, instead of immediately.
Similarly, when the computer has been off and I switch it on, I usually hear a very short gap in fan activity a few seconds after switching on.

Avron

I am a translator!

Offline
Joined: 08/18/2020

I just had one more crash (general protection fault again).

Since now I know how to select the kernel at boot, I decided to try 4.15. After 1h I have not noticed any problem, so I'll see whether it is more stable or not. I had to press reset 3 times at boot.

To see coreboot messages, if you have a laptop running Trisquel, you just need something like:
https://www.reichelt.de/fr/fr/delock-adaptateur-usb-2-0-1-x-s-riel-delock-61425-p121151.html?&nbc=1
https://www.reichelt.de/fr/fr/c-ble-modem-nul-sub-d-9-broches-port-port-3-m-ak-143-p3971.html?&trstct=pos_0&nbc=1

The first one is what I have (I had a serial cable from the time I was using an analog modem).

Connochaetes

I am a member!

Offline
Joined: 12/13/2017

Thank you! I'm writing this from a notebook running Trisquel Mini. The notebook doesn't seem to have a plug matching the socket shown in your second link. But the thing in your first link should work. Unfortunately, I've got neither of those cables at hand, and I don't want to buy one because it seems unlikely that it would solve all the problems I've got with that computer (doesn't boot, freezes at random times [at least with the newest Linux Libre], fan is too loud). But it's good to know.
Funny you linked to Reichelt, I've got family living 1 km away from it.
I hope using the older kernel works well for you. It did for me the few times I was able to try it.
Have a nice week