GRUB: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
== GRUB == | == GRUB 2 == | ||
=== Packages === | |||
{{Box Code|emerge grub -pv| | |||
<pre> | |||
[ebuild N *] sys-boot/grub-1.99_rc1 USE="-custom-cflags -debug -multislot -static -truetype" 4,157 kB | |||
</pre> | |||
}} | |||
=== Installation === | |||
{{Codeline|# mount /boot}} | |||
{{Codeline|# emerge grub}} | |||
{{Codeline|# grub-mkconfig -o /boot/grub/grub.cfg}} | |||
"Normal" installation: | |||
{{Codeline|# grub-install --recheck --no-floppy /dev/sda}} | |||
HP Server /dev/cciss installation: | |||
{{Codeline|# grub-install --recheck --no-floppy /dev/cciss/c0d0}} | |||
/sbin/grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it.. | |||
/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. | |||
/sbin/grub-setup: error: will not proceed with blocklists. | |||
{{Codeline|# grub-install --recheck --no-floppy /dev/cciss/c0d0 --force}} | |||
/sbin/grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it.. | |||
/sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. | |||
Installation finished. No error reported. | |||
{{Codeline|# umount /boot}} | |||
=== Configuration === | |||
=== simple === | |||
<pre> | |||
### BEGIN /etc/grub.d/10_linux ### | |||
menuentry "Gentoo GNU/Linux" --class gentoo --class gnu-linux --class gnu --class os { | |||
set gfxpayload=keep | |||
insmod ext2 | |||
set root='(hd0,1)' | |||
search --no-floppy --fs-uuid --set ba16bd87-842c-46c2-a487-2a27d9be90dd | |||
echo Loading Linux ... | |||
linux /vmlinuz root=/dev/sda3 ro | |||
} | |||
menuentry "Gentoo GNU/Linux (recovery mode)" --class gentoo --class gnu-linux --class gnu --class os { | |||
set gfxpayload=keep | |||
insmod ext2 | |||
set root='(hd0,1)' | |||
search --no-floppy --fs-uuid --set ba16bd87-842c-46c2-a487-2a27d9be90dd | |||
echo Loading Linux ... | |||
linux /vmlinuz root=/dev/sda3 ro single | |||
} | |||
menuentry "Gentoo GNU/Linux, previous kernel" --class gentoo --class gnu-linux --class gnu --class os { | |||
set gfxpayload=keep | |||
insmod ext2 | |||
set root='(hd0,1)' | |||
search --no-floppy --fs-uuid --set ba16bd87-842c-46c2-a487-2a27d9be90dd | |||
echo Loading Linux ... | |||
linux /vmlinuz root=/dev/sda3 ro | |||
} | |||
menuentry "Gentoo GNU/Linux, previous kernel (recovery mode)" --class gentoo --class gnu-linux --class gnu --class os { | |||
set gfxpayload=keep | |||
insmod ext2 | |||
set root='(hd0,1)' | |||
search --no-floppy --fs-uuid --set ba16bd87-842c-46c2-a487-2a27d9be90dd | |||
echo Loading Linux ... | |||
linux /vmlinuz root=/dev/sda3 ro single | |||
} | |||
### END /etc/grub.d/10_linux ### | |||
</pre> | |||
=== cciss === | |||
<pre> | |||
### BEGIN /etc/grub.d/10_linux ### | |||
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os { | |||
load_video | |||
insmod part_msdos | |||
insmod ext2 | |||
set root='(hd0,msdos1)' | |||
search --no-floppy --fs-uuid --set=root b3727853-ae78-4a00-b21c-7b974c233e1c | |||
echo 'Loading Linux ...' | |||
linux /vmlinuzo root=/dev/cciss/c0d0p3 ro | |||
} | |||
menuentry 'Gentoo GNU/Linux (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os { | |||
load_video | |||
insmod part_msdos | |||
insmod ext2 | |||
set root='(hd0,msdos1)' | |||
search --no-floppy --fs-uuid --set=root b3727853-ae78-4a00-b21c-7b974c233e1c | |||
echo 'Loading Linux ...' | |||
linux /vmlinuz root=/dev/cciss/c0d0p3 ro single | |||
} | |||
menuentry 'Gentoo GNU/Linux, previous kernel' --class gentoo --class gnu-linux --class gnu --class os { | |||
load_video | |||
insmod part_msdos | |||
insmod ext2 | |||
set root='(hd0,msdos1)' | |||
search --no-floppy --fs-uuid --set=root b3727853-ae78-4a00-b21c-7b974c233e1c | |||
echo 'Loading Linux ...' | |||
linux /vmlinuz.old root=/dev/cciss/c0d0p3 ro | |||
} | |||
menuentry 'Gentoo GNU/Linux, previous kernel (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os { | |||
load_video | |||
insmod part_msdos | |||
insmod ext2 | |||
set root='(hd0,msdos1)' | |||
search --no-floppy --fs-uuid --set=root b3727853-ae78-4a00-b21c-7b974c233e1c | |||
echo 'Loading Linux ...' | |||
linux /vmlinuz.old root=/dev/cciss/c0d0p3 ro single | |||
} | |||
### END /etc/grub.d/10_linux ### | |||
</pre> | |||
=== Updating Grub 2 === | |||
{{Codeline|# mount /boot}} | |||
{{Codeline|# grub-install --recheck --no-floppy /dev/sda}} | |||
{{Codeline|# umount /boot}} | |||
== GRUB (old) == | |||
=== Packages === | === Packages === | ||
Revision as of 17:01, 2 March 2011
GRUB 2
Packages
Installation
# mount /boot
# emerge grub
# grub-mkconfig -o /boot/grub/grub.cfg
"Normal" installation:
# grub-install --recheck --no-floppy /dev/sda
HP Server /dev/cciss installation:
# grub-install --recheck --no-floppy /dev/cciss/c0d0
/sbin/grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it.. /sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. /sbin/grub-setup: error: will not proceed with blocklists.
# grub-install --recheck --no-floppy /dev/cciss/c0d0 --force
/sbin/grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it.. /sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged.. Installation finished. No error reported.
# umount /boot
Configuration
simple
### BEGIN /etc/grub.d/10_linux ###
menuentry "Gentoo GNU/Linux" --class gentoo --class gnu-linux --class gnu --class os {
set gfxpayload=keep
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set ba16bd87-842c-46c2-a487-2a27d9be90dd
echo Loading Linux ...
linux /vmlinuz root=/dev/sda3 ro
}
menuentry "Gentoo GNU/Linux (recovery mode)" --class gentoo --class gnu-linux --class gnu --class os {
set gfxpayload=keep
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set ba16bd87-842c-46c2-a487-2a27d9be90dd
echo Loading Linux ...
linux /vmlinuz root=/dev/sda3 ro single
}
menuentry "Gentoo GNU/Linux, previous kernel" --class gentoo --class gnu-linux --class gnu --class os {
set gfxpayload=keep
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set ba16bd87-842c-46c2-a487-2a27d9be90dd
echo Loading Linux ...
linux /vmlinuz root=/dev/sda3 ro
}
menuentry "Gentoo GNU/Linux, previous kernel (recovery mode)" --class gentoo --class gnu-linux --class gnu --class os {
set gfxpayload=keep
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set ba16bd87-842c-46c2-a487-2a27d9be90dd
echo Loading Linux ...
linux /vmlinuz root=/dev/sda3 ro single
}
### END /etc/grub.d/10_linux ###
cciss
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os {
load_video
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root b3727853-ae78-4a00-b21c-7b974c233e1c
echo 'Loading Linux ...'
linux /vmlinuzo root=/dev/cciss/c0d0p3 ro
}
menuentry 'Gentoo GNU/Linux (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os {
load_video
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root b3727853-ae78-4a00-b21c-7b974c233e1c
echo 'Loading Linux ...'
linux /vmlinuz root=/dev/cciss/c0d0p3 ro single
}
menuentry 'Gentoo GNU/Linux, previous kernel' --class gentoo --class gnu-linux --class gnu --class os {
load_video
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root b3727853-ae78-4a00-b21c-7b974c233e1c
echo 'Loading Linux ...'
linux /vmlinuz.old root=/dev/cciss/c0d0p3 ro
}
menuentry 'Gentoo GNU/Linux, previous kernel (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os {
load_video
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root b3727853-ae78-4a00-b21c-7b974c233e1c
echo 'Loading Linux ...'
linux /vmlinuz.old root=/dev/cciss/c0d0p3 ro single
}
### END /etc/grub.d/10_linux ###
Updating Grub 2
# mount /boot
# grub-install --recheck --no-floppy /dev/sda
# umount /boot
GRUB (old)
Packages
32bit
Installation
# mount /boot
# emerge grub
Configuration
Normal
1 HDD 3 Partitions (boot/swap/root) - Linux only
Template:Box File # grub-install --no-floppy /dev/sda
1 HDD - Linux and Windows
2 HDD - Linux and Windows
x HDD - Linux and Windows
Software RAID-1
Hardware RAID (HP/Compaq Smart Array RAID controller)
# grub-install --no-floppy /dev/cciss/c0d0
Finalize
If the menu.lst symlink doesn't exist we MUST create it
# cd /boot/grub
# ln -snf grub.conf menu.lst