Hello everyone,
I meet some troubles, could you help me?
I want do use grub as my OS bootloader. But I design my own filesystem not fat or ext2. Could grub find my kernel image under my own filesystem? If yes, what else need I do? If not, does it means if I decide to implement my own filesystem, I can't use grub?
Expect your response. Thanks all.
Can I use Grub as my OS bootloader with my own filesystem?
Take a look at syllable project they have grub boot their AFS
afs.h:
http://syllable.cvs.sourceforge.net/syl ... iew=markup
fsys_afs.c:
http://syllable.cvs.sourceforge.net/syl ... iew=markup
And the Makefile.am magic:
http://syllable.cvs.sourceforge.net/syl ... iew=markup
Full tree:
http://syllable.cvs.sourceforge.net/syl ... ub/stage2/
afs.h:
http://syllable.cvs.sourceforge.net/syl ... iew=markup
fsys_afs.c:
http://syllable.cvs.sourceforge.net/syl ... iew=markup
And the Makefile.am magic:
http://syllable.cvs.sourceforge.net/syl ... iew=markup
Full tree:
http://syllable.cvs.sourceforge.net/syl ... ub/stage2/
Systems and Computer Engineering Researcher
"Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers?" -- Linus Torvalds
http://sce.carleton.ca/~maslan
"Do you pine for the nice days of Minix-1.1, when men were men and wrote their own device drivers?" -- Linus Torvalds
http://sce.carleton.ca/~maslan
Re: Can I use Grub as my OS bootloader with my own filesyste
Like JamesM said, you could have an ext2 or fat boot partition, and after booting access your own partition. I'd advise that at least until you have a fill OS up and running. Creating a grub module for your own FS is possible, but I'd advise you to wait with that. I'd consider devoting a considerable amount of time for something not directly related to your OS a waste. Writing your own multiboot compliant bootloader taylored for your OS is probably faster.xyb wrote:I want do use grub as my OS bootloader. But I design my own filesystem not fat or ext2. Could grub find my kernel image under my own filesystem? If yes, what else need I do? If not, does it means if I decide to implement my own filesystem, I can't use grub?
JAL
I know this thread is a bit old, but I just wanted to add that you can also specify files as blocklists instead of filenames. That way GRUB doesn't need to understand the filesystem, but you do have to make sure the blocklist is kept up-to-date (either by never moving or extending the files, or by updating the blocklists every time one of those things happens). You should probably also make sure there's no junk at the end of the last sector, and that the extra bytes are ignored.
You can specify kernel images, modules and even the config file itself this way (the location of the config file is hardcoded into stage2, so you may have to hex-edit it).
This isn't the best option I'll grant you, but it could at least be useful as a temporary measure, until you have GRUB support for your filesystem, partition support [1] in your OS, (insert popular FS) support in your OS, or switch to a different bootloader.
[1] (So a separate boot partition can be used, with a GRUB-supported FS)
You can specify kernel images, modules and even the config file itself this way (the location of the config file is hardcoded into stage2, so you may have to hex-edit it).
This isn't the best option I'll grant you, but it could at least be useful as a temporary measure, until you have GRUB support for your filesystem, partition support [1] in your OS, (insert popular FS) support in your OS, or switch to a different bootloader.
[1] (So a separate boot partition can be used, with a GRUB-supported FS)
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)