grub2 - How do I find out if I have a separate boot partition? - Ask Ubuntu


i have ubuntu 16.10 on laptop , i'm planning on dual-booting windows 7. problem is, after install windows 7, break grub. need know if have separate boot partition can restore grub correct place using ubuntu live usb.

this picture gparted. sda3 partition created windows 7.

enter image description here

you don't have separate /boot partition.

  • /dev/sda1 ubuntu root partition (mount point /, includes folders not mounted anywhere else, including /boot in case)

  • /dev/sda2and/dev/sda3are partitions windows, small 1 going hidden system partition while big 1 show yourc:` drive in windows.

  • /dev/sda4 not "real" partition data, it's so-called "extended partition" means it's container may hold number of logical volumes (which behave normal partitions again). extended partitions needed because msdos/mbr partition table can have 4 primary partitions or 3 primary , 1 extended (containing number of logical) partitions.

  • /dev/sda5 linux swap partition, used swap memory pages out of ram when gets full.

however, boot using grub, must install disk (/dev/sda) , not of partitions, using e.g. sudo grub-install /dev/sda. should done either running ubuntu installation on disk (which not possible need restore grub first) or chroot live ubuntu environment mounted ubuntu partition. works this:

  1. boot ubuntu live dvd or usb drive. should same architecture (32/64bit) , ideally same release installed ubuntu. select "try ubuntu without installing".
  2. open terminal (ctrl+alt+t) , run following commands mount ubuntu partition , chroot it:

    sudo mount /dev/sda1 /mnt x in /dev /dev/pts /proc /sys ; sudo mount --bind "$x" "/mnt/$x" ; done sudo chroot /mnt 
  3. your terminal prompt should have changed now, logged in shell session root user ubuntu installation on disk, not live system. here type these commands reinstall grub disk. note don't need sudo here reason. also, second command omitted, doesn't hurt:

    grub-install /dev/sda update-grub 
  4. exit chroot session again typing exit or pressing ctrl+d. unmount mounted partitions again:

    sudo umount -r /mnr 
  5. exit terminal , reboot disk, ejecting live medium booted from.


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User