- Add ArchLinux to Ubuntu dual-boot
- 2 Answers 2
- Install arch linux with ubuntu
- Dual Boot Ubuntu And Arch Linux
- Dual Boot Ubuntu And Arch Linux
- Install Ubuntu 16.10
- Install Arch Linux
- Configuring Arch Linux: the basic configuration
- The system Language and the system locale
- 2. The system timezones
- 3. Root password
- 4. Set a hostname and configure network
- Grub configuration
- Conclusion
Add ArchLinux to Ubuntu dual-boot
I would like to dual boot ArchLinux with my Ubuntu. I would like some hints at how to do it without messing my partitions too much. Presently, my Computer partition scheme goes like this:
(Ubuntu only) sda sda1 [boot loader] sda2 [root] sda3 [swap] sda4 [home]
If I were to install Arch only, I would have the same partition scheme. Now how should I prepare my partitions in order to successfully dual-boot? I have a suggestion though it may be a naive one:
sda sda1 [bootloader] -> Will it detect Arch? sda2 [root_ubuntu] sda3 [swap] sda4 [home_ubuntu] -> I have a lot of space, I could just resize and divide this partition. sda5 [root_arch] sda6 [home_arch]
Will the above scheme be a workable implementation? In any case, what do you suggest I do? Which files (config, etc) will I have to create or modify?
I did pretty much exactly this, except I also had a Windows partition. I decided to keep GRUB from Ubuntu, and that also worked fine.
@StrongBad: No I haven’t. It seems to be a good idea. Should I understand I could install arch on an USB partition, then from Ubuntu I could mount it, then using chroot to the mounted USB partition. Would that work?
2 Answers 2
This scheme is certainly workable. You are right, the best solution is to transform your current layout as little as it is possible.
If you don’t ask Arch Linux to install his Grub bootloader, you’ll have to run grub-mkconfig -o /boot/grub/grub.cfg in Ubuntu (if you have os-prober installed, it will find your Arch installation and update all the config files automatically).
You may find information you need about Grub in Arch Linux wiki: https://wiki.archlinux.org/index.php/GRUB (almost all the instuctions are applicable to current versions of Ubuntu)
While dual booting is a useful concept to allow you to use both Windows and Linux on the same machine, the benefits of dual booting Linux are more subtle. The boot process in Linux typically involves using a boot loader to load a kernel and ram disk which eventually mounts the root file system and lets you do things. Different distros have different kernels, and many distros patch the kernel to different extents. If you wish to run two different kernels, either for the same distro or different distros, then you need to dual boot. If you are happy with the same kernel, you generally do not need to dual boot to be able to run two different Linux distributions, you can just create a chroot for each additional distribution. The Arch wiki has nice articles on Arch chroot and installing chroot.
One advantage, based on your comments, of using a chroot, is you could do a fully bootable USB install of Arch and then simply chroot into it under most circumstances. This means you would not need to change the main hard disk (sda) at all.
Install arch linux with ubuntu
A subreddit for the Arch Linux user community for support and useful news. Locked in protest at the 3rd party apps situation. Please do NOT send join requests or message the mods to join, they will be ignored and archived.
Currently I have Ubuntu 18.04 LTS and am about to update to 20.04 LTS.
I like Arch. I’ve always liked Arch over other distros. I just have very bad luck with Arch. Things tend to break and very inconvenient times, and as a student, I really need a reliable system (or backup, at least).
Yes, I know that «things breaking» is due to my incompetency with Arch. I know that, once I become more knowledgeable, comfortable, and safe with my system, things will break less. This is not about that.
The point: I would like to dual-boot Ubuntu and Arch. I would like them to share as much data as possible ( /home obviously, and anything else shareable, like swap ). I know I can always backup my system, nuke it, and start a completely fresh install while separating the /home and /boot partitions from the very beginning. But, if it’s possible to avoid that, I’d like to.
Here is my current partition setup. /dev/sda7 is an old distro setup I haven’t gotten around to wiping yet. /dev/sda3 is my current Ubuntu partition.
Device Start End Sectors Size Type /dev/sda1 2048 1026047 1024000 500M EFI System /dev/sda2 1026048 16650239 15624192 7.5G Linux swap /dev/sda3 16650240 407465983 390815744 186.4G Linux filesystem /dev/sda7 407465984 500117503 92651520 44.2G Linux filesystem
What can I do to install Arch alongside my existing Ubuntu partition without having to wipe everything and start fresh? Note that I did not choose the «separate /boot and /home partitions?» option when installing Ubuntu.
Dual Boot Ubuntu And Arch Linux
Dual booting Ubuntu and Arch Linux is not as easy as it sounds, however, I’ll make the process as easy as possible with much clarity. First, we will need to install Ubuntu then Arch Linux since it’s much easier configuring the Ubuntu grub to be able to dual boot Ubuntu and Arch Linux.
Dual Boot Ubuntu And Arch Linux
- Ubuntu flavor of your choice, in this case, I’ll use ubuntu 17.10 iso
- 2 USB sticks
- Windows PC or Linux based PC
- Arch Linux iso
- Rufus(for windows) or etcher(for Linux distro)
Install Ubuntu 16.10
First, create a bootable flash drive using Rufus for both Ubuntu and Arch Linux. Alternatively, you could use etcher to create bootable flash drives for both Ubuntu and Arch Linux.
Select the ISO image file for Ubuntu then select the flash drive of your choice after which click flash to create the bootable flash drive. Wait till it completes and Voila! Your bootable flash drive is ready for use.
Turn on your machine and boot using the bootable flash drive with the Ubuntu installation media. Ensure that you boot into UEFI or BIOS compatibility mode depending on the type of PC you are using. I prefer using UEFI for a newer PC builds.
Upon Successful boot, you will see the following screen asking you to try Ubuntu or install Ubuntu. Choose install Ubuntu.
Then check to install third-party software for graphics and Wifi hardware, MP3 and other media. Optionally if you have an internet connection choose to download updates while installing Ubuntu since it will save time setting up the installation as well as ensure you get the latest updates of your installation.
Then choose ‘Something else’ so that we can partition the hard disk and set aside space for swap, Ubuntu, and Archlinux.
Create a swap area partition. Preferably half the size of the ram. In my case, I have 1GB of ram thus 512mb of swap area space.
Then create a partition with mount point ‘/’. Then click the install now button.
Choose your location then choose language and keyboard settings.
Then create the user credentials that will create a new user.
The installation will now start by clicking next.
When the installation is done click on restart PC.
Remove the installation media and press enter when done.
Upon confirmation of successful installation, restart and boot into the Arch Linux installation media.
Install Arch Linux
Upon booting into the Arch Linux installation media you should see an initial screen as follows. Choose Boot Arch Linux(x86_64). Note Arch Linux is a more of DYF (do it yourself) kind of Operating system.
After choosing, it will open a tty1 terminal that you will use to install the operating system.
Note: You will need an internet connection to download some packages in order to install Arch Linux successfully. So we need to check if the internet is working fine. Enter the following into the terminal to check internet connectivity. ping linuxandubuntu.com -c 4
If the internet is working fine you should get an echo back showing the number of packets sent and received. In this case, we sent 4 echos and got 4 back meaning the connection is good.
If you want to setup Wifi in Arch Linux, read this post here on setting up Wifi in Arch Linux. Next, we need to select the partition that’s free that we had earlier set aside while installing Ubuntu. fdisk -l The above should show you the available disks that are there. You should see the Ubuntu partitions as well as the free space. We will use cfdisk to partition. cfdisk
You will see the partitions. Select the free space that is below the other allocated partitions.You will need to select new and then enter the partition size for the partition.
Use for example 9.3G – G representing gigabytes.
Make the partition primary as below.
Then choose the write partition entry.
Type ‘yes’ to confirm the writing of the partition.
Then choose the quit option.
Then type: fdisk -l To confirm the changes
Then partition the disk using:
Make sure the partition you choose is the last one that we created so that we don’t mess with the Ubuntu partition.
Then mount it to using the following command – mount /dev/sda3 /mnt
Make a home directory using:
Mount the home folder to the partition using mount /dev/sda3 /mnt/home
Now install the base system of Archlinux using the command: pacstrap /mnt base Make sure you have an internet connection.
It should take a while to download and set it up depending on the internet speed you have.
After the step is complete, the Archlinux base installation is completed.After installing the Arch Linux base, create a fstab file using the command:genfstab -U /mnt >> /mnt/etc/fstab
After that, you need to verify the fstab file entries using: cat /mnt/etc/fstab
Configuring Arch Linux: the basic configuration
- The system language and the system locales
- The system timezones
- Root user password
- Set a hostname
Firstly, you will need to switch to the newly installed base by changing root into the system using the command:arch-chroot /mnt
The system Language and the system locale
You will then have to configure the system language. You will have to uncomment en_UTF-8 UTF-8 and the localization you need in /etc/local.gen
Type:nano /etc/local.genThen uncomment the en_UTF-8 UTF-8
Then type:locale-genTo generate the localization settings as follows:
You will need to set the LANG variable in locale.conf accordingly, for example:nano /etc/locale.confThen change to:LANG=en_US.UTF-8If you set the keyboard layout, make the changes persistent in vconsole.conf:nano /etc/vconsole.confThen change to:KEYMAP=us-eng
2. The system timezones
You will need to set the time zone using –
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
To see the available time zones, you can use the following command in the terminal:
Note region is shown in blue below in the screenshot:
Run hwclock command as follows to generate /etc/adjtime(assumes the hardware clock is set to UTC.):
3. Root password
To set a new password for the Arch Linux installation set root password using: Passwd Supply a new password and confirm the password to set the root password.
4. Set a hostname and configure network
You will need to create the hostname file: nano /etc/hostname
Change the name to your username:
Then add a matching entry to hosts:
nano /etc/hosts 127.0.0.1 localhost.localdomain localhost ::1 localhost.localdomain localhost 127.0.1.1 LinuxandUbuntu.localdomain LinuxandUbuntu
You will need to make the network connections persistent thus use:
Grub configuration
Then reboot the machine and enter into Ubuntu to configure the grub.
You will type: reboot
The Arch Linux installation still doesn’t appear therefore we need to install it using update-grub in ubuntu.
Open a terminal in Ubuntu and type: sudo update-grub It should update the grub to include Arch Linux.
Conclusion
Congratulations you have successfully set up Ubuntu and Arch Linux to dual boot. The Ubuntu installation is easy but the Arch Linux installation is a challenge for new Linux users. I tried making this tutorial as simple as it can be. But if you have any questions about the article, let me know in the comment section below. Also, share this article with your friends and help them learn Linux.