- Install Linux from Linux
- Установка дистрибутива linux из дистрибутива linux
- Dual boot Arch Linux with another Linux (os-prober)
- Video Tutorial
- Install the second Linux without a bootloader
- Mount the partition with the new system
- Install os-prober
- Update GRUB
- Multi-boot Arch Linux
- If you update your kernel
- Comments
- Marlor
- Metin
- Ali
- Julio
- Julio
- Jelloul
- Average Linux User
- Roshin Alex
- Average Linux User
- Julius
- Average Linux User
Install Linux from Linux
I recently purchased an external USB hard drive and wanted to use it as a portable boot drive. I installed Linux Mint 18.1 on it and got everything working. Then I started to think about using that drive to install Linux on other machines. I assumed that whatever a live boot USB does should be possible from a full-blown Linux installation. I looked around and the only option I found was from Ubuntu: Installation/From Linux. Their solution is to create a partition, fill it with the ISO contents and then boot from that to launch the installer. I did follow those instructions and got it working as expected, however, I still feel there must be a way to install Linux from Linux without booting into an ISO. I just found a related question: Installing without booting. There is an answer there that suggests there is some sequence of operations that could be run to install Linux on another partition, but I would need more detail than provided there. Is that process documented somewhere? Honestly, I would be more comfortable if I could just run the installers that are included in the live boot images of each distro. Or some kind of semi-authoritative script that would do the same thing. Is there a package in the repos that would provide such a thing (eg. a Linux Mint installer package that could be installed using apt-get or yum )?
@phk Thank you. That is a good keyword to know. After seeing your comment, I remembered a part of the Ubuntu guide that I had ignored since the first method worked for me. It was about using the debootstrap utility to install. That looks to be the solution, will update after I try it.
Установка дистрибутива linux из дистрибутива linux
Появился вопрос — а каким образом, не имея под рукой флешки и пустого диска, установить другой дистрибутив линукса? Чтобы загрузка была аналогична загрузке с болваники (с какого-нибудь нового раздела, например). Погуглил, но там вся инфа про установку линукса с винта из-под винды.
man gentoo handbook. Только вместо livecd используешь консоль своей рабочей системы.
man Gentoo
man stage3/4
/не удержался
Но я хочу дистрибутив для обычных людей.
но жаждешь красноглазия.
причём бессмысленного
можно установить любой дистрибутив из консоли же, не перезагружаясь, разве не?
Распаковываешь живойСД на винт и того этого. Очевидно же.
- Создается раздел диска по размеру образа установочной болванки
- Туда через uNetBootIn записывается образ
- Настраивается загрузчик, чтобы грузился с этого нового раздела
- Перезагружается комп и начинается установка
Ну или через dd, но по-моему, это чревато глюками
Но я хочу дистрибутив для обычных людей.
Для этого нужно самому стать обычным человеком, а не школьником-двоешником
не имея под рукой флешки и пустого диска
Debian/Ubuntu ставятся debootstrap’ом.
Я убунту поставил с соседнего диска. Просто скачал linux, initrd.gz и указал их grub-у.
insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos5' linux /boot/vmlinuz initrd /boot/initrd.img boot
YYY ★ ( 29.12.12 16:59:19 MSK )
Последнее исправление: YYY 29.12.12 17:05:58 MSK (всего исправлений: 2)
Ну стоит у меня дистриб, вчера принесли флешку — надо поставить систему. Запустил установщик — файло на флешку скопировалось, grub4dos уже был на флешке, система в него «вписалась». Не было бы grub4dos — поставился бы grub4dos.
Наличие загрузочного бита на разделе я заранее через gparted проверил.
Dual boot Arch Linux with another Linux (os-prober)
Note: I use GRUB as a bootloader because it is the most popular Linux bootloader. If you use any other bootloader, you can get the overview of the process here, but you would need to research yourself the command to update your bootloader.
Video Tutorial
Install the second Linux without a bootloader
First, you need to install the second Linux system and you need to install it without a bootloader. For example, if your second OS is Ubuntu or Ubuntu derivative (Linux Mint, KDE Neon, elementaryOS etc.), run the ubiquity installer from a command line with the option -b:
This will install Ubuntu without the GRUB bootloader. I have explained this process in more details here.
Mount the partition with the new system
Next, you need to mount the partition with the new system. If it is not mounted, your Arch Linux simply is not able to see that there is another Linux installed on your computer.
To find out the name of the partition with the second OS, list the partitions on your system:
And based on their size identify the partition where you installed your second system. For example, on the picture below I installed Linux Mint on sda2. I know that because it is a smaller partition.
When you know the name of the partition with your second Linux system, mount it somewhere on your system, for example to /mnt or /media:
Install os-prober
GRUB bootloader cannot identify other OS itself, it is done with os-prober, which is an Arch Linux program that detects other OSes installed on your computer. Install it:
Update GRUB
When your new system is mounted and os-prober is installed, run this command to update GRUB:
sudo grub-mkconfig -o /boot/grub/grub.cfg
You should see that GRUB has found your second Linux system, Linux Mint in the example below.
If not, go back and make sure that you mounted the right partition.
If your GRUB is updated without any error and the new system is recognized, reboot your Arch Linux and try to boot into the second system.
If you configured your Arch Linux to skip GRUB menu and boot as fast as possible, you need to press ESC or SHIFT key during the boot to enter the GRUB menu. If you have not touched your GRUB, you should see the GRUB menu automatically.
And as you can see on the screenshot above, there is a choice to boot either Arch Linux or Linux Mint, which is my second system in this case.
Boot into your second Linux system and make sure it works.
Multi-boot Arch Linux
Although I talk here about Arch Linux as the first OS and the other Linux OS as the second OS, there is no limit of the number of systems you can install and multi-boot. But you need to mount the partition with a new OS and update GRUB every time you install addition Linux OS on your computer.
I installed Linux Mint, Fedora and KDE Neon along with my Arch Linux system, I updated GRUB this way and now I can boot into any of these systems if I want. You can see the screenshot of my GRUB below.
If you update your kernel
Unfortunately, the setup of several Linux systems with one bootloader requires that you need to mount all the secondary systems and update GRUB manually every time you update your kernel. If your secondary systems are mounted during the update of Arch Linux, then the manual update is not necessary. Also, if you cannot find your secondary system in the GRUB menu after updating, this means that you forget to manually update GRUB. Boot in your Arch Linux, mount the second system and update GRUB.
Average Linux UserFollow I am the founder of the Average Linux User project, which is a hobby I work on at night. During the day I am a scientist who uses computers to analyze genetic data.
Comments
Marlor
Hello Greetings. I don’t have exactly Arch, but its derivatives. I have three different systems and all three on different disks. The question concerns Manjaro and Garuda Linux. After I put Garuda in Grub, Manjaro is visible, but if I try to boot into it, the error / boot / initramfs not found appears. You can go into additional parameters and select fallback in this case Manjaro will load. I’ve tried: sudo su — manjaro-chroot -a pacman-mirrors -f 5 && pacman -Syyu update-grub exit But this did not help, maybe the problem is that Garuda is on btrfs and Manjaro is on ext4, but these are just my assumptions.
Metin
I’m dual booting Arch with Fedora on a UEFI system. Arch contorls the boot menu which is in the first order. Fedora is detected by os-prober successfully. But vmlinuz-0-resuce is always the default for Fedora. Neither I can control the order kernels in the “Advanced Options for Fedora” submenu. I update boot menu from Arch but even then rescue kernel becomes the default. How do you handle that?
Ali
Hey Alu! after mountung my ISO Ubuntu file to ‘/mnt’ im updating my GRUB using the command you are suggesting and its not finding my file. should i mount the ISO in the ‘/boot’ folder? thanks in advance!
Julio
Please, find the update-grup command output too $ sudo update-grub Generating grub configuration file … Found theme: /usr/share/grub/themes/manjaro/theme.txt Found linux image: /boot/vmlinuz-5.3-x86_64 Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.3-x86_64.img Found initrd fallback image: /boot/initramfs-5.3-x86_64-fallback.img Found Linux Mint 19.2 on /dev/sda4 Found memtest86+ image: /boot/memtest86+/memtest.bin done
Julio
I have an Intel NUC8i3BEH2 with UEFI boot and I am trying to install Linux Mint along with Manjaro xfce. The reason is that I am used to Linux Mint and I have found tha Manjaro works grate in this computer and I want to give it a try. When I made my first try, I installed Manjaro 18.1.1 XFCE first and then Linux Mint. 19.2 Cinamon Then Linux Mint deleted the Grub of Manjaro and I could not get into Manjaro any more. After that I installed Manjaro again and then I could not get into Linux Mint. I decided to delete Linux Mint and install it without grub using the ubuntity — b command according your instructions but I still can not get into Linux Mint. I attache my commands fdisk -l and lsblk on Manjaro:
$ sudo fdisk -l [sudo] password … Disco /dev/sda: 111,82 GiB, 120040980480 bytes, 234455040 sectores Modelo de disco: WDC WDS120G2G0B- Unidades: sectores de 1 * 512 = 512 bytes Tamaño de sector (lógico/físico): 512 bytes / 512 bytes Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes Tipo de etiqueta de disco: gpt Identificador del disco: 375CF42…
Disposit. Comienzo Final Sectores Tamaño Tipo /dev/sda1 2048 1026047 1024000 500M Sistema EFI /dev/sda2 1026048 82946047 81920000 39,1G Linux RAID /dev/sda3 82946048 91138047 8192000 3,9G Linux swap /dev/sda4 91138048 179027967 87889920 41,9G Sistema de ficheros de Linux
$ sudo lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 111,8G 0 disk ├─sda1 8:1 0 500M 0 part /boot/efi ├─sda2 8:2 0 39,1G 0 part /home ├─sda3 8:3 0 3,9G 0 part [SWAP]
I would appreciate any help you can give me.
Jelloul
Hi Alu! I have now two Archlinux distros on separate disks and it works like a charm. I wondered why many other forums and websites are trying to give help and tutorials with a lack of minimal step-by-step path to get acquainted with the command line. hats off to your disinterested help greetings from france
Average Linux User
Hi Jelloul, Thank you for the comment. I am pleased to hear this tutorial was useful and you enjoy your Arch Linux.
Roshin Alex
Life saver… Thank you. I spent more than half a day trying to figure out what happened to my second OS then stumbled upon your article. Installed KDE Neon in one partition and Linux Mint — Mate in another but Mint didn’t pop up in the boot menu. All I had to do was to mount the partition of Linux Mint and then update grub.cfg Thanks a ton. Keep up the good work .
Average Linux User
Hi Alex, I am glad it helped you.
Julius
I just stumbled onto this article after trying to find a way to install Ubuntu on my system with Arch already in place. This was the first place that gave me the answer I needed: to install Ubuntu without the bootloader. Thank you so much for the help!
Average Linux User
Thank for the comment, Julius! Happy to help