Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
[1;25r[0;10m[4l[?7h[H[J[2;5HGNU GRUB version 0.97 (640K lower / 3072K upper memory)[4;8H[ Minimal BASH-like line editing is supported. For[5;10Hthe first word, TAB lists possible command[6;10Hcompletions. Anywhere else TAB lists the possible[7;10Hcompletions 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
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.
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" !
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.