OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:33 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: GRUB on my USB flash drive
PostPosted: Wed Dec 06, 2006 9:49 am 
Offline
Member
Member

Joined: Tue Nov 14, 2006 11:59 am
Posts: 174
...

Thanks everyone,
Lprogster


Last edited by Lprogster on Tue Oct 23, 2007 11:27 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 10:10 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 04, 2006 6:06 am
Posts: 158
Location: Berlin, Germany
Here is an article on setting up GRUB on a flash disc: http://www.freesoftwaremagazine.com/articles/grub_intro However you need a running GRUB to install it on another device.

Maybe you could setup a bootable CD-ROM (do you have CD-RW-ROM in your computer?) with GRUB? This might provide some information: http://www.gnu.org/software/grub/manual ... D-ROM.html
As you see they use a tool called 'mkisofs'. It can be downloaded for Windows: http://smithii.com/files/cdrtools-latest.zip When you have created an .iso file just burn a CD using your favorite burn program. Boot on the CD. You now have a GRUB shell. Then read the flash disc article.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 10:50 am 
Offline
Member
Member

Joined: Tue Nov 14, 2006 11:59 am
Posts: 174
...

Thankyou,
Lprogster


Last edited by Lprogster on Tue Oct 23, 2007 11:27 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 11:01 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 04, 2006 6:06 am
Posts: 158
Location: Berlin, Germany
Maybe WinGRUB can help you? http://grub4dos.sourceforge.net/

AFAIK it is best to run GRUB natively (not in an operating system) when installing it to another device. Natively it accesses devices using BIOS interrupts, so your BIOS have to support transparent read-write access to flash discs. But if it doesn't do that you wouldn't be able to boot your flash disc either.

When running GRUB in an operating system (maybe it only runs on *nix) it uses OS system calls to access devices. But the OS might have drivers for devices, which the BIOS cannot access, and possibly the other way around as well. Correct me if I'm wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 11:31 am 
Offline
Member
Member

Joined: Tue Nov 14, 2006 11:59 am
Posts: 174
...

Thanks,
Lprogster


Last edited by Lprogster on Tue Oct 23, 2007 11:27 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 11:44 am 
Offline
Member
Member
User avatar

Joined: Mon Dec 04, 2006 6:06 am
Posts: 158
Location: Berlin, Germany
Lprogster wrote:
Trying WinGRUB...

What root would be the USB drive?

Code:
title My Little OS
root ???


In the article http://www.freesoftwaremagazine.com/articles/grub_intro he is using (hd2,0) to setup GRUB, but I don't know about the root used in the menu.lst file. Try to read it.

As a start you could place your kernel image on the flash disc and try to boot it using the GRUB shell, ex.
Code:
root (hd2,0)
kernel /kernel.bin
boot

GRUB will tell you if (hd2,0) is wrong. Then try with hd1, hd3, etc.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 06, 2006 12:29 pm 
Offline
Member
Member

Joined: Tue Nov 14, 2006 11:59 am
Posts: 174
I must be really nooby - something is wrong, still not booting!

Im gonna leave it for tonight, ty for your help,
Lprogster


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 07, 2006 10:49 am 
Offline
Member
Member
User avatar

Joined: Fri Jan 27, 2006 12:00 am
Posts: 1444
First do you want to use GRUB, or is it just away of loading your bin file ?.
If you want to use GRUB, then you do not need to read the rest.

But if it just away of loading your OS, i am going to make a bootloader ver of my OS, which can load from many devices including USB fobs, let me know if you interested.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 08, 2006 4:45 am 
Offline
Member
Member

Joined: Tue Nov 14, 2006 11:59 am
Posts: 174
Ive just managed to get it to work... Wow, lotta work!

Thanks for the everything, but Im fine now :D!

Thanks,
Lprogster


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 14, 2006 10:15 pm 
Offline
Member
Member

Joined: Sun Oct 22, 2006 6:49 pm
Posts: 73
How? If you post your solution, others will b able to benifit as well.

_________________
My project: Xenon


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], nullpointer and 67 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group