Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-31-2017, 04:48 PM
|
#1
|
LQ Newbie
Registered: Aug 2017
Posts: 24
Rep:
|
Help with Dual Boot Linux Arch and Win10
Hi guys, I'm pretty new to Linux in general. Can you help me to setup the dual boot? I tried but when I installed grub I couldn't enter in my Windows partition anymore, I had to remove the Linux partition and from windows cd console run /FixBoot (without deleting the linux partition it wasn't fixing it). I'm pretty sure there was a better way to handle this and I hope you can help me to avoid this the next time
I have a gigabyte motherboard that have some problem with linux, basically USB Port, LAN e PCI-E wifi cards are not recognized unless you enable in the bios the IOMMU Controller and the SVM. I followed this guide ( https://www.youtube.com/watch?v=_ky20Ywo3Eo) and everything works fine.
My Windows partition boots in BIOS-MBR mode (run -> msinfo32 -> BIOS Mode = Legacy). In my first try I created one partition of about 100GB ext4 with fdisk (I read it supports MBR)
Those are the disks and partitions
https://s26.postimg.org/d58dc7om1/partitions.png
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Disk 2 (C Is a SSD with Windows 10 inside
Disk 1 (D Its a data disk where I store stuff
Disk 0 Its little weird because I have a partition "System Reserved" of 500MB that should be of Windows boot? when I installed Windows 10 it created thatg 500MB partition there instead than the Disk 2 (the SSD)
Disk 0 (A its a data disk like Disk1, right now its empty
Disk 0 Unallocated its where I want to install Linux Arch
If you think the partitions are messed up I can reinstall everything from the start, I have everything backuped so its not a big deal
So now I want to reinstall linux in Disk0 Partition 3 (97.66GB), I dont need a swap partition as I have 8gb of RAM, my installation goes generally like this:
check internet works
make partition with fdisk
$ mkfs.ex4 /dev/sda3
$ mount /dev/sda3 /mnt
$ pacstrap -i /mnt base base-devel
$ genfstab -U -p /mnt >> /mnt/etc/fstab
$ arch-chroot /mnt /bin/bash
$ rm /etc/localtime
$ ln -s /usr/share/zoneinfo/Europe/Rome /etc/localtime
$ hwclock --systohc --utc
$ nano /etc/locale.gen
Remove comment en_US.UTF-8 and it_IT.UTF-8
$ locale-gen
$ nano /etc/locale.conf
Write this content:
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=it_IT.UTF-8
LC_COLLATE=en_US.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=
$ export LANG=en_US.UTF-8
$ nano /etc/vconsole.conf
Write
KEYMAP=it
$ echo NameComputer > /etc/hostname
$ systemctl enable dhcpcd
$ passwd
$ nano /etc/mkinitcpio.conf
$ mkinitcpio -p linux
--------------------------------------------
HERE I INSTALLED THE GRUB
-------------------------------------------->
$ pacman -S grub-bios
$ grub-install --target=i386-pc /dev/sda3 (The partition where I installed linux)
$ grub-mkconfig -o /boot/grub/grub.cfg
<--------------------------------------------
$ useradd -m -G wheel-s /bin/bash name_account
$ passwd name_account
$ nano /etc/sudoers
Remove comment %wheel
$ pacman -S openssh
$ systemctl enable sshd.service
$ exit
$ umount -R /mnt
$ reboot
After this I can see grub with only Arch Linux. If I try to start Windows "manually" through F12 and the selection of the ssd with windows inside it doesnt work, it shows grub with the arch linux option
Sorry for this long post and for the many english errors, I tried to be clear as possible
|
|
|
08-31-2017, 06:49 PM
|
#2
|
Member
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 659
Rep:
|
First identify where your BIOS boots now, and where you want it to boot with GRUB.
If the BIOS goes to the MBR of the SSD to boot Windows10, and your GRUB is installed on the MBR of Disk0, then that is a complication that GRUB needs to know about.
You need to mention if there are any other Boot loaders on your system to contend with.
Does the BIOS have boot selection, or you could have Windows Boot selection ?
I would assume that if you are installing GRUB that you either do not have any of these
or have chosen to not use them. If your installing GRUB bypasses a boot selection that
you were using before, that would affect the setup. GRUB can handle these special cases but you first need to discover if you have any.
MBR = Master Boot Record
Which drive is GRUB being installed upon (otherwise we assume it is in the Drive0 MBR).
Was the default boot using the SSD MBR ?
Are you moving the BIOS boot to Disk0 MBR ?
GRUB needs to be setup to see the Windows10 installation on the SSD.
The default setup of GRUB will not include that (as far as I know) unless you specify all the information to locate the Windows10, and you must be specific that it is on a different drive than the GRUB boot.
It is possible to install GRUB over the existing MBR, which will clobber the ability of any OTHER boot selection program to boot using that MBR.
If GRUB is installed to a different drive MBR, then the existing boot selection will still work. However, to boot using GRUB would then require changing the BIOS to boot using the MBR of the drive where GRUB was installed. I have no idea what that might do to your F12 booting.
It is usual to have only ONE boot selection program. Other boot selection programs then can be chained to it. Having two different events trigger two different kinds of boot selections programs leading to two different OS will require careful setup, by someone who knows more about that F12.
I refer you to the GRUB installation manual for details, as that covers all this.
Last edited by selfprogrammed; 08-31-2017 at 07:00 PM.
|
|
|
08-31-2017, 07:34 PM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,286
|
It should be as simple as installing the os-prober package in Arch - grub by itself doesn't go looking for other installs, but if os-prober is present grub will use it. So before the mkconfig, install os-prober, then you should have a (valid) entry to boot Win10.
I'm surprised a fresh install of Win10 will install to a MBR disk - I have a couple, but they were upgrades from Win7.
|
|
1 members found this post helpful.
|
09-01-2017, 12:10 PM
|
#4
|
LQ Newbie
Registered: Aug 2017
Posts: 24
Original Poster
Rep:
|
@selfprogrammed
Hi thanks for your answer, I installed grub in the same hard disk where I installed linux (Disk 0, partition 3)
I just need grub for the OS selection, in the other post I was mentioning the manual booting through F12 because I didn't understand why I couldn't access windows anymore after I installed grub, even "manually" selecting on boot the ssd with windows it still would display grub (that was installed in another hard disk), basically I couldn't enter in window, I had to remove linux and fix the boot of windows with usb, if I tried without removing linux the command /FixBoot would give some error
@syg00
Thank you im gonna try it tomorrow. The installation was fresh, I think its because of my (default) bios settings:
Boot Mode Selection = UEFI and Legacy
Storage Boot Option Control = Legacy First
Other PCI Devices ROM Priority = UEFI OpROM (this one disturb me, I mean everything is legacy except it, go figure..)
I kind of wanted to reinstalled everything on UEFI but for what its worth..
|
|
|
09-01-2017, 06:57 PM
|
#5
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,286
|
In this day and age, you should use UEFI when-ever you can. That basically means always. Format your disks as gpt as well - same reason; less trouble going forward.
|
|
|
09-01-2017, 11:02 PM
|
#6
|
LQ Newbie
Registered: May 2012
Posts: 17
Rep:
|
Dual Booting Systems
I am a hardware guy and the way I dual boot a system is to interchange the hard drive with another drive.
First, let me describe my systems. I have a LARGE, ALL MY DATA, hard drive on my router which is accessible from all computers via the LAN. My main computer is a tower with front plug-in drive slots. If I want to try another operating system, I merely pull the old hard drive and plug in a new drive. Small drives are cheap now and Linux doesn't take much space. If I like the new operating system, I plug my old drive into a USB port and copy the files to the new drive.
I recently had a need for Windoz 10 so I purchased a Small Form Factor (SFF) computer with Windoz 10 on it for less than $100. I did my work with Windoz then replaced the hard drive. I now have a dual boot computer with Windoz 10 and Linux Mint for under $150.
For you software guys - don't be afraid to open a computer. Here is a tip from an old hardware guy - if you are concerned about static electricity (AND YOU SHOULD BE) take off your shoes and socks.
Another tip - take the time document the loading process. It will save time the next time you want to do a load.
Have fun and get back to using your computer as quickly as possible.
KISS Keep It Simple S----d
|
|
|
09-02-2017, 03:32 AM
|
#7
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by syg00
In this day and age, you should use UEFI when-ever you can. That basically means always. Format your disks as gpt as well - same reason; less trouble going forward.
|
so the reason everybody should be using both gpt and uefi is "less trouble going forward"?
can you elaborate on that?
thanks.
|
|
|
09-02-2017, 08:58 AM
|
#8
|
Member
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224
Rep:
|
You should check the motherboard firmware settings to see how it is booting up. Normally windows 8 (probably 10 as well. I am less familiar with 10) wants to set up in UEFI/GPT mode. However, if you boot the install medium in legacy mode, windows will set itself up in legacy mode with an MSDOS-labeled disk and an MBR. The same holds for the Arch linux medium.
On UEFI boards, there is an F-key you have to press to bring up the firmware boot manager. If the ISO medium is hybrid (Arch definitely is), it should appear twice, if CSM is enabled. One entry has a UEFI prefix, the other is legacy. You can select whichever boot mode you want.
IMHOP a UEFI/GPT install is easier to maintain in the long run, especially for multi boot. The GPT label supports a large number of partitions. All are primary, so there is no logical partition contained in an extended partition as in a MSDOS labeled disk. Then there is the 2 TB limit. UEFI/GPT has no primary (MBR) and secondary (VBR) boot loaders. All are on the same footing, contained in the ESP in separate directories. You can register each boot loader in the NVRAM using efibootmgr, or delete the ones you don't need. In Arch, you mount the ESP at /boot, as per their instructions. I mount mine at /boot/efi, in keeping with all the other distros.
If it is a new board, you have to spend some time tinkering with the firmware settings, including flashing a new version. Some UEFI are more unfriendly than others. InSyde is especially nasty.
|
|
|
09-02-2017, 03:17 PM
|
#9
|
Member
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 659
Rep:
|
Installing GRUB in many systems is not guaranteed to find every OS.
That is why there are programs like os-finder, which automate the second step of adding all the other OS to the initial GRUB boot menu.
There is usually some manual editing afterwards of the GRUB setup, to add other boots or to adjust boots it found.
This would add the Windows10 to the boot menu.
The GRUB manual tells you how to bring up the GRUB menus, and how to add boots and edit them.
To deal with all kinds strange setups, GRUB has extensive capabilities, which the manual mentions. It is possible to set it up in strange ways that do not work.
While it is possible to install GRUB to a partition, I hope you meant GRUB
is in (Disk0, MBR). In a partition, another boot program (like a BIOS firmware boot)
would start, and then it would boot the main partition which has GRUB, and then GRUB
would boot other partitions. This is a complication for when it a BIOS makes it difficult
to change the drive MBR (such as root kit protection) or an OS that keeps checking that
the MBR has not been changed.
Your F12 key may be tied to using UEFI.
I do not know what the installation of GRUB may do to your firmware boot on F12 and the
UEFI tables. It may have cooperated with the install to an MBR and updated its UEFI somewhat appropriately to support its F12. That would make Windows10 inaccessible.
It may also be that GRUB did not get installed where you thought. It may have gone to the SSD MBR. It would boot just fine from there and you may not even know the difference.
Be careful reading your drive identification for these things, pay attention to those long ID numbers. When you add a drive, the other drive designations may (and usually do) move on you.
|
|
|
09-05-2017, 01:19 AM
|
#10
|
Member
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 197
Rep:
|
Quote:
Originally Posted by ondoho
so the reason everybody should be using both gpt and uefi is "less trouble going forward"?
can you elaborate on that?
thanks.
|
For the OPs install (imo) it would be much simpler being the machine is new and uefi and both OS installs are new. uefi intent is to phase out bios.
here is an informative article on uefi that might help OPs achieve dual boot via uefi:
https://www.happyassassin.net/2014/0...lly-work-then/
|
|
|
09-05-2017, 02:13 AM
|
#11
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,650
|
try installing grub to disk 1 mbr, it may work even if it is a dirty fix.
|
|
|
09-05-2017, 04:39 PM
|
#12
|
Member
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 659
Rep:
|
Some additional information, which may impact the original question, or other readers seeking information here.
I answered the original question about booting with GRUB using MBR.
I have other computers using MBR and have the tools and expertise for dealing with the drive sizes and BIOS I have to deal with, so far. So I answered the original question.
If I actually had a motherboard and BIOS that supported UEFI, and had no conflicting requirements, I would probably try to use that instead.
Using GPT for the partition tables simplifies them considerably. I already have 14 partitions on a drive and GPT supports that kind of thing more simply than the MSDOS partition table scheme. A large drive is also going to require GPT because the MSDOS partition table scheme is patched up beyond reason now and it is not going to get any more fixes to support those things.
One restriction with using GPT on a drive is you will not be able to move it to any other computer (for fixes, copy, or other maintenance) unless it also supports GPT partition tables. Once you have one computer using GPT, you will likely want to have two computers that use GPT. If you got only one computer, this is less of an issue, but it does not entirely go away, especially when situations arise where you need to do drive maintenance on a machine that will not boot.
There is one point that I am not clear on, but I assume (probably without good reason) that
having booting drives using UEFI and GPT still allows you to mount a drive that uses a MBR and MSDOS partitions. The BIOS setting for UEFI+Legacy is probably to support that issue as the BIOS has to read the partition tables of all hard drives. Setting the BIOS as UEFI only may prevent installing any Legacy drives to that machine. This may be an issue if you have multiple computers, or backup drives setting on a shelf, that you may want to install and read/write on a temporary basis.
I do not know the exact answer on that question, but if you do not have such requirements then using UEFI and GPT avoids some obsolescence issues that the MBR and MSDOS partitions have.
|
|
1 members found this post helpful.
|
09-07-2017, 12:56 PM
|
#13
|
LQ Newbie
Registered: Aug 2017
Posts: 24
Original Poster
Rep:
|
Hi guys, so I tried again but still no luck, but I think Im closer.
My setup is now changed.
I reinstalled Win10 with EFI, the bootloader is now in the same disk (the SSD) and I think its much more better now because even if grub is not seeing Win10 I can boot manually through F12 -> select SSD with Win10 (something I couldn't do before)
My new disks configuration here:
https://s26.postimg.org/yk8nqyt5j/disk.png
Disk 0 = linux arch
Disk 1 = its just data
Disk 2 = Win10
I reinstalled Arch and I made 3 partitions with gdisk:
sda1 = 500mb ef00
sda2 = 500mb 8300
sda3 = 100gb 8300
mkfs.fat -F 32 -n EFI /dev/sda1
mkfs.ext4 -L fs_boot -O ‘^64bit’ /dev/sda2
mkfs.ext4 -L fs_root /dev/sda3
(Are those commands ok? I saved them a while ago and I dont remember much about them to be fair, I know they serve to format the partitions, but I wonder whats that ‘^64bit’)
mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
mkdir /mnt/boot/efi
mount /dev/sda1 /mnt/boot/efi
then I installed grub:
pacman -S grub
pacman -S efibootmgr
grub-install --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
After this I tried but couldn't see Win10, so I installed os-prober, run it and run again the command:
grub-mkconfig -o /boot/grub/grub.cfg
I still can't see win10. I think I made a mistake with the path "--efi-directory=/boot/efi" maybe it was "--efi-directory=/boot" ? or maybe I have to save grub.cfg in another path
What do you think?
This is what its inside my /boot directory
https://s26.postimg.org/ophikqp7d/IM...907_183359.jpg
Greetings
|
|
|
09-07-2017, 02:10 PM
|
#14
|
Member
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224
Rep:
|
I am surprised that it didn't work. I wrote a bash script to install Arch. Here are some excerpts from that script that might be relevant
Code:
mount /dev/sda1 /mnt/boot/efi
Keep in mind that their web site recommends /mnt/boot. If you want support, you will have to follow their rules. However, since I am primarily a Fedora and Gentoo user, I wanted to be consistent. So far, there has not been a problem upgrading Arch linux using pacman -Syu.
For UEFI/GPT install
Code:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id="archlinux" --recheck
grub-mkconfig -o /boot/grub/grub.cfg
If you are installing on a MSDOS labeled disk or on a GPT disk with a 100MiB EF02 bios_grub layer
Code:
grub-install --target=i386-pc --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
The boot loader looks for grub.cfg based on the switch.
AFIK, windows does not allow direct boot by non-windows boot loaders. Consequently. os-prober may not work. I boot windows by adding the following stanza to /etc/grub.d/40_custom
Code:
menuentry "Windows 10" {
insmod part_gpt
insmod chain
set root='(hd0,gpt2)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
All you have to do is replace hd0 with the disk number that contains windows, and gpt2 with the partition number of the ESP that contains the windows boot loader.
|
|
1 members found this post helpful.
|
09-08-2017, 09:25 AM
|
#15
|
LQ Newbie
Registered: Aug 2017
Posts: 24
Original Poster
Rep:
|
Quote:
Originally Posted by plasmonics
I am surprised that it didn't work. I wrote a bash script to install Arch. Here are some excerpts from that script that might be relevant
Code:
mount /dev/sda1 /mnt/boot/efi
Keep in mind that their web site recommends /mnt/boot. If you want support, you will have to follow their rules. However, since I am primarily a Fedora and Gentoo user, I wanted to be consistent. So far, there has not been a problem upgrading Arch linux using pacman -Syu.
For UEFI/GPT install
Code:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id="archlinux" --recheck
grub-mkconfig -o /boot/grub/grub.cfg
If you are installing on a MSDOS labeled disk or on a GPT disk with a 100MiB EF02 bios_grub layer
Code:
grub-install --target=i386-pc --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
The boot loader looks for grub.cfg based on the switch.
AFIK, windows does not allow direct boot by non-windows boot loaders. Consequently. os-prober may not work. I boot windows by adding the following stanza to /etc/grub.d/40_custom
Code:
menuentry "Windows 10" {
insmod part_gpt
insmod chain
set root='(hd0,gpt2)'
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
All you have to do is replace hd0 with the disk number that contains windows, and gpt2 with the partition number of the ESP that contains the windows boot loader.
|
Thank you very much, I fixed it adding it manually as you suggested
|
|
|
All times are GMT -5. The time now is 02:37 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|