OSDev.org
https://forum.osdev.org/

Find disk with GRUB
https://forum.osdev.org/viewtopic.php?f=13&t=33289
Page 1 of 1

Author:  grenders22 [ Fri Nov 02, 2018 4:23 am ]
Post subject:  Find disk with GRUB

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

Author:  Octocontrabass [ Fri Nov 02, 2018 4:43 am ]
Post subject:  Re: Find disk with GRUB

I don't see you loading any modules for your OS, just modules for GRUB.

Maybe you're confusing the insmod and module commands?

Author:  grenders22 [ Fri Nov 02, 2018 4:52 am ]
Post subject:  Re: Find disk with GRUB

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.

Author:  Octocontrabass [ Fri Nov 02, 2018 5:11 am ]
Post subject:  Re: Find disk with GRUB

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/