LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 11-21-2008, 04:08 PM   #1
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 242
Blog Entries: 2

Rep: Reputation: 41
Grub question


I'm not exactly sure how to label this thread, but I have been fighting with my USB flash drive for quite some time. I've damaged the partition table, fixed the partition table, frugal installed Puppy 4.1.1 on it which worked the first time, removed Puppy, tried to install grub (no go), used lilo -M /dev/sda which returned no errors, used grub-install hd3 which did install grub (with no kernel, just reboots over and over and over).

This time I installed Puppy 4.1.1 onto a hard drive, then copied the files to the USB drive, then tried to install grub, which would constantly complain that there was no kernel. In a last ditch effort I searched through the internet one more time, and this time found out what find does, so I used it "find /boot/vmlinuz" to which it only found the kernels on my hard drives and didn't show anything for my USB.

So why did it not find the USB? Does it not read the USB or would it be that my BIOS probably doesn't allow grub to read the USB? (This computer does boot from the USB, I had booted Puppy when I frugal installed it.
 
Old 11-21-2008, 04:31 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Try "find /boot/stage2" - or "find /boot/grub/stage2". Use what that returns that represents the USB for the "root" command, then issue the "setup". I personally never use the install-grub wrapper.
 
Old 11-21-2008, 04:41 PM   #3
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 242
Blog Entries: 2

Original Poster
Rep: Reputation: 41
Thanks...

I tried it, however, it only returned my first hard drive (hd0,1).

<Edit>

Checked the drive with gparted and fdisk, everything looks good. ext2 file system and it's bootable...

Last edited by Mol_Bolom; 11-21-2008 at 04:56 PM.
 
Old 11-21-2008, 07:21 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
That says to me grub can't probe it - i.e. it's not being exposed by the BIOS as a bootable drive. BTW, having the boot flag set is irrelevant if that's what your last comment was referring to.

As for your frugal install, are you sure that it was actually booting from the MBR on the USB, and not from the normal MBR ?. I mean really sure. The evidence thus far doesn't agree with such a supposition.
 
Old 11-21-2008, 09:52 PM   #5
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 242
Blog Entries: 2

Original Poster
Rep: Reputation: 41
Quote:
That says to me grub can't probe it - i.e. it's not being exposed by the BIOS as a bootable drive. BTW, having the boot flag set is irrelevant if that's what your last comment was referring to.
Nah, just writing it just in case it would need to be known.

Quote:
As for your frugal install, are you sure that it was actually booting from the MBR on the USB, and not from the normal MBR ?. I mean really sure. The evidence thus far doesn't agree with such a supposition.
Yes, I am 100% sure. My MBR on two of my HD's is lilo not grub with a nice little pinguin interface. When I loaded the frugal installed puppy, it didn't run any boot loader, it just booted directly up into Puppy, not even the loader that puppy has on the LiveCD. Also, when I did have the frugal installed, I had selected the mbr.bin to be installed to the boot record. When I had grub installed on it, all I got was a prompt that said GRUB then it would reboot the computer.

As for using syslinux, I tried that to no avail, also, but I'm really trying to get grub up and running for there's a few things that I want to experiment with it. Kind of thinking it's just not possible. Maybe I just either need to buy a newer flash drive.

I do have a copy of the boot record on a save file after I installed grub, which of course there wasn't a boot loader, but none the less I have it, and I am trying to find out how to read the C code of fdisk and grub .97 to see how I could go about using C or even freebasic to write a boot loader directly to the boot record, but whew, that's way over my head, at least for now...But I'm still working on it...
 
Old 11-21-2008, 10:30 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quote:
Originally Posted by Mol_Bolom View Post
When I had grub installed on it, all I got was a prompt that said GRUB then it would reboot the computer.
Why didn't you say that earlier ...
Just noticed the following from your first post
Quote:
used grub-install hd3 which did install grub (with no kernel, just reboots over and over and over).
I missed that.
So grub is getting into the USB - should be bootable, I tested on an old 256Meg a couple of weeks back without problems.

You need to copy the /boot (all of it) to the usb, cd over to it, then try "[sudo] grub" from there. Then do the {find, root, setup} thing.
 
Old 11-21-2008, 11:05 PM   #7
Mol_Bolom
Member
 
Registered: Nov 2008
Location: S.W. Kansas
Distribution: Slackware64 14.0 / 14.2
Posts: 242
Blog Entries: 2

Original Poster
Rep: Reputation: 41
Have the files there. Made sure they were there before starting to do this...However, I'll try it from Zenwalk and see what happens. I'll copy the Puppy linux grub files to another dir and copy the one I downloaded and installed on Zenwalk, and give it a try...Fingers crossed...

<Edit> Just went to the directory the USB is loaded under in Puppy real quick and tried find, didn't work. Now I'll reboot and load Zenwalk...

<Edit again> I don't know why I didn't think about it before, but I tried find again before doing anything else, and it just hit me, it's not even showing that the partition that I installed Puppy 4.1.1 to is there, either...These are the directories that "have" a vmlinuz on them (using the hd naming that Zenwalk uses for the drives); /dev/sda2, /dev/sdb2, /dev/sdc1, /dev/sdd1. The only ones that grub is returning are (hd0,1) and (hd2,0) which should be sda2 and sdc1. sdb2 (HD) and sdd1 (USB) are the Puppy linux installations...

<3rd edit> Ok, this is really getting wierd...Just went into sdb2 to look at the Puppy files...They're not there...Nothing's there. When I copied the files from that drive to the USB drive earlier today, Thunar showed that nothing moved or was deleted from the HD...Everything seemed like it was still there...Anyway...I'm going to reinstall Puppy and see if I can't figure out what's going on...

<Hopefully the last edit> Reinstalled Puppy twice, the first time clicked on Boot from USB, did not work. Second time, installed and tried to install grub to MBR of USB, again, did not work. However, to my amazement, the selection I made in lilo to boot up puppy from sdb2 worked this time, where as the first time the kernel failed...So, I think I may have found what the problem was, it didn't correctly install vmlinuz...So I'll give this a try again...

<Follow Up>
Downloaded Slax 6.x.x ran the instlilo.sh which I presume by what it stated it installed lilo as my boot record on the USB drive. Wish it was grub, but eh, at least I know it works now. I'd probably keep slax, however, I really really hate KDE, wish it had either openbox, xfce, or even jwm, but eh, it works.

Last edited by Mol_Bolom; 11-22-2008 at 03:49 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Two things: (Probably Simple) Grub question, and a gDesklets question Wilffo Linux - Software 3 05-20-2006 02:33 PM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 02:51 PM
question about grub sparkac Linux - Software 2 10-22-2003 08:12 PM
Grub question? BajaNick Linux - General 4 08-01-2003 12:35 AM
A GRUB question... concoran Linux - General 15 04-27-2003 06:28 PM


All times are GMT -5. The time now is 08:45 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration