GRUB
From Alessandro's Wiki
Grub 2
- command that generates and prints out configuration:
grub-mkconfig
- save configuration
grub-mkconfig -o /boot/grub/grub.cfg
- get OS's list of labels
grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2 Fedora Ubuntu 12.04.2 LTS (12.04) Gentoo Base System release 2.1
- show actual default entry
grub2-editenv list saved_entry=Fedora Linux, with Linux 3.6.6-1.fc17.i686.PAE
- alter default entry
grub2-set-default "Gentoo Base System release 2.1"
- check...
grub2-editenv list saved_entry=Gentoo Base System release 2.1
Grub 1.X
Installing GRUB in the Master Boot Record
- Con grub-install
grub-install /dev/hda
o meglio... (se si sta installando il sistema)
chroot /mnt/sysimage/
- con la directory boot sta nella /
/sbin/grub-install --root-directory=/boot /dev/md1
- con la directory boot è una partizione
/sbin/grub-install --root-directory=/ /dev/md0
- find grub copies:
grub> find /grub/stage1
- or...
grub> find /boot/grub/stage1
- grub (/usr/sbin/grub)
grub> device (hd0) /dev/sdb (/dev/hdb for ide) grub> root (hd0,0) (La partizione di boot, Disco 0 Partizione 0) grub> setup (hd0) (Installa GRUB nel MBR) grub> quit (Esci dalla shell GRUB)
Immagine sfondo grub
1. xpm.gz file 2. 640x480 3. 14 colors 4. copiare in /boot/grub 5. gzip myfile.xpm
VGA modes
| 640x480 800x600 1024x768 1280x1024 ----+------------------------------------- 256 | 0x301 0x303 0x305 0x307 32k | 0x310 0x313 0x316 0x319 64k | 0x311 0x314 0x317 0x31A 16M | 0x312 0x315 0x318 0x31B