Grub; bootloader

2 respostas [Última entrada]
mr.r
Desconectado
Joined: 07/16/2018

Hello,
I was reading discussion from another recent post on grub problems after upgrade from Trisquel 8.0 to 9.0.
I followed some links from that discussion posted by Magic Banana regarding grub problems, some speculations as to how the new problems had been introduced, and some varied fixes dependent upon hardware and system variables, e.g. RAID or other backup scenarios. The best I could follow was that multiple instances (on various drives) of grub/grub(2) that were not synced during grub update would cause boot confusion

Aside: I had installed a fresh Trisquel 8.0_i386 to an onboard hard drive /dev/sda1 for laptop Presario v3000 in order to test the upgrade function to 9.0. The upgrade process failed for me. I ended up installing Trisquel 9.0_i686 on the same partition, /dev/sda1 writing over the fresh 8.0.
I chose /dev/sda for installation of the bootloader. I allowed the installer to (re-)format the /dev/sda1 partition to same existing ext. 4 and left the partition size unchanged. I created mount point / on the dialogue box that also had the check box for formatting the partition.

Here is my question: If I boot into the new Triquel 9.0 on the internal hard drive, and then introduce an external drive via usb port that has an operating system (linux) on it but with no bootloader installed on that drive (and therefore won't boot directly otherwise),

can I not run 'update grub' from my running system to create an entry in the grub file for the external usb drive's os pointing to the bootloader on /dev/sda?
If so, ought I be able to boot directly into that os on the external usb drive after that? (even though usb hard drive has no installed bootloader)
Thanks.

Magic Banana

I am a member!

I am a translator!

Desconectado
Joined: 07/24/2010

Try it and tell us. :-)

You may also have to enable boot from USB in the BIOS and to set a flag on the partition (for instance using GParted) indicating that it is bootable.

mr.r
Desconectado
Joined: 07/16/2018

Hello Magic Banana,
Thanks.

I did not have a free external drive case, so
I booted to a live Trisquel_9.0_i686 on USB flash drive.
I chose install and designated a 16GB flash drive previously formatted to a single ext. 4 partition as the target drive.
I chose to re-format to ext. 4 using the entire drive with mount point '/'.
On the bootloader option, I was surprised to find that there was not a "do not install bootloader option," so I chose to install the bootloader on the live USB flash drive that I was running install from.

Note: The 16GB flash drive that was pre-formatted did not recieve the 'boot' flag. I wanted to see if the installer would do that. After the fact, I checked the drive in GParted, and I still do not see the 'boot' flag set.

The install to 16GB flash drive seemed slow and to be hanging, but still proceeding. Eventually an error message told that there was a "failure" to install the bootloader and asked whether I wished proceed without installing a bootloader.
I chose in the affirmative.

The install completed and I allowed a re-boot. The re-boot failed.

The bios on this Presario v3000 is set to seek USB first, then Internal Drive 2nd.

I hard powered off.

Then, I powered on and 'esc'ed to the boot options and chose the internal drive where resides an installation of Trisquel_9.0_i686 that I have been recently trying out.

Once logged in to desktop, I opened a terminal and ran 'os-prober' (sudo). That found the 16GB flash drive's os, the freshly installed Trisquel_9.0_i686.

I then issued update-grub (sudo). Shutdown

I powered on and forced the bios to its second option of 'Internal' drive. (16GB USB flash has no bootloader) The grub menu screen came up and the third choice on the list was Trisquel.... on /dev/sdb1. I chose that one.

The machine booted into the freshly installed Trisquel_9.0_i686 os on the 16GB USB flash drive. It was sluggish. I think I was using a 1.1v usb port. But after I made change to 'primary' my VGA screen and 'off' the broken laptop screen, I rebooted and the response was better.

So, no bootloader necessary on device where os resides.