I am a very first user of the Raspberry Pi. However I've a little experience with linux.

Today I copied the NOOB Software to my Raspberry and installed Raspbian and Raspbmc.

I have connected my raspi to my network so I can work from remote (ssh with Android / Windows). Everything works pretty good.

I wonder, if it is possible to reboot the Raspi to an operating system of my choice without using an usb keyboard/mouse.
Is there a possible shell comand? I don't want to plug in a keyboard/mouse to change the OS.

How to bypass the Recovery splashscreen and boot directly into a fixed partition
After you have installed your chosen OSes, add the following file to the root directory of NOOBS to force the indicated partition to be booted at power-on.
Add a text file named autoboot.txt to the root directory of NOOBS.
Add boot_partition=<partition number> to the file and save it to disk.
This will also prevent the splashscreen from being displayed at boot.

Hi,
I have installed Raspbian and Raspbmc on the same SD card using NOOBS.
Following the instructions I have mounted /dev/mmcblk0p1 to /mnt/NOOBS/ and created autoboot.txt in the root folder of the first partition of the D Card. Inside I added one row

I tried boot_partition with almost all the numbers and it still is showing me the screen in the beginning to choose OS with default the one I booted last. It seems in totally ignores the existence of the autoboot.txt file.
1.Can you please advise where is the problem ? Have I misstyped or misunderstood something ?
2. CA you tell me why there are so many partitions on the SD Card after the installation. last 4 seem to be the Raspbian and Raspbmc. I'm not sure what the second and third partition are doing and how the numbers are going. for example which number should be /dev/mmcblk0p7 - number 7 or number 6 (since it is 6th row) or 5 (if the row count start form 0) ?

zerg wrote:I tried boot_partition with almost all the numbers and it still is showing me the screen in the beginning to choose OS with default the one I booted last. It seems in totally ignores the existence of the autoboot.txt file.
1.Can you please advise where is the problem ?

zerg wrote:2. Can you tell me why there are so many partitions on the SD Card after the installation. last 4 seem to be the Raspbian and Raspbmc. I'm not sure what the second and third partition are doing and how the numbers are going.

/dev/mmcblk0p2 is the extended partition (we'll come back to this later)

/dev/mmcblk0p3 is the NOOBS setting partition - this contains files telling NOOBS which OSes are installed, what partitions they're installed on, which OS should be loaded by default, which langauge/keyboard NOOBS should use, etc.

For historical reasons, SD cards (and hard-drives) can only have a maximum of 4 primary partitions, but one of those partitions can optionally be an extended partition, and that extended partition can contain an unlimited amount of logical partitions. On Linux, partitions 1-4 are always the primary partitions, and logical partitions are always numbered 5 and above.

will force your Pi to reboot and load from partition 7 (/dev/mmcblk0p7) directly, bypassing the NOOBS interface, and without having to write any files to disk (or mounting /dev/mmcblk0p1). After the reboot, reboot_part will be set back to 0 i.e. disabled, which means the next reboot will load from /dev/mmcblk0p1, same as always.

Many Thank AndrewS,
"/sys/module/bcm2708/parameters/reboot_part" works very well and is solving the issue. This is very efficient way to reboot into the OS image you want.
Also I see that there is new version of NOOBS, so will try if they have fixed the autoboot.txt.

Hi,
I found another way to change the boot image. The third partition (/dev/mmcblk0p3), is for the settings of NOOBS. There is a configuration file noobs.conf. It seems it defines which is the default OS to boot :

So if you change the default_partition_to_boot, I assume this will work. I did not try it though.
I'm wandering where the waiting time is stored and how can change the 10 seonds when booting and you have choice to manually hange the OS.

zerg wrote:So if you change the default_partition_to_boot, I assume this will work. I did not try it though.

Yeah, should do (it's the setting that NOOBS uses to 'remember' which OS was booted last).
That's obviously a more 'permanent' change than using the "/sys/module/bcm2708/parameters/reboot_part" though.

I'm wandering where the waiting time is stored and how can change the 10 seonds when booting and you have choice to manually hange the OS.

will force your Pi to reboot and load from partition 7 (/dev/mmcblk0p7) directly, bypassing the NOOBS interface, and without having to write any files to disk (or mounting /dev/mmcblk0p1). After the reboot, reboot_part will be set back to 0 i.e. disabled, which means the next reboot will load from /dev/mmcblk0p1, same as always.

Thank You for this AndrewS.
I was exactly looking for this...
Always boot to Raspbian unless i ask system to boot to other OS from Raspbian. And even after restart from that OS, i wanted to come back to Raspbian.

will force your Pi to reboot and load from partition 7 (/dev/mmcblk0p7) directly, bypassing the NOOBS interface, and without having to write any files to disk (or mounting /dev/mmcblk0p1). After the reboot, reboot_part will be set back to 0 i.e. disabled, which means the next reboot will load from /dev/mmcblk0p1, same as always.

I have Raspbian and LibreElec installed on my sd card. I tried running the code on ssh in LibreElec. First it says I don't need sudo since I am already logged in as root, then after I tried without sudo it says no such directory. What am I doing wrong?

I have the same issue.
I can reboot from Raspbian to another partition (let's say LibreELEC) by prod a sysfs parameter and it is really convenient. But I can't perform the same in LibreELEC (or OSMC).
In other words I couldn't find the right system parameter for reboot partition in LibreELEC (neither in OSMC).
Can anyone help?

The Reboot command didn't work for me Would have been nice if it was that easy lol.

What did work was to use the 500mb data partition the NOOBS and PINN have as an option.

Then I made a few files in this partition, I have three OS's loaded, so I made three files.
Each file is basically a different version of autoboot.txt. Each file sets a different boot partition, so one file might contain

I then mounted /dev/mmcblk0p1 (PINN boot partition), and copied one of these autoboot files to autoboot.txt.
Reboot, and the OS selected by autoboot.txt booted up.

Hope this makes sense, working on a wiki page with the specific instructions, once I finish getting all this working how I want, will post a link to that page. But I was able to boot to different partitions using this method last night, works fine.

I even did it from picoreplayer, which runs picore running out of RAM. I can not (easily) make changes to picoreplayer, so I have to mount the drives each time. So I mounted the PINN boot partition and the data partition, copied the new autoboot.txt, and rebooted to a different OS.

I'm going to make it easier to change, planning to use an Android program, SSH Button, which will send a command to my pi. So, after mounting the partitions for boot and data (I still need to edit fstab to mount these partitions at boot), I will send something like this

a easy way is the VNC selection of PINN,
for this you add in recovery.cmdline
vncshare forcetrigger
so you end up at every boot at the INSTALL menu of PINN ( and waiting for you to connect VNC )
with EXIT and OS select you have that remote boot select from a remote PC ( is that what you look for? )

It should be ok just leave it plugged into the charger and let it build a charge... if it is at the stage where boot-loops happen, it should still be ok , once he charges enough to turn on and start bootlooping... Just remove the batt. count to 15 and replace battery and put back on charger, this should result in the powered off charging screen where it shows the battery charging up let it build a good charge then continue once it finally boots past the bootloops