LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-07-2010, 06:23 AM   #1
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Rep: Reputation: 16
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.
 
Old 01-07-2010, 07:25 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
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.
 
Old 01-07-2010, 08:11 AM   #3
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Original Poster
Rep: Reputation: 16
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.
 
Old 01-07-2010, 04:48 PM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
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?

Last edited by aus9; 01-07-2010 at 04:57 PM.
 
1 members found this post helpful.
Old 01-07-2010, 05:34 PM   #5
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,573

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
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?
 
1 members found this post helpful.
Old 01-08-2010, 04:29 AM   #6
kapsikum
Member
 
Registered: Mar 2005
Location: INDIA
Posts: 79

Original Poster
Rep: Reputation: 16
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting of raw ISO from GRUB/LILO (though preferably GRUB) Orkie Linux - Software 28 12-15-2013 09:37 PM
Changing GRUB-GRUB, GRUB-LILO and vice versa andreas_skw Linux - Newbie 1 06-05-2008 06:40 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
how to edit grub.conf from grub shell during booting pashaikh Linux - Security 1 06-27-2006 05:01 AM
Booting USB from Grub? Fox7777 SUSE / openSUSE 2 09-05-2005 08:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration