Skip to contentSkip to conversation

Grub overview/tutorial available

DISCUSSION Simon Kitching 4 participants 6 messages Apr 17, 2010

lore
Share & tools
lore
#0 lore raw

Hi All,

Just FYI, I've written up what I've learned about Grub during the last few weeks and put it up here:

http://people.apache.org/~skitching/MineOfInformation/linux/Booting_Linux_on_x86_with_Grub2.html

This is more detailed than simple "user level", but doesn't get into any code details. More at the "advanced sysadmin" level perhaps.

Any feedback/corrections welcome; I'm fairly new to Grub so probably have some mistakes in there.

Regards,
Simon

#1 lore raw

Quoting Simon Kitching, who wrote the following on Sat, 17 Apr 2010:

Quoted 7 lines

Hi All,

Just FYI, I've written up what I've learned about Grub during the last few weeks and put it up here:

http://people.apache.org/~skitching/MineOfInformation/linux/Booting_Linux_on_x86_with_Grub2.html

This is excellent -- thanks for writing this up. One difference with the
current code, though. The partition naming has been changed from (hdX,Y) to (hdX,<partitiontype>Y[,...]) (i.e. (hd0,msdos1) for the first partition specified by the "dos" partition table on the first disk; (hd0,msdos1,sunpc1) means slice 0 on the Solaris partition defined by the first "dos" partition on the first drive).

Thanks,
--S

#2 lore raw
In reply to Simon Kitching
Quoted 7 lines · On Sat, 17 Apr 2010 17:39:48 +1200 Simon Kitching <[email protected]>…

Hi All,

Just FYI, I've written up what I've learned about Grub during the last few weeks and put it up here:

http://people.apache.org/~skitching/MineOfInformation/linux/Booting_Linux_on_x86_with_Grub2.html

Quoted 8 lines

This is more detailed than simple "user level", but doesn't get into any code details. More at the "advanced sysadmin" level perhaps.

Any feedback/corrections welcome; I'm fairly new to Grub so probably have some mistakes in there.

Regards,
Simon

Hello Simon,

nice piece of work. thanks for the article. It would be nice if you stress on gfxterm too. It is the area where we still lacking relevant information. just my thought.

thanks

#3 lore raw
In reply to Simon Kitching
Quoted 5 lines · Simon Kitching

Hi All,

Just FYI, I've written up what I've learned about Grub during the last few weeks and put it up here:

Quoted 8 lines

http://people.apache.org/~skitching/MineOfInformation/linux/Booting_Linux_on_x86_with_Grub2.html

This is more detailed than simple "user level", but doesn't get into any code details. More at the "advanced sysadmin" level perhaps.

Any feedback/corrections welcome; I'm fairly new to Grub so probably have some mistakes in there.

"This tool(grub-emu) can be used to install Grub." <--- wrong (outdated) " Note also that there are a few commands that can be run in the “grub shell” that are not available in a real Grub environment (because they would be pointless)," <--- likewise
insmod /boot/grub/normal.mod normal <-- only one of 2 arguments and it won't set prefix resulting in further problems. Correct action is:

set prefix=(<disk>)/boot/grub
insmod normal
normal

'Grub “legacy” (the 0.x series) could only boot kernels that support the “multiboot” specification.' <--- grub legacy has a linux loader too 'As Grub2 boots kernels by invoking a helper module (“linux”, “xnu”, “bsd”), it can boot any kernel for which the appropriate helper module has been written. Of course if a kernel supports multiboot, then writing such a helper module is much simpler!'
Modules are NOT ''helpers'. They are separate loaders. and multiboot needs no 'helpers'

    linux $root/mykernel root=xyz ---->  linux ($root)/mykernel root=xyz

' search –set=MYDEV – search.label mylabel MYDEV' at very least actually try the commands you supply

Quoted 12 lines

Regards,
Simon

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
#4 lore raw
Quoted 8 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 7 lines · Simon Kitching

Hi All,

Just FYI, I've written up what I've learned about Grub during the last few weeks and put it up here:

http://people.apache.org/~skitching/MineOfInformation/linux/Booting_Linux_on_x86_with_Grub2.html

Quoted 7 lines
Quoted 6 lines

This is more detailed than simple "user level", but doesn't get into any code details. More at the "advanced sysadmin" level perhaps.

Any feedback/corrections welcome; I'm fairly new to Grub so probably have some mistakes in there.

"This tool(grub-emu) can be used to install Grub." <--- wrong (outdated)

Fixed.

Quoted 3 lines

" Note also that there are a few commands that can be run in the “grub shell” that are not available in a real Grub environment (because they would be pointless)," <--- likewise

Fixed.

I wrote this because in the command list documentation
(http://grub.enbug.org/CommandList), there is reference to a "loopback" command as a replacement for grub legacy 'device' command, and I can't see what use that would have in a real grub boot enviroment.

But as I'm not really sure about this, I'll just delete this section.

Quoted 7 lines

insmod /boot/grub/normal.mod normal <-- only one of 2 arguments and it won't set prefix resulting in further problems. Correct action is:

set prefix=(<disk>)/boot/grub
insmod normal
normal

Quoted 8 lines

'Grub “legacy” (the 0.x series) could only boot kernels that support the “multiboot” specification.' <--- grub legacy has a linux loader too 'As Grub2 boots kernels by invoking a helper module (“linux”, “xnu”, “bsd”), it can boot any kernel for which the appropriate helper module has been written. Of course if a kernel supports multiboot, then writing such a helper module is much simpler!'
Modules are NOT ''helpers'. They are separate loaders. and multiboot needs no 'helpers'

Fixed.

Quoted 5 lines
    linux $root/mykernel root=xyz ---->  linux ($root)/mykernel root=xyz

' search –set=MYDEV – search.label mylabel MYDEV' at very least actually try the commands you supply

Fixed.

Grub-emu doesn't work for me, and I eventually got tired of rebooting my (only) PC to test things. Should have tried harder though :-(.

Thanks for your comments. Thanks also to Seth...

Regards,
Simon

#5 lore raw
Quoted 8 lines

I wrote this because in the command list documentation
(http://grub.enbug.org/CommandList), there is reference to a "loopback" command as a replacement for grub legacy 'device' command, and I can't see what use that would have in a real grub boot enviroment.

Retrieving files from fs image or tar(.gz) archives.

Quoted 4 lines

Grub-emu doesn't work for me, and I eventually got tired of rebooting my (only) PC to test things. Should have tried harder though :-(.

qemu

Quoted 13 lines

Thanks for your comments. Thanks also to Seth...

Regards,
Simon

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 2 lines
Regards
Vladimir 'φ-coder/phcoder' Serbinenko