Approvals: 0/1
This is an old revision of the document!
Dual boot Batocera and other Linux distributions
The most common way of booting Batocera for PC is to use a USB pen drive. You can use it along a dedicated partition on your hard drive to host ROMs, while booting in USB.
However, some people prefer to have Batocera directly installed on the main hard drive, along with another OS in a separate partition on the same drive. Here are some examples on how to dual boot Batocera with popular Linux distributions like Ubuntu or Linux Mint.
Windows has a reputation of wiping the GRUB partition/clearing the Master Boot Record seemingly at random. This can corrupt the Batocera partition and render it unbootable. Therefore, it is not recommended to dual boot with Windows.
Ordinarily, Batocera utilizes syslinux to boot. Thus, for most dual boot setups we will be utilizing GRUB to show a boot selection menu after BIOS instead.
Ubuntu Linux
Install Ubuntu
Follow your favorite method for the initial Ubuntu install.
Once Ubuntu ins installed, make sure the command grub-customizer
is available on your system (it is available from Ubuntu repositories).
Batocera partitions
Create 2 consecutive partitions on your hard drive
- Partition 1 : type = fat32, name =
BATOCERA
, flags =legacy_boot
&msftdata
- Partition 2 : type = ext4. It must be created and placed right after the
BATOCERA
partition.
Then download boot.tar.xz and unzip it on the BATOCERA
partition.
Configure the Ubuntu grub
Use grub-customizer
: create new and write BATOCERA
as its name or anything you like, with type “other”.
Then, with gparted
or blkid
, find the UUID from your BATOCERA
partition. In the example below, 3377-44C4 is my UUID, don't forget to adapt to yours.
Paste the following code:
insmod fat search --no-floppy --fs-uuid --set=root 3377-44C4 linux /boot/linux label=BATOCERA console=tty3 quiet loglevel=0 vt.global_cursor_default=0 initrd /boot/initrd.gz
Save and reboot.
Linux Mint
For other distributions like Linux Mint 19.03, you can use the following method.
Install Linux Mint
Follow your favorite method for the initial Mint install.
Batocera partitions
Create 2 consecutive partitions on your hard drive:
- Partition 1: type = fat32, name =
BATOCERA
- Partition 2: type = ext4. It must be created and placed right after the
BATOCERA
partition.
Then download boot.tar.xz and unzip it on the BATOCERA
partition.
Configure the grub boot loader
Download the following file and save it to /etc/grub.d/15_batocera
- 15_batocera
#! /bin/sh BATOCERA_UUID=$(lsblk --fs --noheadings --pairs -o TYPE,LABEL,UUID | grep -E '^TYPE="part" LABEL="BATOCERA" UUID="[^"]*"$' | sed -e s+'^TYPE="part" LABEL="BATOCERA" UUID="\([^"]*\)"$'+'\1'+ | head -1) if test -n "${BATOCERA_UUID}" then echo "Image batocera found on ${BATOCERA_UUID}" >&2 cat <<EOF menuentry "batocera.linux" { insmod fat search --no-floppy --fs-uuid --set=root ${BATOCERA_UUID} linux /boot/linux label=BATOCERA console=tty3 quiet loglevel=0 vt.global_cursor_default=0 initrd /boot/initrd.gz } EOF fi
The file can also be automatically downloaded with the following command:
sudo wget https://batocera.org/upgrades/grub/15_batocera -O /etc/grub.d/15_batocera
Then run the following commands:
sudo chmod a+x /etc/grub.d/15_batocera sudo update-grub
Eventually, it will output the following:
... Image batocera found on 3377-44C4 ...
Reboot.
- dual_boot_ubuntu_batocera.linux.1633128084.txt.gz
- Last modified: 3 years ago
- by atari