Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dual_boot_ubuntu_batocera.linux [2020/05/25 00:42] – lbrpdx | dual_boot_ubuntu_batocera.linux [2023/12/28 01:11] (current) – lbrpdx | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~NOTOC~~ | + | ====== Dual boot Batocera ====== |
- | ===== Install Ubuntu ===== | + | It is recommended to boot Batocera off of a USB/other external drive and to [[: |
- | Follow | + | |
- | Once Ubuntu ins installed, make sure the command '' | + | <WRAP center round alert> |
+ | Before attempting //any// of this, **make a backup of your data**. There is a chance that the following actions (shrinking partitions, replacing boot loaders, etc.) can render the storage devices inoperable. | ||
- | ===== Batocera partitions ===== | + | If this sounds too spooky to you, just [[:install_batocera|flash Batocera to a USB drive]] as is recommended |
- | Create 2 consecutive partitions on your hard drive | + | </ |
- | * partition 1 : type = fat32, name = BATOCERA | + | |
- | * partition 2 : type = ext4. It must be created right after the BATOCERA partition. | + | |
- | * download | + | |
- | ===== Configure the Ubuntu | + | Ordinarily, Batocera utilizes [[https:// |
- | Use '' | + | <WRAP center round important> |
+ | In case you install Batocera on your hard-drive, you may want to rename the BATOCERA partition to something unique like BATOPC. If you do, edit the '' | ||
+ | </ | ||
- | Then, with '' | + | ===== Dual boot Batocera and Windows ===== |
- | Paste the following code: | + | ==== Automatically ==== |
- | insmod fat | + | |
- | search --no-floppy --fs-uuid --set=root | + | For those that prefer video guides (there is... no actual need to flash a spare USB drive, just download the boot.tar.xz): |
- | linux /boot/linux label=BATOCERA console=tty3 quiet loglevel=0 vt.global_cursor_default=0 | + | |
- | initrd / | + | This guide is assuming Windows is being booted from an EFI partition. If it isn't, or you don't know, **proceed at your own risk**. |
+ | |||
+ | === Preparing the drive === | ||
+ | |||
+ | Partition the drive, having a 8 GB FAT32 partition after the Windows drive immediately followed by the " | ||
+ | |||
+ | Extract and copy the latest [[https:// | ||
+ | |||
+ | < | ||
+ | D:\ | ||
+ | ├─ boot\ | ||
+ | ├─ EFI\ | ||
+ | ├─ tools\ | ||
+ | └─ batocera-boot.conf | ||
+ | </ | ||
+ | |||
+ | === Installing GRUB over Windows' | ||
+ | |||
+ | Download and install [[https:// | ||
+ | - Extract the grub2win ZIP, and run '' | ||
+ | - Allow grub2win to download the latest EFI package for your operating system. | ||
+ | - Ensure the target drive is the one the system boots into by default (usually C:\). Click **Setup**. | ||
+ | - Once it's done, click **Return To The Setup Menu**. | ||
+ | - Check " | ||
+ | - Grub2win will automatically scan for available operating systems. It will not find Batocera, unfortunately. Click **Manage Boot Menu** in the middle bottom of the window. | ||
+ | - Click **Add New Entry** near the top of the window. | ||
+ | - Under " | ||
+ | - Name the " | ||
+ | - Click **Edit Custom Code**. A text document will be opened with the default text editor. | ||
+ | set efibootmgr=/ | ||
+ | | ||
+ | if [ ! -z $reviewpause ] ; then | ||
+ | echo GNU Grub will load the Batocera EFI Boot Manager at disk address $root | ||
+ | | ||
+ | fi | ||
+ | echo GNU Grub is now loading the Batocera EFI Boot Manager | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | set efibootmgr=/ | ||
+ | | ||
+ | if [ ! -z $reviewpause ] ; then | ||
+ | echo GNU Grub will load the Batocera EFI Boot Manager at disk address $root | ||
+ | | ||
+ | fi | ||
+ | echo GNU Grub is now loading the Batocera EFI Boot Manager | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | Pleillear keeps an updated copy of the file at [[https:// | ||
+ | </ | ||
+ | - Close the text editor. | ||
+ | - Grub2win will then scan the code for mistakes. If all goes well, click **OK**, followed by **OK**. | ||
+ | - Check that the Batocera listing is correct and in the menu slot desired. Then click **Apply**. | ||
+ | - Set any further cosmetic settings desired. Lower the "Grub timeout" | ||
+ | - Grub2win will then install the desired boot menu onto the drive. Green means it's good. Click **Close**. | ||
+ | - Reboot and pray to whatever entity that you want that it worked. | ||
+ | |||
+ | ===== Dual boot Batocera and MacOS or other UEFI-based x86_64 systems using rEFInd ===== | ||
+ | |||
+ | <WRAP center round important> | ||
+ | Although Windows can be hostile towards other operating systems (erasing their bootloaders on an update, clearing the master boot record without warning, etc.), Macs can be even more hostile. Keep this in mind and definitely have a secure method of restoring a backup when playing with the Mac's bootloader. | ||
+ | |||
+ | For " | ||
+ | </ | ||
+ | |||
+ | <WRAP center round important> | ||
+ | Before installing rEFInd, be sure to read and understand the entire contents of its documentation first. Being negligent in this regard can result in an unbootable system if no flashing method is prepared earlier. To quote the author of rEFInd: "Note: I consider rEFInd to be beta-quality software! That said, rEFInd is a usable program in its current form on many systems." | ||
+ | </ | ||
+ | |||
+ | Install [[https:// | ||
+ | |||
+ | < | ||
+ | menuentry " | ||
+ | icon EFI/ | ||
+ | loader / | ||
+ | initrd / | ||
+ | options " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Dual boot Batocera and other Linux distributions ===== | ||
+ | |||
+ | Here are some examples on how to dual boot Batocera with popular Linux distributions like Ubuntu or Linux Mint. | ||
+ | |||
+ | ==== Ubuntu Linux ==== | ||
+ | |||
+ | === Install Ubuntu === | ||
+ | |||
+ | Follow your favorite method for the initial Ubuntu install, leaving extra unpartitioned space for Batocera and its userdata. | ||
+ | |||
+ | === Batocera partitions === | ||
+ | |||
+ | After the Ubuntu partition, create two consecutive partitions: | ||
+ | * Partition 1: Type = '' | ||
+ | * Partition 2: Type = '' | ||
+ | |||
+ | Then download [[http:// | ||
+ | |||
+ | === Configure the Ubuntu GRUB === | ||
+ | |||
+ | - While booted into Ubuntu, create ''/ | ||
+ | |||
+ | cat << EOF | ||
+ | menuentry " | ||
+ | search --set=root --label BATOCERA | ||
+ | linux /boot/linux label=BATOCERA console=tty3 quiet loglevel=0 vt.global_cursor_default=0 | ||
+ | initrd / | ||
+ | } | ||
+ | EOF | ||
+ | </ | ||
+ | - Make it executable by running '' | ||
+ | - Run '' | ||
+ | - Reboot | ||
+ | |||
+ | You will now be presented with the GRUB menu upon booting, allowing you to select either Batocera or Ubuntu to boot into. | ||
+ | |||
+ | <WRAP center round info> | ||
+ | Older versions of Ubuntu may need '' | ||
+ | |||
+ | Alternatively, | ||
+ | </ | ||
+ | |||
+ | ==== Linux Mint/MX Linux ==== | ||
+ | |||
+ | For other distributions like Linux Mint 19.03, you can use the following method. It also works for MX Linux, all mentions of Linux Mint also refer to MX Linux in this section. | ||
+ | |||
+ | === Install Linux Mint === | ||
+ | |||
+ | Follow your favorite method for the initial Mint install, leaving extra unpartitioned space for Batocera and its userdata. | ||
+ | |||
+ | === Batocera partitions === | ||
+ | |||
+ | Create 2 consecutive partitions on your hard drive: | ||
+ | * Partition 1: type = fat32, name = '' | ||
+ | * Partition 2: type = ext4. It must be created and placed right after the '' | ||
+ | |||
+ | Then download [[https:// | ||
+ | |||
+ | <WRAP center round tip> | ||
+ | Since it's been set up manually, you can remove the '' | ||
+ | </ | ||
+ | |||
+ | === Configure the GRUB boot loader === | ||
+ | |||
+ | - Download the following file and save it to ''/ | ||
+ | #! /bin/sh | ||
+ | |||
+ | BATOCERA_UUID=$(lsblk --fs --noheadings --pairs -o TYPE, | ||
+ | grep -E ' | ||
+ | sed -e s+' | ||
+ | |||
+ | if test -n " | ||
+ | then | ||
+ | echo "Image batocera found on ${BATOCERA_UUID}" | ||
+ | |||
+ | cat << | ||
+ | menuentry " | ||
+ | insmod fat | ||
+ | search --no-floppy --fs-uuid --set=root | ||
+ | linux /boot/linux label=BATOCERA console=tty3 quiet loglevel=0 vt.global_cursor_default=0 | ||
+ | initrd / | ||
+ | } | ||
+ | EOF | ||
+ | fi | ||
+ | </ | ||
+ | * The file can also be automatically downloaded with the following command: < | ||
+ | sudo wget ' | ||
+ | </ | ||
+ | - Then run the following commands: < | ||
+ | sudo chmod a+x / | ||
+ | sudo update-grub | ||
+ | </ | ||
+ | [...] | ||
+ | Image batocera found on 3377-44C4 | ||
+ | [...] | ||
+ | </ | ||
+ | - Reboot | ||
+ | |||
+ | You will now be presented with the GRUB menu upon booting, allowing you to select either Batocera or Linux Mint to boot into. | ||
+ | |||
+ | ===== Ventoy ===== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | Technically, | ||
+ | |||
+ | By default, Batocera' | ||
+ | |||
+ | < | ||
+ | qemu-img resize batocera.img +#G | ||
+ | sudo losetup --find --show batocera.img | ||
+ | </ | ||
+ | |||
+ | and expanding the userdata partition with Gparted or something similar. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | If you want to keep using [[https:// | ||
+ | |||
+ | < | ||
+ | gparted /dev/loop * | ||
+ | </ | ||
- | Save and reboot. |
- dual_boot_ubuntu_batocera.linux.1590360162.txt.gz
- Last modified: 4 years ago
- by lbrpdx