View previous topic :: View next topic |
Author |
Message |
AJ_hime n00b
Joined: 16 Nov 2014 Posts: 2
|
Posted: Mon Nov 17, 2014 2:56 pm Post subject: Advice on setting the boot partition, anyone? |
|
|
Hi. Sorry if my English is kind of awkward.
I have two drives. First one, sda, has a NTFS and Windows boot partitions. Second drive, sdb, has two ext4 partitions which I was going to mount as root and home. So, the question is - where should the boot partition be?
For example, if I create a new one on sdb2 and place GRUB there, will it be able to load Windows? Or can Windows boot partition be used for it somehow? |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Mon Nov 17, 2014 4:17 pm Post subject: |
|
|
Hi,
in the past, when the Bios could only read the 1024 first sectors of an hard drive, having the bootloader, the kernel an the initrd files inside those sectors was mandatory to load them. A boot partition was created inside the 1024 first sectors to be sure that those files where written there.
Now, it is different. I you want to have a boot partition, it can be created anywhere on the hard drive. Except in some special cases, the Bios/efi firmware and the bootloader will access the files they need there.
So, the place of the boot partition is not forced to be at the beginning of an hard drive, even if it's stay a good place. From the moment the bootloader have been read and load in memory by the Bios/Efi firmware, the bootloader is suppose to be able to access the same mass medias than Bios/Efi firmware itself.
So, even if the boot partition is on sdb, the bootloader should be able to chainload to the boot partition of Windows in sda with the appropriate setup for that.
It is important to mount the boot partition in the /boot directory of the Gentoo root partition at anytime if you want the data that are write in the /boot directory be written in the boot partition. Otherwise, they will be written in the root partition.
For a bootloader like Grub who will read the Linux kernel and the initramfs in the boot partition, the path will be for example, /vmlinuz and /initramfs and not /boot/vmlinuz and /boot/initramfs.
If you want not to bother about this, from Gentoo when the boot partition is mounted, do as root user
Code: | cd /boot
ln -s . boot |
Than you can use /vmlinuz and /initramfs or /boot/vmlinuz and /boot/initramfs as the path to load the kernel and the initramfs with the bootloader. All those path will work. _________________ Paul |
|
Back to top |
|
|
AJ_hime n00b
Joined: 16 Nov 2014 Posts: 2
|
Posted: Mon Nov 17, 2014 5:24 pm Post subject: |
|
|
Thanks, that was really helpful (and fast)! I'll be sure to try it out.
And another question right away. I assume, if both boot partitions will be intact, loading will proceed from the drive which is given higher number in BIOS load order. So, I'll need to set sdb as first boot device, right? |
|
Back to top |
|
|
Logicien Veteran
Joined: 16 Sep 2005 Posts: 1555 Location: Montréal
|
Posted: Tue Nov 18, 2014 7:13 pm Post subject: |
|
|
If Windows is booting in BIOS mode and you want to keep it's bootloader in the Mbr of sda, install the Gentoo bootloader in the Mbr of sdb and change the BIOS boot order.
If Windows is booting in Efi mode, than, you need an Efi bootloader for Gentoo and install it in the Efi partition.
Note that, in BIOS mode, you can use the Gentoo bootloader to boot Windows, so, you can erase the Windows bootloader in the Mbr by replacing it by the Gentoo one. _________________ Paul |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|