Page 1 of 1

Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 3:01 am
by NunoLava1998
I installed GRUB on my USB using xboot and that application lets me skip the GRUB steps and put the iso automatically. I removed the boot-to-HDD and help options (and help.iso), but when i booted it up, it just goes to the GRUB in my HDD since i dual boot Windows and Luninux Linux.

How can i take care of this? I have modified grub.cfg and menu.lst to ONLY go to the system, and what i seem to see is GRUB loads itself but then it realizes there is no disk or something is invalid (NOTHING IS INVALID AND THERE IS A DISK) and jumps to the hard drive.
Pressing Shift rarely does anything and when it does it's just "Loading GRUB" then going to the HDD GRUB yet again.

I have uploaded here a zip with my GRUB files on mediafire, i cannot upload a 64KB+ file and trying the highest compression possible only gives 708 KB, so here it is: http://www.mediafire.com/file/rnga5fpb66ejgja/grub.rar

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 3:10 am
by matt11235
It's probably because your BIOS/UEFI is booting to the hard drive instead of your flash drive.

I can't speak for your motherboard, but on mine I need to mash F8 while it boots and then I can pick a boot device.

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 3:56 am
by NunoLava1998
zenzizenzicube wrote:It's probably because your BIOS/UEFI is booting to the hard drive instead of your flash drive.

I can't speak for your motherboard, but on mine I need to mash F8 while it boots and then I can pick a boot device.
I do pick it, i even have my first boot device as the USB itself. It just JUMPS to the HDD GRUB for no reason.

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 4:48 am
by matt11235
For some reason I can't download from your Mediafire link.

Is the image you put on the flash drive actually bootable/does it have 0xAA55 at the end of the first sector? When I try and boot into something without this, the UEFI on my motherboard just silently skips over it and goes to the next entry.

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 5:37 am
by NunoLava1998
zenzizenzicube wrote:For some reason I can't download from your Mediafire link.

Is the image you put on the flash drive actually bootable/does it have 0xAA55 at the end of the first sector? When I try and boot into something without this, the UEFI on my motherboard just silently skips over it and goes to the next entry.
If it said "GRUB Loading" during Shift and actually took some time and looked like GRUB was loading graphics, definetly yes. I have formatted the USB as an attempt to get GRUB4DOS on there.

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 8:29 am
by onlyonemac
I'm going to second the suggestion that the drive isn't bootable. Many users aren't aware that they need to actually install GRUB in the boot sector of their drive, and not just copy the grub files to /boot/grub. Unless you've used grub-install to install GRUB on your drive then it's probably not bootable.

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 8:59 am
by NunoLava1998
onlyonemac wrote:I'm going to second the suggestion that the drive isn't bootable. Many users aren't aware that they need to actually install GRUB in the boot sector of their drive, and not just copy the grub files to /boot/grub. Unless you've used grub-install to install GRUB on your drive then it's probably not bootable.
I used XBoot beta. It's part BIOS since to boot actual bootable and 100% 10/10 condition things you have to go to boot menu and then press Esc assuming the USB is the first drive on BIOS.
And it's part GRUB beacuse... i can't do ANYTHING

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 9:11 am
by NunoLava1998
I guess i will have to design a new bootloader, since XBOOT's GRUB4DOS literally freezes on a blinking cursor.
I used PLOP which should force me into the USB.

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 10:41 am
by matt11235
NunoLava1998 wrote:I guess i will have to design a new bootloader, since XBOOT's GRUB4DOS literally freezes on a blinking cursor.
I used PLOP which should force me into the USB.
You could just try grub-mkrescue instead of dealing with whatever xboot is.

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 10:50 am
by glauxosdever
Hi,

NunoLava1998 wrote:I guess i will have to design a new bootloader
While it is good to write your own bootloader when you are more advanced, you definitely shouldn't write one right now. I suggest using GRUB for now, and after you have seen in what ways Multiboot/Multiboot2 are suboptimal, design your own boot specification and your own bootloader.


Regards,
glauxosdever

Re: Why is GRUB automatically going to the GRUB in the HDD?

Posted: Sun Oct 23, 2016 11:53 am
by NunoLava1998
glauxosdever wrote:Hi,

NunoLava1998 wrote:I guess i will have to design a new bootloader
While it is good to write your own bootloader when you are more advanced, you definitely shouldn't write one right now. I suggest using GRUB for now, and after you have seen in what ways Multiboot/Multiboot2 are suboptimal, design your own boot specification and your own bootloader.


Regards,
glauxosdever
I cannot use GRUB. I wrote a simple assembly one which worked on my machine but on some emulators just plain out "THERE IS NO OS", but those emulators always say that even when there's a AA55.
And behold...
it rebooted? The random colors it for a bit displays when i reboot suggests the C code has problems on my hardware, as my UEFI BIOS which is written in C gives the exact same results when rebooting. Probably no halt was implemented and it went running beyond the address and rebooted beacuse of that.