Jump to content

GRUB 2 Issues


Spectoron

Recommended Posts

I am new and just found about HAK 5 not too long ago and now stating to come to this site alot more, I been tryign to make my own Muiltboot USB drive for some time even before i even new about this site.

My problem is that i have a USB drive and went threw the set up and installed GRUB4DOS and have it working with no issues. The next Step i want to do is install GRUB2 so i can boot some ISO's.

I went throguht all the Forms on this site as well as many many others. But still unable to find a way to install it to the USB device. I know the command "grub-install --no-floppy --root-directory=/media/MUILTPASS /dev/sdb" but i get a "Auto-Detection of a filesystem module Failed" and tells me to use --modules. Now it might be i am running Ubuntu 9.10 in a VMware.

Everywere i go just says run this command and it is always different, Nothing on how or what OS or even what it does. I am not a heavy linux person i know it well just not crazy good as you guys. So if someone could help me out that would be great, Also there is nothing saying about Ubuntu 9.10 and that is running Grub2 if that is use able.

Just stump on what to do to get the Grub2 to install on the USB. I am not too worry on setting up ISOs or anything like that right now. Just want to Basic info on getting it installed to chainload GRUB4DOS to GRUB2 for ISO builds.

Thank you for your help and Thank you Hak5, This site is so freakin sweet.

Link to comment
Share on other sites

It worked for me on Ubuntu 9.04 with Grub2 installed. Try "grub-install --no-floppy --root-directory=/media/MUILTPASS /dev/sdb".

Note that that command assumes that your flash drive is mounted to /media/MULTIPASS and that the device is /dev/sdb. use "sudo fdisk -l" to check which it is, however as you are in VM, it should be /dev/sdb.

Link to comment
Share on other sites

It is looking for the module called fat.

You can specify that using the --modules=fat and it would work though in your case I don't suggest that.

If at all possible you should use fdisk from Linux to create a new empty dos partition table on the usb drive.

**Make sure you specify the correct device that is your usb in ALL these operations**

**Read what each of these programs output carefully also.**

You will lose any data on the drive if you do this.

You can use m in fdisk to see all of the options.

Use the o option in fdisk to create a new empty dos partition table.

Now, create a new empty partition on the usb stick with the fdisk option n and follow the steps. Next use option t to change the partition's system id to c when it asks.

That c is the hex correlation that specifies fat32 lba.

Write it out with w.

Next use

mkdosfs -F 32 -n <nameyourusb> /dev/sdb1

Now you have a clean usb stick. You can then use this guide; http://hak5.org/forums/index.php?showtopic=15487

to help you with the rest of the installation.

Please read any section in it's entirety before you attempt the commands.

I think when we screw around with the usb partitions and mbr a lot it causes bad things and thus the "unable to detect filesystem" error.

You can use the --modules=fat option to make it work though this will not guarantee that it will boot properly or not cause problems later.

Also please remember that Linux man is your friend and to RTFM before you just depend on others to give you the answer. You can start by googling both those terms. man man is quite revealing.

Link to comment
Share on other sites

Thanks for your help, I been Googleing for it for sometime and working on manythings to try to fix it.

I was not just looking for the easy andswer. I like to find out the stuff on my own but i got stuck so i ask. Sorry if i came off like a n00b.

But anyway, Thank you for your input and i will give it a try and redo it again and see what i get this time around. thanks again..

Link to comment
Share on other sites

I understand what it's like to get stuck on something and I'm not afraid to ask either.

It's just that I wanted to reiterate the importance of reading the "fine print". It saves a lot of headache on both parties when figuring out a problem.

It wasn't a direct hit on you just some advice because understanding what is going on is much more important in the long run than just having a command handed to us.

Let me know when you get it working and if that solved your problem.

EDIT: After looking at your picture I also see that it could be an improper device.map. This happens when you install grub and the device has changed, such as from /dev/sdb1 to /dev/sdc1.

Using the --recheck option when using grub-install is how to re-detect and correct the device.map in /boot/grub/.

This is also specified in the guide I linked above.

Ideally you would like it as /dev/sdb1.

EDIT(2): I made a mistake in the previous post about the -i switch to name your usb device. It should actually be -n so that it looks like;

mkdosfs -F 32 -n <nameyourusb> /dev/sdb1

Link to comment
Share on other sites

  • 2 weeks later...

Wow Thank you scifijunkie, i found out it was:

sudo grub-install --recheck --no-floppy --root-directory=/media/MULTIPASS /dev/sdb

The SUDO and the --Recheck made it work. thank you for all your input. I knew it was something so small as that i just could not think of it and it was driving me nuts. As soon as i read that i wanted to bang my head on the desk because it was something so small. Thanks again you have just made my day.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...