LucidEye
Posts: 84
Joined: Sun Aug 04, 2013 2:20 pm

Is there a way to dual boot WITHOUT noobs or berryboot?

Sun Nov 06, 2016 7:02 pm

I need to setup a multiple boot menu, but I can not use noobs or berryboot because of the way they use compressed image files, so please don't tell me to use those methods because I have tried them several times and they don't work the way I need, especially for distros like RetroPie.

So what I have done is to setup the distros I want as you normally would on an SD card, once the distro is all setup and working I then copy just the filesystem partition to my external USB HDD and point the cmdline.txt file on the firmware/boot sd card to the partition I want to boot from on the HDD... standard common method for booting from a USB drive.

What I now need is a menu that can let me select different distro filesystem partitions on the external USB HDD by changing the target partition in cmdline.txt

I am not worried about the /dev/"target partition" changing on boot since I will not be plugging any other storage devices into the USB ports other then the HDD with my distro partitions.

Ideally, I would like a script that scans any devices and partitions that are connected to the pi via the USB ports and then displays those partitions in a menu which I can then choose a target partition to boot from.
However, I would settle for a simple menu that I could just manually add selections to... like "choose partition 1, 2, or 3"

Is there a way to do this?

User avatar
procount
Posts: 2221
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Sun Nov 06, 2016 8:39 pm

I don't know of any other boot managers for RPi apart from Berryboot, Noobs, or my own version of Noobs called PINN. I have created an image of retropie that PINN can boot although I think it was v3.8 so it needs updating.

Anyway, noobs/pinn have 2 functions: an installer and a boot manager. You seem to have issues with the installer and have your own method of creating/installing your distros manually. That's fine. But you could still use either of them for your boot manager.

Just use noobs/pinn to install 2 OSes then replace the boot partitions on the sd card with yours, and put your root partitions on your USB drive. Then adjust the /settings/installed_os.json file to inform the boot manager of the actual OSes to boot.

In fact, iirc, if installed_os.json is missing but each of your boot partitions has its os.json file present you can get noobs/pinn to rebuild installed_os.json itself by scanning the sd card partitions.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

uroborous
Posts: 5
Joined: Wed Jan 25, 2017 7:18 am

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Wed Jan 25, 2017 8:54 am

Wow. Talk about dredging up old posts...
Ok. I am a complete newb to all of this. I just ordered my RPi3b and it has yet to arrive. I bought that as an experimental machine to learn on. My end goal is to be able to use an RPi0 dual booting:
1. a stripped out retropie that only has the atari 2600, nes, snes, game boy, game boy color, game boy advance, n64 (if it works) and sega genesis emulators. With accompanying roms.
2. Raspbian pixel. (Or ubuntu mate. Whichever one will actually work best.) and include a wifi usb dongle so that it can be used on the internet.

Why: i first wanted to do this when i saw a video of a person on youtube packing an RPi0 into an NES cartridge with all the connectors. And then running retro pie on it for nostalgic video game fun.
I looked at that and wanted to do the same. But then i found out that the RPi0 can be so much more than just a games emulator and i figured it woulf be a great detriment and somewhat of an insult to only use one for that.
So i decided to try and find out how to dual boot it with retropie and also a desktop OS so that it can be used as a desktop computer with wifi internet capability.
This is also the culmination of an idea i had years ago to build a simmilar pc that would be able to withstand the test of time and be gifted to my grandchildren at some future point so that they too can enjoy these same things that i grew up with.

Too long/Didn't read?
I want to dual boot retropie and raspbian pixel on a raspberry pi zero.

User avatar
procount
Posts: 2221
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Wed Jan 25, 2017 11:34 am

Just install PINN, make sure your Pi0 is connected to the internet, and then install Retropie and Raspbian. Job done.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

bazzer007
Posts: 4
Joined: Sun Jan 29, 2017 11:53 am

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Sun Jan 29, 2017 12:06 pm

procount wrote:I don't know of any other boot managers for RPi apart from Berryboot, Noobs, or my own version of Noobs called PINN. I have created an image of retropie that PINN can boot although I think it was v3.8 so it needs updating.

Anyway, noobs/pinn have 2 functions: an installer and a boot manager. You seem to have issues with the installer and have your own method of creating/installing your distros manually. That's fine. But you could still use either of them for your boot manager.

