LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   GRUB GRUB GRUB.... all over the display while booting with USB. (https://www.linuxquestions.org/questions/linux-general-1/grub-grub-grub-all-over-the-display-while-booting-with-usb-780517/)

kapsikum 01-07-2010 06:23 AM

GRUB GRUB GRUB.... all over the display while booting with USB.
 
i am trying to boot linux kernel from a USB stick. i performned following steps:
1. wrote Grub stag1 to MBR of USB with this command on my linux host.

dd if=/boot/grub/stage1 of=/dev/sdb1 bs=512 count=1

2. Mounted the USB and i copied the following files in my USB.
boot/grub/stage1
boot/grub/stage2

2. Plugged in the USB in the the target machine. rebooted and changed the booting sequence to boot from USB

my problem is that instead of getting a boot prompt, i am getting GRUB GRUB GRUB all over the display.

i googled out for it and found that if we change the auto-detection oh HDD in bios to manual that may solve the issue, but that did not help.

If you happen to know that I am following the correct steps and in right order please point me how can i resolve this issue of GRUB.

aus9 01-07-2010 07:25 AM

hi

could you be more explicit on usb use?

is this a test of a kernel build without all the other stuff? OR
are you trying to build a true usb system?

2) you can not use dd command.....as you have not got grub to "link" to its stage2 file by using dd.

3) what distro is your normal system pls?

4) is grub in mbr of that normal system?....as you can use commands at mbr stage....commandmode if you care to?
Otherwise we have to be very careful in getting the correct device embedded with grub stuff.

kapsikum 01-07-2010 08:11 AM

Hi,

thanks aus9 for you post. here are the replies

1. is this a test of a kernel build without all the other stuff? OR
are you trying to build a true usb system?
-- Yes its a test of kernel build with all other stuff.

3) what distro is your normal system pls?
-- my normal system is a ubuntu 7.10 (gutsy)

4) is grub in mbr of that normal system?....as you can use commands at mbr stage....commandmode if you care to?
-- no grub is not there in the mbr of my normal system. i directly put the grub files from /boot/grub directry

just to add, i also tried to write grub files in my USB from grub prompt on my normal host, by making it root device with root (hd0)command and setup (hd0) however returned "error 17: Cannot mount selected partition" every time.

aus9 01-07-2010 04:48 PM

1) I do not understand your answer....edit

Have you copied just the /boot folder onto usb stick and hope to embed grub or have you copied all folders?
If you test kernel you do not need other folders but boot will need populating and usb partition needs to be bootable and bios needs to have boot order changed to usb (on my system treated as a hard drive) before your normal hard drive

2) your normal system...must have grub files in /boot but what is your bootloader if no grub in mbr of Ubuntu?

3) you need to be careful specifying root (hd-devicenumber). Please read this....
http://www.linuxquestions.org/questi...hooter-278748/

if grub was on hard drive of mbr we could guide you better.

mbr jumps to grub menu
Press C for commands
root (hd....and press TAB key to allow grub display each drive, if usb has a bootable flag.

4) I am not sure how you boot if grub is not in mbr...so whats your bootloader pls?

yancek 01-07-2010 05:34 PM

Quote:

1. wrote Grub stag1 to MBR of USB with this command on my linux host.

dd if=/boot/grub/stage1 of=/dev/sdb1 bs=512 count=1
The command above installs stage1 to the root partition of sdb1, first partition of second hard drive. You need to change the sdb1 to sdb. I'm not really sure though what you are trying to accomplish?

kapsikum 01-08-2010 04:29 AM

thanks a lot for your informative responses.

aus9, i did few mistakes in figuring out information about MBR. From the link
http://www.linuxquestions.org/questi...hooter-278748/
i realized which is my boot partition and there yes grub is there indeed. It was actually in /dev/sda and i looked in /dev/sda1 and replied to you.

following yancek's suggestion i again wrote the stage1 file to /dev/sdb (my USB stick) using the commands:
dd if=/boot/grub/stage1 of=/dev/sdb bs=512 count=1
dd if=/boot/grub/stage2 of=/dev/sdb bs=512 seek=1

and rebooted and i was able to get a grub promopt.


All times are GMT -5. The time now is 10:37 AM.