OSDev.org

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

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Find disk with GRUB
PostPosted: Fri Nov 02, 2018 4:23 am 
Offline

Joined: Thu Mar 01, 2018 10:09 am
Posts: 16
Good day! I can not set the correct parameters for GRUB. No matter how hard I try, I end up with zero connected modules / mods. In GRUB checked the disk, UUID and partition, in grub indicated correctly.

Code:
insmod part_msdos
insmod ext2
set root='hd0,msdos1'

menuentry "os" {
   search --no-floppy --fs-uuid --set=root a15a3016-0700-4ca1-8f4f-e05f0d946417
   multiboot /boot/os root=UUID=a15a3016-0700-4ca1-8f4f-e05f0d946417
}


Code:
if(mboot_ptr->mods_count > 0) //always a false


Top
 Profile  
 
 Post subject: Re: Find disk with GRUB
PostPosted: Fri Nov 02, 2018 4:43 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
I don't see you loading any modules for your OS, just modules for GRUB.

Maybe you're confusing the insmod and module commands?


Top
 Profile  
 
 Post subject: Re: Find disk with GRUB
PostPosted: Fri Nov 02, 2018 4:52 am 
Offline

Joined: Thu Mar 01, 2018 10:09 am
Posts: 16
Octocontrabass wrote:
Maybe you're confusing the insmod and module commands?


Maybe. Previously, I used the module for loading the initd. Maybe my question will be stupid. But how then can I connect the hard disk partition through the modules?

Code:
menuentry "os" {
   multiboot /boot/os
   module ????
}


I'm trying to get at least some superblock information.


Top
 Profile  
 
 Post subject: Re: Find disk with GRUB
PostPosted: Fri Nov 02, 2018 5:11 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5100
Isn't that what the UUID in your kernel command line is for? Scan the available partitions for the one with the matching UUID.

Modules have to be files for GRUB to load them, so I don't see any way to have a partition be a module.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 31 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