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 [2022/09/08 12:58] – consistent boot sizes atari | dual_boot_ubuntu_batocera.linux [2024/09/21 20:15] (current) – [Ventoy] maximumentropy | ||
|---|---|---|---|
| Line 49: | Line 49: | ||
| - Under " | - Under " | ||
| - Name the " | - Name the " | ||
| - | - Click **Edit Custom Code**. A text document will be opened with the default text editor. Paste in the following and save the file: < | + | - Click **Edit Custom Code**. A text document will be opened with the default text editor. Paste in the following and save the file, for Batocera **v39** and higher: < |
| + | 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=/ | set efibootmgr=/ | ||
| | | ||
| Line 60: | Line 70: | ||
| | | ||
| </ | </ | ||
| - | Pleillear keeps an updated copy of the file at [[https:// | + | Pleillear keeps an updated copy of the file at [[https:// |
| </ | </ | ||
| - Close the text editor. | - Close the text editor. | ||
| Line 68: | Line 78: | ||
| - Grub2win will then install the desired boot menu onto the drive. Green means it's good. Click **Close**. | - 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. | - Reboot and pray to whatever entity that you want that it worked. | ||
| - | ==== Manually ==== | ||
| - | |||
| - | You will likely have to wipe your hard drive' | ||
| - | |||
| - | - Partition your intended drive to begin with a large physical NTFS partition for Windows. It is recommended to use a GPT partition table. The rest of the free space will be used for Batocera. | ||
| - | - Install Windows via your preferred method. It will re-partition the existing NTFS partition into smaller logical partitions, but should retain its total size. | ||
| - | - In the empty space, add a new physical FAT32 partition 8 GB in size labelled " | ||
| - | - Immediately after the BATOCERA partition, create another partition to fill up the rest of the drive. This will be used as the " | ||
| - | - Rename the folders in Windows' | ||
| - | - Download [[https:// | ||
| - | - Copy the contents of '' | ||
| - | - Boot into Batocera from a USB drive, run '' | ||
| - | * FIXME (confirmation needed) To do this on Windows itself, open an administrator command prompt and run '' | ||
| - | - Open '' | ||
| - | The final '' | + | ===== Dual boot Batocera and MacOS or other UEFI-based x86_64 systems |
| - | set timeout=5 | + | |
| - | + | ||
| - | menuentry ' | + | |
| - | search --fs-uuid --no-floppy --set=root 2AD8-4A0C | + | |
| - | chainloader (${root})/ | + | |
| - | } | + | |
| - | + | ||
| - | menuentry " | + | |
| - | search --set=root --label BATOCERA | + | |
| - | linux /boot/linux label=BATOCERA console=tty3 quiet loglevel=0 vt.global_cursor_default=0 | + | |
| - | initrd / | + | |
| - | } | + | |
| - | </ | + | |
| - | + | ||
| - | ===== Dual boot Batocera and iOS/using rEFInd ===== | + | |
| <WRAP center round important> | <WRAP center round important> | ||
| Line 151: | Line 132: | ||
| EOF | EOF | ||
| </ | </ | ||
| + | - Make it executable by running '' | ||
| - Run '' | - Run '' | ||
| - Reboot | - Reboot | ||
| Line 176: | Line 158: | ||
| * Partition 2: type = ext4. It must be created and placed right after the '' | * Partition 2: type = ext4. It must be created and placed right after the '' | ||
| - | Then download [[http:// | + | Then download [[https:// |
| <WRAP center round tip> | <WRAP center round tip> | ||
| Line 206: | Line 188: | ||
| </ | </ | ||
| * The file can also be automatically downloaded with the following command: < | * The file can also be automatically downloaded with the following command: < | ||
| - | sudo wget https:// | + | sudo wget 'https://wiki.batocera.org/ |
| </ | </ | ||
| - Then run the following commands: < | - Then run the following commands: < | ||
| Line 226: | Line 208: | ||
| Technically, | Technically, | ||
| - | By default, Batocera' | + | By default, Batocera' |
| < | < | ||
| Line 242: | Line 224: | ||
| gparted /dev/loop * | gparted /dev/loop * | ||
| </ | </ | ||
| + | |||
| + | If you prefer using a script instead of manual procedures, this will add a specified amount of space to a Batocera image file, | ||
| + | and will expand the /userdata SHARE partition to fill the added space: | ||
| + | |||
| + | <code bash| batocera-ventoy-resize.sh> | ||
| + | #!/bin/bash | ||
| + | # batocera-ventoy-resize.sh 20240921 n2qz/ | ||
| + | # Expand a Batocera installation image file to make storage space | ||
| + | # available in SHARE when booting the image from Ventoy. | ||
| + | # | ||
| + | # Tested on Ubuntu 24.04.1 LTS with e2fsprogs 1.47.0. May not work on | ||
| + | # older versions of linux, as current Batocera images (v41+) use newer | ||
| + | # ext4 features not available with older ext4 utilities | ||
| + | err () { | ||
| + | exitcode=$? | ||
| + | echo "... Exit code $exitcode on line ${BASH_LINENO[0]} while executing command: $BASH_COMMAND" | ||
| + | exit $exitcode | ||
| + | } | ||
| + | trap err ERR | ||
| + | growsize=" | ||
| + | inputimage=" | ||
| + | outputimage=" | ||
| + | if [ -z " | ||
| + | then | ||
| + | echo " | ||
| + | echo " | ||
| + | exit 2 | ||
| + | fi | ||
| + | image=$(basename " | ||
| + | if [ -z " | ||
| + | then | ||
| + | outputimage=" | ||
| + | fi | ||
| + | if [ " | ||
| + | then | ||
| + | echo "... Copy ${inputimage} to ${outputimage}" | ||
| + | cp " | ||
| + | else | ||
| + | echo "... Decompress ${inputimage} to ${outputimage}" | ||
| + | gzip -vkcd " | ||
| + | fi | ||
| + | echo "... Grow image ${outputimage}" | ||
| + | truncate -s " | ||
| + | echo "... Set up loopback device" | ||
| + | lodev=$(sudo losetup --find --show --partscan " | ||
| + | echo "... Loopback device is: ${lodev}" | ||
| + | sharepart=2 | ||
| + | sharepartdev=" | ||
| + | echo "... Adjust GPT on ${lodev}" | ||
| + | sudo sgdisk -e " | ||
| + | echo "... Show free space on ${sharepartdev}" | ||
| + | sudo dumpe2fs " | ||
| + | echo "... Resize SHARE partition ${sharepartdev}" | ||
| + | sudo parted -s " | ||
| + | echo "... Check ${sharepartdev}" | ||
| + | sudo fsck -f " | ||
| + | echo "... Grow ${sharepartdev}" | ||
| + | sudo resize2fs " | ||
| + | echo "... Show free space on ${sharepartdev}" | ||
| + | sudo dumpe2fs " | ||
| + | echo "... Detach loopback device ${lodev}" | ||
| + | sudo losetup -d " | ||
| + | echo "... Successfully completed" | ||
| + | </ | ||
| + | |||
- dual_boot_ubuntu_batocera.linux.1662641883.txt.gz
- Last modified: 4 years ago
- by atari