OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Apr 23, 2018 9:04 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Problem with the Grub wiki page.
PostPosted: Wed Nov 15, 2017 4:01 am 
Offline
User avatar

Joined: Wed Nov 07, 2012 2:40 am
Posts: 21
Location: Petaling Jaya, Malaysia
I'm trying to create a disk image and use grub as the loader, thus I follow the wiki page and follow the example shown in the section [Disks image instructions]. Everything is OK, except that the grub-install command have a module "biosdev" which I couldn't find it in the grub folders. After removing "biosdev", then it works fine.

Also, I'll have add --target=i386-pc or else it will complain the partition is not efi.

After running sync, I check the /mnt folder and found a lot of files being copy to it, but I can't find my kernel and grub.cfg in the boot folder.

Here's my directory structure:

{workspace}\
| ---- bin\
| ---- boot\
| ---- grub\
| | ---- grub.cfg
| ---- kernel.bin

I'm running the grub-install command from within bin folder:

Code:
sudo grub-install --root-directory=/mnt --no-floppy --modules="normal part_msdos ext2 multiboot" --target=i386-pc /dev/loop2


what have I done wrong?


Top
 Profile  
 
 Post subject: Re: Problem with the Grub wiki page.
PostPosted: Wed Nov 15, 2017 5:06 am 
Offline
Member
Member

Joined: Mon Jan 03, 2011 6:58 pm
Posts: 283
I assume that article was written for what is NOW called GRUB Legacy, and you are using GRUB 2.

- Amy


Top
 Profile  
 
 Post subject: Re: Problem with the Grub wiki page.
PostPosted: Wed Nov 15, 2017 9:10 pm 
Offline
User avatar

Joined: Wed Nov 07, 2012 2:40 am
Posts: 21
Location: Petaling Jaya, Malaysia
tjmonk15 wrote:
I assume that article was written for what is NOW called GRUB Legacy, and you are using GRUB 2.

- Amy


Thought I didn't notice anything wrong, but wonder is there any difference kernel wise? I'm using multiboot header for the interim kernel.


Top
 Profile  
 
 Post subject: Re: Problem with the Grub wiki page.
PostPosted: Thu Nov 16, 2017 9:57 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1144
Location: Athens, GA, USA
Looking at the GRUB page, I think it need a comprehensive review and rewrite. We should discuss this more before we actually make the changes, but I do think some things need to be done.

First order of business is moving most of the information that is currently still in the GRUB Legacy page to the new main topic page. The current split of this information was a consequence of renaming those two articles from "GRUB" and "GRUB 2" to "GRUB Legacy" and "GRUB", respectively, without really making any other changes. This leaves the whole explanation in disarray, and is probably part of the problem the OP was having.

Next, I recommend hoisting the section on upgrading from GRUB 0.97 (GRUB Legacy) to GRUB 2, especially given that as things stand it is the first section a reader comes across, which would be extremely confusing. I don't think it should be deleted entirely, but it is of little to no use to people creating a new installation, which is what most of the people here would need. Further, at this point very few systems are still using GRUB Legacy, so only a handful of OSDevvers would even need it. This would be better served as a separate page and a link to it. We could move it lower onto this page, instead, but I wouldn't recommend that as it is a sizable section on it's own.

The section orders are severely problematic as well. Right now, the sections go as follows:
Code:
    1 History
    2 Features
    3 Upgrading from GRUB Legacy
        3.1 ISO instructions
        3.2 Floppy instructions
            3.2.1 Explanation
        3.3 USB instructions
        3.4 Disk image instructions
    4 HDD Image Instructions for OS X users
        4.1 Additional useful options
    5 Multiboot
        5.1 Header
    6 Installing GRUB 2 on OS X
    7 GRUB for UEFI
        7.1 Compiling GRUB
        7.2 Building a GRUB UEFI binary (BOOTX64.EFI)
        7.3 Blessing the binary on macOS
    8 See Also
        8.1 Articles
        8.2 External Links


As already mentioned, the History section right now only covers the move from GRUB Legacy to GRUB 2, with the larger history of the project still stuck in the older GRUB Legacy page. I also addressed the Upgrading section already, but I note that some parts that should be sections relating to the GRUB 2 in general, such as the part regarding creating disk images, is for some reason still in this section.

I think it would make the most sense to keep the disk image creation parts in this page, as a primary section. Again, this is one place where most of the relevant information is still on the older page, so we would do well to copy that page and update it in detail, or perhaps simply write a completely new description - the changes are significant enough to warrant that for some parts of it.

One thing that is not properly addressed in either of the pages is how to prepare a disk image for emulation, which frankly is a startling omission. The fact that these pages both seem to jump directly to hardware installation is a real failure on our parts - as we keep telling people, live hardware installation (if done at all) is the culmination of an OS dev project, not the starting point.

This is especially farcical when the first use case then given for live hardware installation is floppy disk. While making an emulated floppy installation is a sensible (though not necessary) early step in OS-dev, given how much easier they are to configure and write drivers for than hard drives, hardly anyone today has actual floppy hardware.

While at least some of the details of preparing images will depend on the emulator or virtualizer being used, the majority of the instructions are going to be the same for both live hardware and emulation, anyway. This is probably why the instructions are how they are now, but it is still misleading.

I'll probably have more to say in a while, but this is enough to start. I want to see what others say before I make any changes myself, especially since I am not as much of a Subject Matter Expert on this as some of the others here.

BTW, is there any way to sandbox up a page for general editing, where would could moot out the fixes before putting them in the page proper (basically, making a branch edit of the pages)? I could set one up in my own user section, but I'm not sure if those pages can be edited by other people aside from the admins.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


Top
 Profile  
 
 Post subject: Re: Problem with the Grub wiki page.
PostPosted: Sun Nov 19, 2017 3:30 pm 
Offline
Member
Member
User avatar

Joined: Fri Oct 27, 2006 9:42 am
Posts: 1144
Location: Athens, GA, USA
Uhm, does anyone have anything to ad on this? As I said, I think that significant work needs to be done here, and intend to start on it soon-ish, but I really think this needs careful consideration and some discussion before I start performing major surgery on the page.

I have started making some proposed changes, which can be found here. I do intend to do a lot more work on this, hence the areas that are basically stubbed out.

_________________
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
μή εἶναι βασιλικήν ἀτραπόν ἐπί γεωμετρίαν
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group