Skip to contentSkip to conversation

roles of grub-install and grub-setup?

DISCUSSION rob wilco 2 participants 2 messages Apr 6, 2007 – Apr 7, 2007

lore
Share & tools
lore

rob wilco

author
#0 lore raw

Hello list,

I want to boot a system laying on lvm, on an intel mac mini, I used :

# grub-mkimage -o /boot/grub/core.img pc lvm ext2

Q1 : Are the cited modules sufficient? Does the 'pc' module means someting like BIOS or MBR partition table?

Q2 : What is the difference between grub-install and grub-setup? What is their respective role?
They both seem to alter the mbr.
- I did a checksum of the MBR
- then I used grub-setup and the MBR checksum changed
- then I used grub-install and the MBR checksum changed again

Here are the details

# dd if=/dev/sda count=2  2> /dev/null | md5sum
1e97dbbfd7a2edcffb858318ddf1a554  -
# grub-setup /dev/sda
# dd if=/dev/sda count=2  2> /dev/null | md5sum
a7afaf2c2c65fde00c1696d34def882f  -
# grub-install /dev/sda > /dev/null
# dd if=/dev/sda count=2  2> /dev/null | md5sum
1e97dbbfd7a2edcffb858318ddf1a554  -
# grub-setup /dev/sda
# dd if=/dev/sda count=2  2> /dev/null | md5sum
1e97dbbfd7a2edcffb858318ddf1a554  -
# grub-install /dev/sda > /dev/null
# dd if=/dev/sda count=2  2> /dev/null | md5sum
1e97dbbfd7a2edcffb858318ddf1a554  -

Thanks,

#1 lore raw
Quoted 6 lines · rob wilco

I want to boot a system laying on lvm, on an intel mac mini, I used :

# grub-mkimage -o /boot/grub/core.img pc lvm ext2

Q1 : Are the cited modules sufficient? Does the 'pc' module means someting like BIOS or MBR partition table?

The pc module provides support for PC-type (DOS-compatible) partition map.

I cannot tell you if they are enough. I myself didn't play legacy boot very much.

Quoted 2 lines

Q2 : What is the difference between grub-install and grub-setup? What is their respective role?

grub-setup is a low-level tool to set up GRUB to be bootable. grub-install is a wrapper script to provide an easier interface to install GRUB. Normally, you should want to use grub-install.

Okuji