LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2011, 09:22 AM   #16
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489

Part of the problem is that you are mixing Grub Legacy and Grub2. In post #3 you have your grub.conf file posted. This is Grub Legacy. The geometry commands work in Grub Legacy. In post#12 you post output from the ls command which works in Grub2. So which one are you trying to use on your USB stick and could you respond to my other questions in post #8.
 
Old 04-06-2011, 09:33 AM   #17
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
Part of the problem is that you are mixing Grub Legacy and Grub2. In post #3 you have your grub.conf file posted. This is Grub Legacy. The geometry commands work in Grub Legacy. In post#12 you post output from the ls command which works in Grub2. So which one are you trying to use on your USB stick and could you respond to my other questions in post #8.
hi Yancek . Sorry I haven't answered your question . Here is what i've got in grub prompt :

Code:
Probing devices to guess BIOS drives. This may take a long time.
[?7hGNU GRUB  version 0.97  (640K lower / 3072K upper memory)[ Minimal BASH-like line editing is supported.   Forthe   first   word,  TAB  lists  possible  commandcompletions.  Anywhere else TAB lists the possiblecompletions of a device/filename. ]


grub> geometry (hd0)
drive 0x80: C/H/S = 1044/255/63, The number of sectors = 16777216, /dev/sda
Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
Partition num: 4,  Filesystem type unknown, partition type 0x82
Partition num: 5,  Filesystem type is ext2fs, partition type 0x83
grub> geometry (hd1)
drive 0x81: C/H/S = 0/248/62, The number of sectors = 15687680, /dev/sdb
Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
grub> geometry (hd2)
Error 21: Selected disk does not exist
grub> quit
Thanks .
 
Old 04-07-2011, 03:53 AM   #18
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240

Rep: Reputation: 14
blink,

1) indeed, as i can see, you dont have grub stage1 file. I dont have experience to suggest anything on this. But you can try to copy boot/grub/stage1 from your PC into the USB-- boot/grub/. Because my knowledge says that stage1 is same everywhere.

2) edit the menu.lst of your USB, where it is written "root=/dev/ram", change it to how your system detects your USB(as you said it is /dev/sdb1) so make it "root=/dev/sdb1".

3) if you can see the grub prompt it means that grub is booting up the(not sure whether it is booting stage1 or not).

4) this link should help you more on grub and its stages, try it.

Note: try 2nd option first.

Regards.
 
Old 04-07-2011, 08:06 AM   #19
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
yancek is right ! The problem is that the grub that I installed with command "apt-get install grub" in USB is different from that of using the command "grub-install --recheck --root-directory=/mnt/chroot /dev/sdb" . As a result , grub 2 cannot find a grub.cfg during boot time and no kernel is loaded . The problem is solved by installing grub 2 on the USB by "apt-get install grub2 " instead of "apt-get install grub" !

Cheers ! You guys rock !
 
Old 04-07-2011, 09:27 AM   #20
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
blink182:

Glad you got it solved. Lots of confusion over Grub because there are so many tutorials and forums dealing with bootloaders and people new don't realize the major differences in Grub Legacy and Grub2. As you found out, different files are used in the different Grubs.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 19 linux kernel must be loaded before initrd Cant get it to work Linux - Newbie 1 04-01-2011 11:48 AM
Getting error 19: linux kernel must be loaded before initrd mdnchauhan Linux - Newbie 1 05-07-2010 07:33 AM
Error 19 linux kernel must be loaded before initrd mdnchauhan Linux - General 4 05-06-2010 07:23 AM
GRUB Error 15, Linux already loaded rick_amd Linux - Newbie 7 03-02-2008 02:06 AM
Booting Grub once kernel is loaded. American Psycho Linux - Newbie 2 04-02-2004 11:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:07 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