Jump to content
IGNORED

Howto: Dual boot internal SSD with grub


zzip

Recommended Posts

Background:

Installing a boot-loader on internal drive has been tricky for a few reasons.

1. AtariOS has tight control over the EFI partition on the eMMC (Atari OS)  drive,  any changes you make there soon get reverted.   

2. Until a fairly recent BIOS update,  eMMC always took boot priority over the internal m.2 drive.   Fortunately it is now possible to change the boot order

3. Previously whenever I tried booting AtariOS from grub or refind, it would trigger update mode, and the VCS would download and install the latest update even though it wasn't needed.   

 

For grub2,  I started with the configuration posted by @0_obeWAN in this thread,  it has a very attracted VCS Boot menu screen preconfigured.   I just made modifications to prevent it from triggering the VCS update mode.

 

 

First before doing anything else, make sure your SSD has an "EFI Systems Partition" (aka ESP).    Mine didn't, I had to create it.    Basically you just need a 200-300MB partition of type "EFI System" formatted as FAT32.   But you may need to resize another partition to get space.   If you aren't sure how to do this, I can provide more detailed instructions

 

Next you need to be able to write to this EFI system partition.   That means mounting it on Linux,  not sure on Windows it might show up as a separate drive letter or volume I suppose.

 

Download @0_obeWAN 's grub2 configuration from here:  https://drive.google.com/drive/folders/1Bb7gGYhhfj7JJgPHurWdv6rmHHevzm4V

You want the file "Grub2 VCS.zip"

 

Unzip that file, and copy the "boot" and "efi" folders from the "Grub2 VCS" folder to your EFI partition

 

in the efi, find the file efi/boot/loader.cfg and open in your favorite text editor.

 

First look for this line:

add_os_if_exists /efi/Linux/linux.efi "ATARI Apertis" os

and comment it out by putting a # on the start of the line, so it looks like this:

#add_os_if_exists /efi/Linux/linux.efi "ATARI Apertis" os

 

that line auto-detects AtariOS, but seems to trigger update mode.   Not what we want.  Instead insert a blank line below that entry and paste this:

 

menuentry 'Atari OS' --class "os" {
        insmod part_msdos
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set=root 3F9A-AF23
        chainloader /EFI/BOOT/BOOTX64.EFI
}

 

Now notice the --set=root 3F9A-AF23?  You need to replace 3F9A-AF23 with the UUID of the Atari partition for your system.    In linux you can find that code by typing

 

sudo blkid /dev/mmcblk0p2

 

I'm not sure how to do it for windows.    Replace the UUID with the one that command returns, save the loader.cfg file.

 

The last step is to go into BIOS and set your boot order to USB->SSD->eMMC so that it boots to SSD first.

 

If all goes well, next time you reboot, you should see a grub2 menu that allows you to select your OS.

 

If things don't go as expected, you can reverse some or all of these changes->  change the boot order, remove the files you installed, etc.

 

Let me know if you want me to go into more detail on any of these steps

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

With alot of info around here how does your instructions above differ from this?  This seems abit more clean unless what you are doing is different?

 

Also - Im interested in getting a Windows partition along with Batocera (instead of Linux) but havent seen any real good documentation on doing that - most are Linux installs.

 

 

Install rEFInd boot manager permanently on SSD (and also dual boot Atari OS and Batocera)

I successfully installed rEFInd permanently on SSD.  I also dual boot Atari OS and Batocera as well as Linux Mint on the SSD.  All of this works without permanently plugging in a USB flash stick and without installing anything on the eMMC.
The guide in OP’s post does not contemplate installing rEFInd to the SSD, perhaps because Atari only recently updated the bios to allow you to boot from SSD before the eMMC.  Also the guide to dual booting Batocera and Linux on the Batocera wiki did not work for me on the VCS.  So, I made this guide.

 

Final setup:  Atari OS on eMMC, Batocera and Linux Mint on SSD, with rEFInd boot manager installed on SSD to boot into the OS of your choice.

