Gordon Messmer wrote:> On 07/03/2015 03:43 AM, Timothy Murphy wrote: >> I've tried this again, and it does not seem to work. >> Have you actually tried it?> I don't have a CentOS system here that I can reboot readily. And it > occurs to me that if I did, I didn't ask if your system boots via BIOS > or UEFI.Thanks for your response. It boots via BIOS, and in fact boots into CentOS-7/KDE on a USB stick (that is how I installed CentOS-7), and into Fedora-21/KDE on a stick. But it doesn't boot back into the CentOS-7 system that is normally running if I say "sudo grub2-install /dev/sdc" (the USB stick is sdc). It just comes up with the repeated "-", which I take to mean it has found the boot-loader on the USB stick, but has not found the kernel on /dev/sda6. -- Timothy Murphy gayleard /at/ eircom.net School of Mathematics, Trinity College, Dublin
On Sun, Jul 5, 2015 at 4:43 PM, Timothy Murphy <gayleard at eircom.net> wrote:> Gordon Messmer wrote: > >> On 07/03/2015 03:43 AM, Timothy Murphy wrote: >>> I've tried this again, and it does not seem to work. >>> Have you actually tried it? > >> I don't have a CentOS system here that I can reboot readily. And it >> occurs to me that if I did, I didn't ask if your system boots via BIOS >> or UEFI. > > Thanks for your response. > It boots via BIOS, and in fact boots into CentOS-7/KDE on a USB stick > (that is how I installed CentOS-7), and into Fedora-21/KDE on a stick. > > But it doesn't boot back into the CentOS-7 system that is normally running > if I say "sudo grub2-install /dev/sdc" (the USB stick is sdc). > It just comes up with the repeated "-", > which I take to mean it has found the boot-loader on the USB stick, > but has not found the kernel on /dev/sda6.i think that command is ambiguous because there's four distinct parts to GRUB. The boot.img goes in the MBR (or GPT BIOS Boot partition), which is all the /dev/sdc is telling it; the core.img and the extra modules have to go in a directory on that same device. So you have to tell it where. And in that same directory you need to put a grub.cfg, using grub2-mkconfig. http://www.gnu.org/software/grub/manual/grub.html#Invoking-grub_002dinstall Such as this example where you have, /dev/sdb1 as ext4 with a boot/ directory on it, and you've mounted it at /mnt grub-install --boot-directory=/mnt/boot /dev/sdc Another possibility is using grub2-mkrescue. http://www.gnu.org/software/grub/manual/grub.html#Invoking-grub_002dmkrescue -- Chris Murphy
Chris Murphy wrote:> On Sun, Jul 5, 2015 at 4:43 PM, Timothy Murphy > <gayleard at eircom.net> wrote: >> Gordon Messmer wrote: >> >>> On 07/03/2015 03:43 AM, Timothy Murphy wrote: >>>> I've tried this again, and it does not seem to work. >>>> Have you actually tried it? >> >>> I don't have a CentOS system here that I can reboot readily. And it >>> occurs to me that if I did, I didn't ask if your system boots via BIOS >>> or UEFI. >> >> Thanks for your response. >> It boots via BIOS, and in fact boots into CentOS-7/KDE on a USB stick >> (that is how I installed CentOS-7), and into Fedora-21/KDE on a stick. >> >> But it doesn't boot back into the CentOS-7 system that is normally >> running if I say "sudo grub2-install /dev/sdc" (the USB stick is sdc). >> It just comes up with the repeated "-", >> which I take to mean it has found the boot-loader on the USB stick, >> but has not found the kernel on /dev/sda6.I have to confess that on using another USB stick, re-formating it under Windows-7, creating partitions with fdisk, and running "sudo grub2-install /dev/sdc", the USB stick did boot my CentOS-7 machine into its usual system. I checked the first 4 x 512 bytes on the two sticks, and they did differ in the first 512 bytes, but I haven't analyzed the difference. -- Timothy Murphy gayleard /at/ eircom.net School of Mathematics, Trinity College, Dublin