Just use noobs/pinn to install 2 OSes then replace the boot partitions on the sd card with yours, and put your root partitions on your USB drive. Then adjust the /settings/installed_os.json file to inform the boot manager of the actual OSes to boot.

In fact, iirc, if installed_os.json is missing but each of your boot partitions has its os.json file present you can get noobs/pinn to rebuild installed_os.json itself by scanning the sd card partitions.
I had a similar question to the OP and I noted your answer. Sounds fine, but it leads me to another question.

What is the reason for having noobs install 2 OSes and then replacing the boot partitions? Is there a problem with just creating a bunch of partitions on the card and filling them with the appropriate files (i.e. noobs into partition 1, settings files into 5, and various boot/roots into the others?

The reason I ask is because I am having a problem with just that! :) I've had no problem with noobs or with dd-ing another OS image directly to a card, but when I tried to manually configure a card (I used rsync to copy files from another card, and verified with diff) noobs won't load the OS, just keeps rebooting. Is there something obvious I'm missing?

Martin Frezman
Posts: 1009
Joined: Mon Oct 31, 2016 10:05 am

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Sun Jan 29, 2017 1:20 pm

Was it ever determined exactly what the real, underlying issue was here?

I've re-read this thread, but still have no idea what any of the help-seekers actual issues with either of the "normalized" solutions (i.e, NOOBS/PINN, or Berryboot) is.

Doesn't it seem reasonable to assume that some small modification to either of these solutions might be what they seek?
If this post appears in the wrong forums category, my apologies.

LucidEye
Posts: 84
Joined: Sun Aug 04, 2013 2:20 pm

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Sun Jan 29, 2017 8:43 pm

I explained the problem... BerryBoot and Noobs uses compressed image files as 'containers' from which they run the operating system rather than placing each OS in it's own separate partition on the SD card or external hard drive. Distros like RetroPie have major problems running from inside compressed image files, if they run at all.
The problem with the way the Pi needs to boot is that you have to first get to the OS before you can change the target partition in the /boot/cmdline.txt. I was looking for a way to setup some kind of menu access to the /boot/cmdline.txt target partition BEFORE the Pi boots into an OS.

We really need some kind of menu script or program that halts the boot process AFTER the firmware is loaded, but BEFORE it loads the target OS partition, and then gives the user a menu to choose which OS partition to boot from.
Is that really so hard to do?
Being that I am not a programmer, I was really hoping that someone here could come up with a solution, or tell me why it can't be done.
Martin Frezman wrote:Was it ever determined exactly what the real, underlying issue was here?

I've re-read this thread, but still have no idea what any of the help-seekers actual issues with either of the "normalized" solutions (i.e, NOOBS/PINN, or Berryboot) is.

Doesn't it seem reasonable to assume that some small modification to either of these solutions might be what they seek?

User avatar
procount
Posts: 2221
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Sun Jan 29, 2017 9:05 pm

@LucidEye - you have misunderstood how Noobs/Pinn operate. They do NOT run the OS from a compressed file. The .tar.xz format is just used to compress the image into a small size for distribution. On installation it is expanded into a nomal fat/ext4 partition as you are doing by copying with rsync.

You could just follow the instructions on noobs or pinn githubs for creating your own custom os, like I did for retropie 3.8.

Berryboot does it slightly differently as it uses chroot to share the kernel and squashfs for the file system.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

fruitoftheloom
Posts: 23823
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Sun Jan 29, 2017 9:07 pm

LucidEye wrote:I explained the problem... BerryBoot and Noobs uses compressed image files as 'containers' from which they run the operating system rather than placing each OS in it's own separate partition on the SD card or external hard drive. Distros like RetroPie have major problems running from inside compressed image files, if they run at all.
The problem with the way the Pi needs to boot is that you have to first get to the OS before you can change the target partition in the /boot/cmdline.txt. I was looking for a way to setup some kind of menu access to the /boot/cmdline.txt target partition BEFORE the Pi boots into an OS.

We really need some kind of menu script or program that halts the boot process AFTER the firmware is loaded, but BEFORE it loads the target OS partition, and then gives the user a menu to choose which OS partition to boot from.
Is that really so hard to do?
Being that I am not a programmer, I was really hoping that someone here could come up with a solution, or tell me why it can't be done.
Martin Frezman wrote:Was it ever determined exactly what the real, underlying issue was here?

