Grub

From Geitenpad
Revision as of 14:34, 5 January 2025 by Rijk (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Grub 1

  • Boot van live cd
   sudo grub
   find /boot/grub/stage1
   root (hd?,?) met op vraagtekens uit 3)
   setup (hd0)

Grub 2

Reinstall from live cd

  • Boot van live cd

Here assuming the Ubuntu partition is sda7,and /boot partition is sda6 (if you have a separate /boot partition). Boot up ubuntu from the livecd,open terminal and run: sudo -i

mount /dev/sda7 /mnt
mount /dev/sda6 /mnt/boot #skip this one if not have a separate /boot partition
grub-install --root-directory=/mnt/ /dev/sda

If you miss “grub.cfg” file,use following to recreate: mount --bind /proc /mnt/proc

mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt update-grub
umount /mnt/sys
umount /mnt/dev
umount /mnt/proc
exit

Change default

sudo vim /etc/default/grub

change GRUB_DEFAULT=6

sudo update-grub

Screen resolution on 4k

sudo vim /etc/default/grub

change GRUB_GFXMODE=1024x768

Of naar iets van de volgende modes: Videomodes

sudo update-grub

Extra resources

https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd