You are not logged in.

#1 2017-02-05 08:47:07

Zeox101
Member
Registered: 2017-02-05
Posts: 93

[SOLVED]Installing Arch on separate hard drive

Hello! Just to give some background info, I want to install Arch on my laptop (which has 3 hard drives installed on it), and my experience with Linux is a year using Ubuntu on my old laptop. I looked at video tutorials on installing Arch and I just wanted to ask some questions before I go do it myself. (I've done some research/googling on these questions, and originally I had even more questions. These are the questions that I just couldn't find a straight answer for, and need clarification)

Question 1: Dual Boot on Separate Hard Drive
                                                                              So drive (C:) is my Windows OS drive, and I would like to install Arch on the (D:) drive so that I can have a dual boot with windows and arch. Generally, my question is how I would go about doing this while installing Arch. From what I've seen, when I install Arch I use fdisk -l to view my drives, and then use fdisk /dev/sda to select whatever hard drive I want to install Arch on. Then from there I create partitions and so on and so forth. My concern and question about this is whether or not this works for dual booting off the bat? If my computer boots from the windows drive automatically, would it even go to the Arch Grub menu installed on the 2nd drive? So, would I need to change the boot order in my BIOS to boot from the hard drive where Arch would be installed? Also would Grub's OS-Probing detect the windows installation that is on another drive? I'm just very confused on this subject, and would love some clarification

Question 2: Enabling Wifi while installing
This is a rather basic question I suppose. Tutorials I've seen on installing arch enable wifi during the installation with /etc/netctl/wireless, but I see comments that say that the easiest way to enable wifi at this part is to use the wifi-menu. I tried looking this up and I can't find anything on this, so I would appreciate some clarification on enabling wifi using the "Wifi menu"

Last edited by Zeox101 (2017-02-26 02:08:50)


The Hidden Secret of Arch Linux Forums:
No.  No one here really uses archlinux.  Arch Sucks.
We're just a bunch of neckbeards who tinker with arch linux in our mom's basement during our free time ... which we have a lot of because we are unemployed. ~ Trilby

Offline

#2 2017-02-05 09:24:08

Tambalamba
Member
Registered: 2015-03-13
Posts: 45

Re: [SOLVED]Installing Arch on separate hard drive

Hi and welcome.

Q1: Yes, it does - I have Win 10 and Arch working just fine. Just make sure to back up your Windows system and read Arch wiki thoroughly before you proceed.

Q2: Wiki again: https://wiki.archlinux.org/index.php/Wi … figuration

If you want to use wifi-menu you can, it's just a console tool.

Good luck!

Offline

#3 2017-02-06 06:53:06

Zeox101
Member
Registered: 2017-02-05
Posts: 93

Re: [SOLVED]Installing Arch on separate hard drive

Thanks! I have another question tho. So I went ahead and tried to install Arch-Linux and I encountered a few puzzling areas. So if I'm installing arch linux on my sdb drive, and I want to use GRUB, does my sdb drive have to have an EFI partition? (Since I'm installing in EFI mode). Or do I install GRUB on my sda drive (the one with windows, and therefore already has an EFI partition), even though arch is on the sdb drive?


The Hidden Secret of Arch Linux Forums:
No.  No one here really uses archlinux.  Arch Sucks.
We're just a bunch of neckbeards who tinker with arch linux in our mom's basement during our free time ... which we have a lot of because we are unemployed. ~ Trilby

Offline

#4 2017-02-06 09:40:37

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: [SOLVED]Installing Arch on separate hard drive

In theory adding a second ESP on sdb should work in practice this can cause unexpected issues with the firmware so using the already existing ESP on sda is recommended.

Offline

#5 2017-02-06 13:24:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: [SOLVED]Installing Arch on separate hard drive

Zeox101 wrote:

I looked at video tutorials on installing Arch ...

Asking questions is good - but do not use video tutorials.  They lead to broken systems in a majority of cases.  And the minority of cases that don't directly result in a broken system indirectly result in a broken system as the person at the keyboard has no idea how their system is supposed to work.

Install with the official documentation and the links within it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#6 2017-02-20 06:58:58

Zeox101
Member
Registered: 2017-02-05
Posts: 93

Re: [SOLVED]Installing Arch on separate hard drive

Thanks Trilby!

Anyway so I managed to find some time to actually get my Arch Linux installation to work, and I managed to do it after reading the arch linux wiki and googling some stuff lol. So I installed Arch, set up the Network Manager for wifi, and I installed Plasma to use as a desktop environment. So I have everything working now, just have get around to actually installing programs so that I can use it for something.