I've re-read this thread, but still have no idea what any of the help-seekers actual issues with either of the "normalized" solutions (i.e, NOOBS/PINN, or Berryboot) is.

Doesn't it seem reasonable to assume that some small modification to either of these solutions might be what they seek?
PINN has Retropie: viewtopic.php?f=63&t=142574


The Raspberry Pi, unlike most SBC's, boots from the VPU:

http://wiki.beyondlogic.org/index.php?t ... ot_Process

https://www.raspberrypi.org/documentati ... /README.md
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

Martin Frezman
Posts: 1009
Joined: Mon Oct 31, 2016 10:05 am

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Sun Jan 29, 2017 9:12 pm

Thanks you, ProCount, for explaining that.

I was about to do a FotL style "Poppycock, Balderdash, and a few other terms" style response...

I wonder if OP is thinking about BerryBoot (which does, sort of, and to the limited extent that I understand it, operate like that) and is just assuming that NOOBS/PINN works the same way.
If this post appears in the wrong forums category, my apologies.

User avatar
procount
Posts: 2221
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Sun Jan 29, 2017 9:23 pm

bazzer007 wrote:I had a similar question to the OP and I noted your answer. Sounds fine, but it leads me to another question.

What is the reason for having noobs install 2 OSes and then replacing the boot partitions? Is there a problem with just creating a bunch of partitions on the card and filling them with the appropriate files (i.e. noobs into partition 1, settings files into 5, and various boot/roots into the others?

The reason I ask is because I am having a problem with just that! :) I've had no problem with noobs or with dd-ing another OS image directly to a card, but when I tried to manually configure a card (I used rsync to copy files from another card, and verified with diff) noobs won't load the OS, just keeps rebooting. Is there something obvious I'm missing?
The reason is that the OP asked for a DUAL boot system, hence I recommended installing TWO OSes.
It's not as simple as just copying some data to some partitions. You need to tell NOOBS or PINN what OSes are installed on which partitions so that it can build the boot menu.

I don't understand why you don't just follow the instructions to install a custom OS. https://github.com/procount/pinn/blob/m ... os-version or https://github.com/raspberrypi/noobs#ho ... os-version

NOOBS/PINN won't install to a USB hard disk at the moment, but having installed the OSes to the SD card it is possible to move (rsync/dd etc) the partitions to the hard disk and then modify the /settings/installed_os.json file to tell the menu system where the OSes have moved to.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

bazzer007
Posts: 4
Joined: Sun Jan 29, 2017 11:53 am

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Tue Jan 31, 2017 10:12 am

procount wrote:The reason is that the OP asked for a DUAL boot system, hence I recommended installing TWO OSes.
It's not as simple as just copying some data to some partitions. You need to tell NOOBS or PINN what OSes are installed on which partitions so that it can build the boot menu.

I don't understand why you don't just follow the instructions to install a custom OS. https://github.com/procount/pinn/blob/m ... os-version or https://github.com/raspberrypi/noobs#ho ... os-version

