Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a HD which has 3 partitions, in the following order:

  1. NTFS
  2. FAT32
  3. FAT32 (very small)

I want to install GRUB into the MBR of the HD, and place the config files (menu.lst, etc.) into the 3rd partition.

I will use the --root-directory command-line parameter.

What happens if I change the partition layout after GRUB installation? Will GRUB be able to read those files, even if the partition they belong to becomes the 2nd or 4th one on the disk?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Grub will look at the partition table entries of your drive. So if you modify the drive in the future, you might have to both re-install grub to the MBR and update the config file so that each root entry points at the right partition.

Also note that the partition numbering is different for old (the 'legacy' 0.9x) and new (1.9x) grub versions. The original grub counts partitions starting at 0, while the 'new' one starts with 1.

share|improve this answer
    
Ok then, thanks. –  ignis Aug 15 '11 at 18:44
    
where “re-install grub” means “run grub-install”, and “edit the config file” means “run update-grub if you have it, and edit /boot/grub/menu.lst (legacy = 0.9x) or /boot/grub/grub.cfg (Grub2 = 1.9x)”. –  Gilles Aug 15 '11 at 22:47
    
Yes, could be - but not necessarily. Installation (at least on grub-legacy) can be also performed via the interactive shell, as I described here. Also the config file on my system is /boot/grub/grub.conf. –  rozcietrzewiacz Aug 16 '11 at 21:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.