My final concern however is that I couldn't get GRUB to install. So what I ended up doing was bootctl install, which created an EFI Boot Entry called Linux Boot Manager. The problem I kept running into when I tried to install grub was that when I would try grub-install /dev/sdb it said it couldn't find an EFI directory. I even tried doing grub-install /dev/sda and it gave me the same error. (Just to clarify, sdb is where I installed Arch Linux, and sda is where windows is installed). So if I want to boot into Arch Linux I have to press F8 while windows is booting and manually boot the Linux Boot Manager. (Which is fine for now I suppose since I don't plan on switching between the two that often just yet, but I would of liked to have GRUB)

So tl;dr, does anyone have any advice on installing Grub after I have already installed Arch Linux? If I install a 2nd Linux distro that comes with its own GRUB menu like Ubuntu or Kali, would that be a solution (The wanted result in this case having a triple boot with Windows/Arch/2nd Linux using the Grub menu)

Last edited by Zeox101 (2017-02-20 06:59:49)


The Hidden Secret of Arch Linux Forums:
No.  No one here really uses archlinux.  Arch Sucks.
We're just a bunch of neckbeards who tinker with arch linux in our mom's basement during our free time ... which we have a lot of because we are unemployed. ~ Trilby

Offline

#7 2017-02-20 08:02:33

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: [SOLVED]Installing Arch on separate hard drive

Zeox101 wrote:

does anyone have any advice on installing Grub after I have already installed Arch Linux?

https://wiki.archlinux.org/index.php/GRUB#UEFI_systems

grub-install /dev/sdb

That is the wrong command.

For further assistance, please provide the exact commands that you used to mount your partitions and chroot into the system before attempting the `grub-install` command.

Note that the common recommendation is to share the pre-existing Windows EFI system partition with the new Arch system, I do not think you have done this because you do not have an option to boot Windows from the Linux Boot Manager (systemd-boot.efi).

Offline

#8 2017-02-20 08:15:42

Zeox101
Member
Registered: 2017-02-05
Posts: 93

Re: [SOLVED]Installing Arch on separate hard drive

So I don't need to install grub in order to choose which OS to boot into? If I get Arch and Windows to share the EFI partition that windows has, I can choose to boot into Windows or Arch on start-up? Is there a way to do after already doing what I've done? (The Linux Boot Manager is on sdb, all the windows partition are on sda)


The Hidden Secret of Arch Linux Forums:
No.  No one here really uses archlinux.  Arch Sucks.
We're just a bunch of neckbeards who tinker with arch linux in our mom's basement during our free time ... which we have a lot of because we are unemployed. ~ Trilby

Offline

#9 2017-02-20 18:52:12

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: [SOLVED]Installing Arch on separate hard drive

Zeox101 wrote:

Is there a way to do after already doing what I've done?

Copy the contents of the current Arch EFI system partition (ESP) over to the Windows-generated ESP then remount that partition to /boot then run the `bootctl` commands again to create a new NVRAM entry; you will also have to modify /etc/fstab, if you use that file.

You may also have to remove the old Linux Boot Manager NVRAM entry manually to make sure that your system boots from the new entry:

# efibootmgr -b xxxx -B

Replace xxxx with the Bootnumber shown in the output of `efibootmgr` (no arguments).

Offline

#10 2017-02-21 20:55:49

Zeox101
Member
Registered: 2017-02-05
Posts: 93

Re: [SOLVED]Installing Arch on separate hard drive

Thanks for your help! Before I go through with this, I just wanna say what I think is the chain of commands I'm supposed to run (Just to get some feedback and make sure there are no mistakes or oversights)

So I'm gonna go into the Live Environment from the USB I used to install Arch then

# dd if=/dev/sda1 of=/dev/sdb1 bs=64K conv=noerror,sync (To copy the contents of the Arch ESP to the Windows ESP, sda1 being the windows ESP, sdb1 being the Arch ESP)
mount /dev/sda1 /mnt/boot  (and then mount home and root)
genfstab -U -p /mnt >> /mnt/etc/fstab  (Can I just generate a new fstab this way, or do I have to edit the existing fstab to make it have the new boot parition)
arch-chroot /mnt
bootctl install
nano  /boot/loader/entries/arch.conf 

and then in there I write

title archlinux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID="the UUID of the boot partition" rw


As for removing the old linux boot manager entry using 

# efibootmgr -b xxxx -B

Should I do that before copying the contents of the arch esp to the windows esp, or does it not matter when I do it?


The Hidden Secret of Arch Linux Forums:
No.  No one here really uses archlinux.  Arch Sucks.
We're just a bunch of neckbeards who tinker with arch linux in our mom's basement during our free time ... which we have a lot of because we are unemployed. ~ Trilby

Offline

#11 2017-02-21 22:18:34

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: [SOLVED]Installing Arch on separate hard drive

Zeox101 wrote:

# dd if=/dev/sda1 of=/dev/sdb1 bs=64K conv=noerror,sync (To copy the contents of the Arch ESP to the Windows ESP, sda1 being the windows ESP, sdb1 being the Arch ESP)

That will overwrite the Windows bootloader files and leave that system unbootable, do not do that.

How about good old `cp` or `rsync` instead?

mount /dev/sda1 /mnt/boot  (and then mount home and root)

No, just remount /boot to the new ESP from the running system, there is no need to use the Arch ISO image.

do I have to edit the existing fstab to make it have the new boot parition

^ This.

The `genfstab` script shouldn't really be used on an installed system, modify the file yourself with reference to fstab(8) & mount(8) (or perhaps just change fs_spec for the ESP entry).

options root=PARTUUID="the UUID of the boot partition" rw

The "root=" option should be filled in with the details of the root partition.

Why would you enter the UUID of the boot partition? That makes no sense at all.

EDIT: also, "root=PARTUUID=" should have the PARTUUID of the root partition rather than the UUID, as you suggest.

As for removing the old linux boot manager entry using 

# efibootmgr -b xxxx -B

Should I do that before copying the contents of the arch esp to the windows esp, or does it not matter when I do it?

Only remove that after the new entry has been shown to work or if the new entry will not boot with it in place.

Last edited by Head_on_a_Stick (2017-02-21 22:20:36)

Offline

#12 2017-02-22 03:45:32

Zeox101
Member
Registered: 2017-02-05
Posts: 93

Re: [SOLVED]Installing Arch on separate hard drive

Oh yeah, guess I overthought that. Well I guess that's why Im in the newbie corner lol. When I thought of how to copy one partition to another and looked it up on the wiki, I didn't process that you literally just said to just copy the files from one to the other

well thanks! I'll try it and mark this thread as solved if I get everything working

Last edited by Zeox101 (2017-02-22 03:48:57)


The Hidden Secret of Arch Linux Forums:
No.  No one here really uses archlinux.  Arch Sucks.
We're just a bunch of neckbeards who tinker with arch linux in our mom's basement during our free time ... which we have a lot of because we are unemployed. ~ Trilby

Offline

#13 2017-02-26 00:22:47

Zeox101
Member
Registered: 2017-02-05
Posts: 93

Re: [SOLVED]Installing Arch on separate hard drive

Alright, so I may have done something stupid. Not sure what I did wrong

so I ran

cp /dev/sdb1 /dev/sda2 

and it gave back

cp: error writing '/dev/sda2': No space left on device

note: I also ran fdisk -l just to view my partitions (Just mentioning incase it makes a difference)

So I assumed the cp failed, or partially failed or something like that. After doing this, I can't boot into windows anymore. When I press F2 to go into boot mode, and I try to boot into Windows from there, the screen just blinks for a second and goes back to the boot mode screen. 

Edit: So just to give more info to make things as clear as possible. Usually on my PC it boots into windows by default, and if I want to boot into Arch I have to go into the boot mode and override into Arch. After going into Arch and doing the above CP command, my PC started to boot into Arch by default. I went into the boot mode and saw that windows boot manager was just still #1 on the boot list, so I tried to override into windows and the screen just blinks for like a millisecond and then it just brings me back into the boot mode. I tried disabling every boot option except for windows boot manager to see what would happen and maybe try to get into the windows recovery screen, but that just brought me to a screen that said "Reboot and Select proper Boot device or Insert Boot Media in selected Boot Device and press a key." and I couldn't really do anything at that point, so now I'm just stuck (Well I can still boot into Arch, so thats something lol)

So, does anyone know what I did wrong here?

Last edited by Zeox101 (2017-02-26 01:16:01)


The Hidden Secret of Arch Linux Forums:
No.  No one here really uses archlinux.  Arch Sucks.
We're just a bunch of neckbeards who tinker with arch linux in our mom's basement during our free time ... which we have a lot of because we are unemployed. ~ Trilby

Offline

#14 2017-02-26 01:42:25

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: [SOLVED]Installing Arch on separate hard drive

Zeox101 wrote:

So, does anyone know what I did wrong here?

This:

Zeox101 wrote:

so I ran

cp /dev/sdb1 /dev/sda2

Using `cp` on the block device is exactly the same as using the `dd` command.

You should have copied the *files* instead:

# mkdir /old-esp /windows-esp
# mount /dev/sdb1 /old-esp
# mount /dev/sda2 /windows-esp
# cp -r /old-esp/* /windows-esp

You need to repair your Windows bootloader and try again.

Last edited by Head_on_a_Stick (2017-02-26 01:43:47)

Offline

#15 2017-02-26 02:08:19

Zeox101
Member
Registered: 2017-02-05
Posts: 93

Re: [SOLVED]Installing Arch on separate hard drive

Ah, that makes sense. Luckily I'm at least more competent in fixing Windows than working with Linux, so I managed to repair my windows boot loader pretty quickly. So now I'm back to where I started. Sorry for having to make you babysit me through that entire process lol. I think for now, I'm done playing around with this. I have a working Linux installation and windows installation, I think I'll just live with having to press F2 and spend 12 extra seconds to boot between Linux and Windows.  I saved everything you said in a text file though, so if I ever want to revisit this I have what you've given me. I'm gonna mark this as solved, thanks for all the help!

Last edited by Zeox101 (2017-02-26 02:30:56)


The Hidden Secret of Arch Linux Forums:
No.  No one here really uses archlinux.  Arch Sucks.
We're just a bunch of neckbeards who tinker with arch linux in our mom's basement during our free time ... which we have a lot of because we are unemployed. ~ Trilby

Offline

Board footer

Powered by FluxBB