NOOBS/PINN won't install to a USB hard disk at the moment, but having installed the OSes to the SD card it is possible to move (rsync/dd etc) the partitions to the hard disk and then modify the /settings/installed_os.json file to tell the menu system where the OSes have moved to.
Yeah, I got that. I was just mucking around trying to figure out how everything worked. I didn't understand what nuance I was missing that meant the following didn't work for me:
  • Create partitions (1 primary FAT #1, 1 extended (#2), multiple logical (ext4 #5, FAT #6, ext4 #7, ...)
  • Copy NOOBs files to partition #1 (RECOVERY)
  • Copy, for example, LibreElec boot files to #6
  • In this example, LibreElec storage #7 is empty
  • Modify #6 files, cmdline.txt, os_config.json to reference proper partitions
  • Create settings files on #5 (SETTINGS), installed_os.json and noobs.conf referencing proper partitions
  • Compare all files with functioning SD card and no differences (other than required for referencing different partitions, UUIDs etc.)
I (naively?) thought that this should boot. NOOBS boots (SHIFT screen) but doesn't boot the installed OS, just reboots over and over.

Now, as I said, I'm just playing around, trying to figure stuff out. I don't have any problem using NOOBS as intended and I'm happy to keep digging into what my problem is, I'm treating it as a learning exercise. I'm just wondering if there's something that I'm missing (such that this would never work), or maybe I just made a simple mistake somewhere along the line and I'll need to track that down.

fruitoftheloom
Posts: 23823
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Tue Jan 31, 2017 10:34 am

bazzer007 wrote:
  • Create partitions (1 primary FAT #1, 1 extended (#2), multiple logical (ext4 #5, FAT #6, ext4 #7, ...)
  • Copy NOOBs files to partition #1 (RECOVERY)
  • Copy, for example, LibreElec boot files to #6
  • In this example, LibreElec storage #7 is empty
  • Modify #6 files, cmdline.txt, os_config.json to reference proper partitions
  • Create settings files on #5 (SETTINGS), installed_os.json and noobs.conf referencing proper partitions
  • Compare all files with functioning SD card and no differences (other than required for referencing different partitions, UUIDs etc.)
I (naively?) thought that this should boot. NOOBS boots (SHIFT screen) but doesn't boot the installed OS, just reboots over and over.

Now, as I said, I'm just playing around, trying to figure stuff out. I don't have any problem using NOOBS as intended and I'm happy to keep digging into what my problem is, I'm treating it as a learning exercise. I'm just wondering if there's something that I'm missing (such that this would never work), or maybe I just made a simple mistake somewhere along the line and I'll need to track that down.
https://github.com/raspberrypi/noobs/wi ... -explained
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot) RaspiOS64 ARM64
Asus ChromeBox 3 Celeron is my other computer...

User avatar
procount
Posts: 2221
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Tue Jan 31, 2017 10:40 am

Ahh! Mucking around puts a whole new perspective on it! :D
Well, it looks like you're on the right lines, and I can't see anything wrong, but obviously something is!
Checking against FotLs link would be useful just to make sure.
But that's one of the reasons for using NOOBS/PINN to install 2 known working OSes in the first place, as it gets the settings files right, so maybe one less thing to get wrong (?)
But then you are comparing against a working SD card, so I guess that is similar.
If you use PINN instead of NOOBS you can enable SSH which might give you better insight. You could run 'tail -f /tmp/debug' and see if there are any error messages that occur just before it reboots.
Last edited by procount on Tue Jan 31, 2017 11:36 am, edited 1 time in total.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

bazzer007
Posts: 4
Joined: Sun Jan 29, 2017 11:53 am

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Tue Jan 31, 2017 11:21 am

Thank you both for continuing to offer advice. I've already read that doc, which is why I thought I had a reasonable handle on what was going on. So, I've been surprised (and frustrated) when it didn't work as expected! :(

I see that InitDriveThread::method_resizePartitions is kind of particular about where it places the first partition (4MiB vs 1MiB that I used). I wonder how important that is?

Anyway, I think I might try your idea of starting with a working NOOBS and modifying that to see if that works as I expect. Then, maybe I'll try PINN with SSH and see if it does the same and can give me some insight.

Thanks again!

User avatar
Milliways
Posts: 541
Joined: Fri Apr 25, 2014 12:18 am
Location: Sydney, Australia

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Wed Feb 01, 2017 1:35 am

bazzer007 wrote:Thank you both for continuing to offer advice. I've already read that doc, which is why I thought I had a reasonable handle on what was going on. So, I've been surprised (and frustrated) when it didn't work as expected! :(

I see that InitDriveThread::method_resizePartitions is kind of particular about where it places the first partition (4MiB vs 1MiB that I used). I wonder how important that is?

Anyway, I think I might try your idea of starting with a working NOOBS and modifying that to see if that works as I expect. Then, maybe I'll try PINN with SSH and see if it does the same and can give me some insight.

Thanks again!
You say "didn't work as expected" - what actually happens?
Did you modify the /etc/fstab entry on the image you dd'd over?

bazzer007
Posts: 4
Joined: Sun Jan 29, 2017 11:53 am

Re: Is there a way to dual boot WITHOUT noobs or berryboot?

Wed Feb 01, 2017 2:06 am

Milliways wrote:You say "didn't work as expected" - what actually happens?
Did you modify the /etc/fstab entry on the image you dd'd over?
As per my earlier post, NOOBS just keeps rebooting. In the example given, I used LibreElec, so I don't think there's an /etc/fstab to modify? If that's not the case, that's probably my issue. I did modify all the other required files (I think).

Return to “Advanced users”