I am trying to dual boot my laptop with linux alongside windows. Now one of the things I will probably need to do is that first install linux to my desired partition and then boot from a live cd and then select my boot partition and then install and configure grub on my boot partition.

Instructions are listed here.

Now what I find redundant is that why do I need to chroot if the installation command is as follows -:

grub-install /dev/sd1

What was the use of chrooting or even mounting the linux partitions if grub can just simply install to a partition of my choice from the command line ?

Why would I even mount the virtual filesystems in the following manner -:

for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done

Is it because when I have booted into live mode from my installation disk the grub files are present in the installed Linux OS that I must access in order for the installation to proceed ? ie. to be able to run grub-install ?

If the grub files are there on the installation media then it seems pretty irrelevant to do the mounting and chrooting ?

Correct me if I am wrong but all that chroot does is change the root directory of the current and child process, right ?

  • @Fox Yes I want specific settings. The question was why was the chroot neded if grub-install has an option to install to a specific partition. I will not be installing GRUb during Linux installation, since I need to configure chainloading of Windows from Grub. – ng.newbie May 9 '17 at 16:36
  • @Fox I have an UEFI system so the default installations won't work. Just tell me something, the /boot/grub directories are they present in the installed linux system or are they present on the installation media ? in other words do I chroot to just get access to /boot/grub directories ? I can just copy them into my EFI partition without a chroot – ng.newbie May 10 '17 at 6:48
  • @Fox yeah so if the installation media has GRUB why chroot into it ? If I use an Ubuntu image to install to my system and use the same image to do a live boot to install GRUB why is chrooting required ? – ng.newbie May 10 '17 at 7:00
  • @Fox Well there is a few things to do manually in my experience, since the chainloading for windows needs to configured, especially if you are using an EFI system – ng.newbie May 10 '17 at 7:50
  • Let us continue this discussion in chat. – Fox May 10 '17 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.