Multi-boot
Pages: 1 2
Chris Hall (132) 3558 posts |
On the Pandaboard I was able to set up an SD card with three partitions (the two, FAT and filecore that RISC OS uses plus an ‘ext’ partition for Linux so that, depending whether the USER button was pressed, would either start up RISC OS or Linux. Now I am looking at the Pi and wonder whether I can simply load the Linux kernel into memory and jump to it so that I can abandon RISC OS (until the next boot) and jump into Linux. After all that is how the RISC OS kernel is started. There must be some jiggerly pokery needed as I just get an ‘undefined instruction at &12000’ error when I do a *load riscos/img A000 followed by CALL &A000. There is a kludgy way to do it: |
Bryan (8467) 468 posts |
Some time ago I settled for having another headless Pi running Linux and a headless PC running XP. (and a few more headless Ras Pis doing various tasks around the house) I use this Pi 4 with VNC to whichever other computer OS I want to use. The PC has no video card etc and only a single SSD so runs almost silent and very very low power consumption – so is on 24/7 |
Chris Hall (132) 3558 posts |
Now I am looking at the Pi and wonder whether I can simply load the Linux kernel into memory and jump to it so that I can abandon RISC OS (until the next boot) and jump into Linux. After all that is how the RISC OS kernel is started. A better method is to: |
David J. Ruck (33) 1636 posts |
That’s a good solution. Mine is to have one running RISC OS, and another one (well 13 at the last count) running Linux. |
jim lesurf (2082) 1438 posts |
13 beats me. I only have 5 linux boxes. :-) However I like the idea of being able to run both on one machine. Hence also the other thread about being able to access and use an ex3/4 partition from RO looks interesting to me. |
Andrew McCarthy (3688) 605 posts |
It would be ideal to select between RISC OS and Linux on startup. Did NOOBS do this? A benefit of installing RISC OS from the Raspberry NOOBS download was that you had a way to reverse any mistake made from changing its set-up, by pressing shift on startup. |
Chris Hall (132) 3558 posts |
I do now have an SD card image with three partitions on it – an overlapping FAT and filecore partition and an ext4 partition. The Pi Zero boots up in RISC OS. If you then do a CTRL-break with the switch between pins 29 (GPIO5) and 30 (GND) closed, it boots up in Linux. GPIO 5 is internally pulled up to 3.3V. I just added these lines in CONFIG/TXT:
The Linux side of things is not perfect because I could not copy all of the files in rootfs as some were protected (and Ubuntu didn’t allow me to ‘copy as admin’), but it gets a long way along until it complains. So someone with more knowledge of Linux (my knowledge of Linux is zero) could probably copy these files as well as the other 100,000 or so that it was happy to copy. |
Ronald (387) 195 posts |
Ubuntu didn’t allow me to ‘copy as admin’ Would that be the (sudo) dd utility you need? I’m a bit rusty, I like the look of what you are doing though. |
Chris Hall (132) 3558 posts |
I needed to copy the files in the 4GB ext4 partition of the Raspian SD card image into a folder on my hard disc and then onto the SD card I had just added an ext4 partition to. There was no ‘copy as administrator’ option (equivalent to sudo on the command line) under Ubuntu 10 (which I have on a CD when I need to do partition stuff). So although I copied lots of files, a few had to be skipped. Not sure if that is the problem. Ubunto 10 does not support the sudo command from the command line. |
Steve Pampling (1551) 8172 posts |
Ah the joy of a secure OS where the people producing the build decide you aren’t smart enough to use all the tools, so they remove selected items… You’re after a GUI based method I assume. As Ronald said you could probably do what you need at the command line with the right syntax, but that’s often a faff. Sort of like having to do a RO TinyDir add via the command line and then save the result via the GUI. |
Ronald (387) 195 posts |
Ubunto 10 does not support the sudo command from the command line. Systems not set up for sudo, usually use su (enter) then password to get into root mode. |
Chris Hall (132) 3558 posts |
I use Nautilis and it does not offer the ‘open folder as root’ option, presumably because I have not supplied a root password? |
Ronald (387) 195 posts |
When a filer has that option, it prompts you for the password after you select it. |
Chris Hall (132) 3558 posts |
I have worked it out – I need to type ‘sudo bash’ at the terminal. No password needed. The multi boot now works. A switch on the header selects whether it boots in RISC OS on SD card or into Raspian on the USB drive. Rebooting will reboot into whichever the switch implies. |
Steve Pampling (1551) 8172 posts |
What were people saying about security in RO? |
Raik (463) 2061 posts |
I use this dual-microsd-card adapter for my Pi3B+. |
Ron Briscoe (400) 78 posts |
@ Raik, regards Ron. |
Erich Kraehenbuehl (1634) 181 posts |
@Chris Hall: Since Pi4 the micro-SD-card switcher does not work anymore, so i would like to do a switch to boot between Risc OS and Raspbian (or Ubuntu ) |
Chris Hall (132) 3558 posts |
I have written an article for Archive describing how to do it. Basically you download the Raspian distro but you write the SD card image to a USB 3 pen drive. The neatest drive I have found is a Store ‘n’ Stay drive available from R-Comp which is just 6mmx17mmx8mm. You then write a RISC OS SD card image to an SD card, using SystemDisc to make the FAT partition 250MB. Use a ROM on or after 15 Nov 2020. You add all the FAT partition files from the Linux distro to the FAT partition on the SD card. You then add ‘disable_gamma’ to cmdline.txt. At this point the SD card will do a boot into Raspian, which then runs from the pen drive. Now you alter CONFIG.TXT so that it conditionally starts RISC OS (all the usual stuff plus ‘device_tree=’) based on a GPIO value. I used a switch on pins 29 & 30 (GPIO5). You also put the Raspian stuff in an opposite conditional. |
David Gee (1833) 268 posts |
Since (AIUI) the Pi4 and 400 can boot from USB, wouldn’t it be possible to have a system where SD card inserted = RO boots, while no SD, but USB inserted = Linux boots? |
Erich Kraehenbuehl (1634) 181 posts |
@Chris Hall: Thank you. I will try it. |
Chris Hall (132) 3558 posts |
Since (AIUI) the Pi4 and 400 can boot from USB, wouldn’t it be possible to have a system where SD card inserted = RO boots, while no SD, but USB inserted = Linux boots? On the Pi 400 it simply halts if no SD card is inserted. Even with a Linux distro on a USB flash drive. |
Chris Hall (132) 3558 posts |
There is an app for the Titanium ‘!GoLinux’ that will enter Linux from RISC OS. (Linux is on the SD card and RISC OS in flash memory.) |
Chris Gransden (337) 1207 posts |
You can also leave the SD card slot empty and use a USB 3 hub with power switch for each port. Just power on the one you want to boot from. |
Chris Hall (132) 3558 posts |
The Pi 400 will not start up with an empty SD card slot. |
Pages: 1 2