1.       Disable Secure Boot if not already done and make sure your Atari OS firmware is up to date.  If you cannot access bios to disable secure boot, you must do so as follows:
    a.       Downgrade VCS firmware using the Atari recovery image that’s floating around here.  Image it to USB flash drive using a tool like Balena Etcher on Windows 10.  Insert Atari USB stick in rear Atari VCS USB port and turn on VCS.  Select the 2nd option to flash bios.  Allow it to flash BIOS and reboot.  After reboot, select option 1 to flash Atari OS.  After this process is complete, remove Atari USB stick and turn on VCS while holding down Escape.  Enter the bios and go to Secure Boot Options.  Password for bios is now Atar!C3l3br8te$50Ye4r$ .  Disable secure boot.  Exit bios and boot into Atari OS.  Connect to internet and allow Atari OS to update to most current version.  Restart Atari VCS while holding Escape to enter the bios.

 

2.       Change Atari VCS bios to allow booting from SSD before eMMC as follows:
    a.       Enter Bios by holding down Escape as turning on VCS. Go to Setup Utility, choose “Boot” section at top of screen, and then go to option “Set Boot Order” and change to option (b) USB à SSD à eMMC.   Press F10 to Exit and Save Changes, and click yes when it asks if you want to save changes.  Exit bios and turn off Atari VCS.

 

3.       Flash Batocera to USB stick.

 

4.       Insert USB stick to VCS and boot.  Batocera will launch automatically.

 

5.       Install Batocera as follows:
    a.       Press Space Bar on Keyboard or Start on Controller to enter Main Menu.
    b.       Go to System Settings, then scroll down until you get to “Install Batocera on a New Disk.”  Select “Target Device” as your SSD.  This will wipe the entire SSD.  Batocera does not give you the option to install to a partition.  Be careful to select the right target device.  Select “Target Architecture” as x86_64.  Select “Are you Sure” as Yes.  Select the Install button and press enter.
    c.       Remove Batocera USB stick.

 

6.       Flash Linux Mint to USB stick.

 

7.       Insert USB stick to VCS and boot.  Linux Mint will launch automatically.

 

8.       Install Linux Mint as follows:
    a.       Click on “Install Linux Mint.”  Select SSD as target device.  When installing Linux Mint on SSD, Mint will tell you that there are other operating systems already installed, and will ask if you want to leave those operating systems in place or wipe the whole drive.  Select the option to leave those operating systems in place.  The next screen will allow you to select the size of the partition you want for Batocera and the size you want for Linux Mint.  Finish install process and VCS will reboot into Linux Mint.

 

9.       Install rEFInd boot manager as follows:
    a.       Make sure you are connected to the internet.  If you use WiFi, you will need to connect to Wifi network from within Linux Mint by clicking on wireless icon, even if Atari OS has your wireless credentials you need to reenter them in Linux Mint.
    b.       In Linux Mint, open the “Terminal” app that is visible on the bottom bar of the Mint OS.  Type “sudo apt install refind”.  As long as you are connected to the internet, rEFInd will automatically download and install.
    c.       Remove Linux Mint USB stick.

 

10.   Reboot VCS.  Finished!  The VCS now boots directly into rEFInd and will give you the option to boot into Atari OS, Batocera, and Linux Mint.  
    a.       You will need a keyboard to select which boot option, however it will automatically boot into the last used OS after 20 seconds, so if you normally play with a controller and don’t have a keyboard connected, you only need to have a keyboard connected when you feel like changing the OS.  Obviously I’d love a controller enabled boot manager but rEFInd can’t do that to my knowledge.
    b.       Optional: There will likely be too many boot options that appear, so you can clean up the U/I by deleting unnecessary options until you just have the 3 boot options for Atari OS, Batocera, and Linux Mint.
 

Link to comment
Share on other sites

  • 2 weeks later...

@Goochman did you test/implement the instructions you posted?  I like the idea of installing M.2 SSD, setting boot order so that M.2 SSD is booted first, and installing boot selector directly on the M.2 SSD. Every boot asks which OS, no need for a thumbdrive plugin/unplug (typically slower and less stable than internal M.2 SSD), and no need to edit BIOS every time you want to switch.  All of those methods are valid, but I think this is most stable and least work every time you want to switch.

 

If someone were to put linux and windows on the M.2 drive, anyone have any suggestions on a drive and partition size and why?  Windows 10 seems to have been done by several, is Windows 11 also good on this hardware?

Edited by Rodgie
Link to comment
Share on other sites

On 12/21/2022 at 9:44 AM, Goochman said:

With alot of info around here how does your instructions above differ from this?  This seems abit more clean unless what you are doing is different?

 

Also - Im interested in getting a Windows partition along with Batocera (instead of Linux) but havent seen any real good documentation on doing that - most are Linux installs.

 

Those instructions are using rEFInd instead of Grub2.    I'd actually prefer to use rEFInd, however whenever I boot Atari OS with it it triggers "update mode" and the VCS will download and reinstall the latest update everytime you boot it through the menu.

 

What my instructions do is provide a way to boot AtariOS through grub without triggering that issue.    If/when I can find a way to do the same with rEFInd, I'd probably switch.  rEFInd likes to autodetect the bootable OSes available rather than you providing the list and special parameters

  • Like 1
Link to comment
Share on other sites

On 1/1/2023 at 1:11 PM, Rodgie said:

If someone were to put linux and windows on the M.2 drive, anyone have any suggestions on a drive and partition size and why?  Windows 10 seems to have been done by several, is Windows 11 also good on this hardware?

The main issue with determining partition size is it depends what software you intend to install

 

For Linux, I usually create 32gb - 64gb partitions to install the main OS,  then I put HOME and other data partitions on separate partitions where I can resize later without impacting the OS.

 

Some people like to handle Windows in a similar way.  the C drive is large enough to hold Windows with an easily determinable size  and D is used to install everything else, resized or swapped later as needed.

 

Some people have said Win 11 works on the VCS, I haven't tried it

 

 

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 1/3/2023 at 6:59 AM, zzip said:

Those instructions are using rEFInd instead of Grub2.    I'd actually prefer to use rEFInd, however whenever I boot Atari OS with it it triggers "update mode" and the VCS will download and reinstall the latest update everytime you boot it through the menu.

 

What my instructions do is provide a way to boot AtariOS through grub without triggering that issue.    If/when I can find a way to do the same with rEFInd, I'd probably switch.  rEFInd likes to autodetect the bootable OSes available rather than you providing the list and special parameters

I installed refind and it came up with multiple bootable instances of AtariOS. One of the instances would trigger a reinstall, but the other doesn't. I just removed that instance from the refind menu.

Link to comment
Share on other sites

On 1/14/2023 at 7:40 PM, JR> said:

I installed refind and it came up with multiple bootable instances of AtariOS. One of the instances would trigger a reinstall, but the other doesn't. I just removed that instance from the refind menu.

I swear I tried both and both triggered the update,  but maybe refind was shuffling the menu order on me?

Link to comment
Share on other sites

3 hours ago, zzip said:

I swear I tried both and both triggered the update,  but maybe refind was shuffling the menu order on me?

Or maybe there just happened to be a valid update when you tried....lol. At any rate I think one is a recovery partition that will always trigger the update and the other is the active one.

Link to comment
Share on other sites

1 hour ago, JR> said:

Or maybe there just happened to be a valid update when you tried....lol. At any rate I think one is a recovery partition that will always trigger the update and the other is the active one.

Maybe it's time for me to give refind another try then.   I've always preferred it over grub since it's more dynamic and easier to configure.

Link to comment
Share on other sites

  • 1 month later...

My grub solution was working great for awhile,  but now it's triggering an update everytime I select Atari OS.   If I change boot order to USB->EMMC->M2 it works correctly, but when I switch it back it goes into update mode again.

 

Obviously Atari is doing something unconventional with boot loading

Someone told me that:

'EFI Embedded MMC Device (TA2932)' boots AtariOS.
'EFI Embedded MMC Device 1 (TA2932)' boots the updater.

 

But I'm pretty sure that no matter which device I pick I get the updater.    The chainloader method I posted in this thread was the first method I found that didn't trigger the updater.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...