Berryboot v1.1 - Boot menu / OS installer


547 posts   Page 1 of 22   1, 2, 3, 4, 5 ... 22
by Max » Sat Jul 28, 2012 6:24 pm
Updated my Berryboot bootloader to make it a bit more user friendly.

What is it?

Berryboot is a utility that allows you to:

  • put multiple operating systems on the same SD card.
  • download and install operating systems from the Internet.
  • optionally store the operating system files on an external USB stick/drive instead of on the SD card
  • allows you to use smaller 1 GB SD cards. (thanks to SquashFS compression)
  • takes care of different memory split requirements (will automatically change the boot files and reboot if the operating system you selected needs a different memsplit)

Website: http://www.berryterminal.com/doku.php/berryboot


To install:

Simply extract the 19 MB .zip file to a normal empty SD card.
This can be done in Windows, without any special image writing software.
Put the SD card in your Pi and boot it up.

Image

Verify the time zone and keyboard settings.

Image

Select the drive you want to install the operating system files to.
It will reformat this drive.

Image

Select which operating system you would like to have (can add more later)

Image

Grab some coffee will it downloads and installs the operating system.

Image

In the Berryboot menu editor GUI you can install more operating systems, edit the properties (change the name and default memsplit), clone images and delete them.

Press "exit" to exit the editor and reboot.

After installation

If you do nothing during boot it will boot your default operating system after 3 seconds.

Image

If you press "enter" it will present you with a boot menu.
Select the "operating system installer" if you want to go to the Berryboot menu editor GUI.
by ejsolutions » Sat Jul 28, 2012 8:41 pm
This is a great addition to the Pi armoury. Thanks!
Posts: 96
Joined: Fri Jun 29, 2012 2:27 pm
Location: In the sticks of Haggisland
by JeremyF » Sat Jul 28, 2012 9:07 pm
Love it! Is there an option to use the setup thingy with pre-downloaded images (i.e. select their location rather than having download)
{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge
Posts: 516
Joined: Wed Jan 25, 2012 9:06 pm
by Max » Sat Jul 28, 2012 9:18 pm
JeremyF wrote:Love it! Is there an option to use the setup thingy with pre-downloaded images (i.e. select their location rather than having download)


Image

Can put the pre-downloaded files on a USB stick and use the "copy OS from USB stick" option.

However you cannot put the pre-downloaded images on the SD card itself.
The utility has to reformat the SD card with a file system more suitable for Linux, wiping its contents.
It does saves its own system files in memory first, to restore them after the format is complete. But the Pi doesn't have enough memory to do the same trick with a large operating system image.
by JeremyF » Sat Jul 28, 2012 9:43 pm
Max wrote:
JeremyF wrote:Love it! Is there an option to use the setup thingy with pre-downloaded images (i.e. select their location rather than having download)


Image

Can put the pre-downloaded files on a USB stick and use the "copy OS from USB stick" option.

However you cannot put the pre-downloaded images on the SD card itself.
The utility has to reformat the SD card with a file system more suitable for Linux, wiping its contents.
It does saves its own system files in memory first, to restore them after the format is complete. But the Pi doesn't have enough memory to do the same trick with a large operating system image.


I must have skimmed over that part of the image :roll:

Anyway, perfectly reasonable that it must be on a USB stick.
{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge
Posts: 516
Joined: Wed Jan 25, 2012 9:06 pm
by mahjongg » Sat Jul 28, 2012 10:10 pm
This is absolutely great, just what I hoped would be developed!

Even just the option to install a small file with just the standard windows tools (or mac tools I suppose) is a breakthrough, but having multiple images you can boot from a boot menu is something that many said was almost impossible!

A question, just to still my own curiosity. You say the installer can download a distro from "the internet", what does that mean?
Is there a single server that has these images? What if I want to install an image from another source (yes I saw the install from USB stick trick) are there mirrors of the server? Does this server (or servers) work in co-operation with the raspberry PI foundation, with the distro producers? This isn't meant as negative criticism, but I can imagine that if berryboot becomes a success these are issues that will become important.
User avatar
Forum Moderator
Forum Moderator
Posts: 5201
Joined: Sun Mar 11, 2012 12:19 am
by Mr.Dave » Sat Jul 28, 2012 10:28 pm
Perfect timing :)

Looking forward to trying this on Monday :D
User avatar
Posts: 148
Joined: Sat Jun 30, 2012 6:59 pm
by ejsolutions » Sat Jul 28, 2012 10:31 pm
With the previous release, I had manually added the non-foundation raspbian image, no problems. I intend to setup the new version with almost exclusively my own choice of distros, with no use of a USB stick required. This was all explained on the website and I had raspbian as a compressed image too - excellent. Four OSes on an 8Gb SD card brings it inline with my laptop, on a smaller scale. :)
Posts: 96
Joined: Fri Jun 29, 2012 2:27 pm
Location: In the sticks of Haggisland
by Max » Sat Jul 28, 2012 11:15 pm
mahjongg wrote:A question, just to still my own curiosity. You say the installer can download a distro from "the internet", what does that mean?


That means that it will fetch a list with available distributions and download locations from my server.
For security and data integrity, the list is cryptographically signed and contains SHA1 hashes of the images.
So mirrors maintained by third parties could in theory be added to the list at some stage, without compromising integirty.

What if I want to install an image from another source (yes I saw the install from USB stick trick)


There are some practical issues with having multiple repositories.
Berryboot does not only need to know the location of the list, but also the public key that will be used to sign the list.
Adding extra keys to the system might be more complicated to the average user then the USB stick trick.

Aside from the USB option: if you do have one operating system installed on your Pi, you can download additional images with any browser and simply move them to the right folder on disk, like with the previous Berryboot version.
(provided that the images are in the SquashFS format)

Does this server (or servers) work in co-operation with the raspberry PI foundation, with the distro producers? This isn't meant as negative criticism, but I can imagine that if berryboot becomes a success these are issues that will become important.


Thought the foundation didn't want to be bothered with the software side of things? :mrgreen: :mrgreen:
But seriously, let's see if it gets any popularity first.
by AndrewS » Sun Jul 29, 2012 1:50 pm
Looks very slick! Haven't tried it yet, but I love the look of the 'graphical installer' :D

Max wrote:
mahjongg wrote:A question, just to still my own curiosity. You say the installer can download a distro from "the internet", what does that mean?

That means that it will fetch a list with available distributions and download locations from my server.
For security and data integrity, the list is cryptographically signed and contains SHA1 hashes of the images.

So, for those of us who prefer to "pre-download things" (and copy them to a USB stick as you already mentioned) can we get a link to this "download list" file please?
User avatar
Posts: 3494
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by Max » Sun Jul 29, 2012 2:17 pm
AndrewS wrote:So, for those of us who prefer to "pre-download things" (and copy them to a USB stick as you already mentioned) can we get a link to this "download list" file please?


Can find a human readable version at: http://dl.berryboot.com/distro.smime
(the one the installer fetches is .zsmime, which has the same data but qCompress()'ed )
by HB » Sun Jul 29, 2012 2:28 pm
Wow, that's brilliant work you've done there. Kudos to you.
Posts: 43
Joined: Sun Jan 01, 2012 9:49 am
by AndrewS » Sun Jul 29, 2012 6:12 pm
Max wrote:
AndrewS wrote:So, for those of us who prefer to "pre-download things" (and copy them to a USB stick as you already mentioned) can we get a link to this "download list" file please?

Can find a human readable version at: http://dl.berryboot.com/distro.smime

Thanks! :D Maybe it'd be worth adding a 'source' or 'version' field so that you could tell that e.g. http://178.63.95.79/dl/Debian_Wheezy_Raspbian.img192 was created from 2012-07-15-wheezy-raspbian.zip ?

These .img files are squashfs images right? Would it be too late to suggest using a different file extension, so that people don't confuse them with the .img files they write to a whole SD card with dd?

If I wanted to 'experiment' with berryboot, is the source available? ;) (feel free to PM me if you don't want to release the source publicly)
User avatar
Posts: 3494
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by Max » Sun Jul 29, 2012 7:03 pm
AndrewS wrote:Maybe it'd be worth adding a 'source' or 'version' field so that you could tell that e.g. http://178.63.95.79/dl/Debian_Wheezy_Raspbian.img192 was created from 2012-07-15-wheezy-raspbian.zip ?


Good point.
(although I do hope any future version is apt-get upgrade'able.)

These .img files are squashfs images right? Would it be too late to suggest using a different file extension, so that people don't confuse them with the .img files they write to a whole SD card with dd?


Berryboot will refuse to copy files from USB stick that do not have a SquashFS file header.
So it is not possible to add a wrong image to the boot menu.

If I wanted to 'experiment' with berryboot, is the source available? ;)


Maybe later, haven't decided yet what to do with that.
Currently is undocumented and does not have a straight forward build script (need to build a cross compiler, a minimal buildroot based OS, a patched kernel with aufs, and Qt Embedded first before you can build Berryboot itself).
by AndrewS » Sun Jul 29, 2012 7:24 pm
Max wrote:
AndrewS wrote:These .img files are squashfs images right? Would it be too late to suggest using a different file extension, so that people don't confuse them with the .img files they write to a whole SD card with dd?

Berryboot will refuse to copy files from USB stick that do not have a SquashFS file header.
So it is not possible to add a wrong image to the boot menu.

Clever! With all the signing, verification etc. you've clearly put a lot of thought into this :)
I guess there's nothing stopping dd writing a squashfs image to a raw SD card though ;)

If I wanted to 'experiment' with berryboot, is the source available? ;)

Maybe later, haven't decided yet what to do with that.
Currently is undocumented and does not have a straight forward build script (need to build a cross compiler, a minimal buildroot based OS, a patched kernel with aufs, and Qt Embedded first before you can build Berryboot itself).[/quote]
I guess each of those steps in isolation is also a useful subject ;) How come the installer uses Qt Embedded, but the boot-selector uses the much uglier-looking dialog command?
User avatar
Posts: 3494
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by Max » Sun Jul 29, 2012 8:10 pm
AndrewS wrote:How come the installer uses Qt Embedded, but the boot-selector uses the much uglier-looking dialog command?


Not using Qt for normal boots can result in slightly faster boot times.
Qt itself is pretty fast, but it is still 12 MB extra that needs to be loaded.

Also having a text boot selector leaves the option open to control the boot process through other means than a normal display and keyboard. E.g. one could probably use the UART pins on the extension connector as serial console with the right parameters in cmdline.txt.
by ejsolutions » Mon Jul 30, 2012 12:06 am
This latest release is super, compared to the non-QT one that I had previously tried and the clone OS is an exceptionally great feature.
[My normal manual additions to config.txt made screens easier to see.]
However, the popup dialog OS chooser doesn't work with SDTV - the bottom button(s) is not viewable, though fortunately pressing Enter is sufficient, if not intuitive. Any possibility of reducing the size of the icons/text, even though more scrolling may be required, to shrink the window?
I'll be interested to see how kernel modules and upgrades are going to be kept in synch.
I'm also interested to know how OpenElec can be upgraded but purely from a curiosity viewpoint, as I'll probably go with a raspbian/xmbc combination, as per usual.

Great work!
Posts: 96
Joined: Fri Jun 29, 2012 2:27 pm
Location: In the sticks of Haggisland
by AndrewS » Mon Jul 30, 2012 11:16 am
Another suggestion: Could you store the icon files external to the distro.smime file (as separate URLs)?
The distro.smime file is currently 213KB ( :!: ) but if I take out the 5 icon= lines, it drops down to just 3KB.
It will make your program's download logic only slightly more complex, but I expect the icon files won't be changing much (if at all) so could be cached locally (if you're worried about a stale cache I guess you could name the icons after their sha1sum?); whereas the distro.smime file will probably be downloaded/updated much more frequently.
User avatar
Posts: 3494
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by Max » Mon Jul 30, 2012 11:28 am
ejsolutions wrote:However, the popup dialog OS chooser doesn't work with SDTV - the bottom button(s) is not viewable, though fortunately pressing Enter is sufficient, if not intuitive. Any possibility of reducing the size of the icons/text, even though more scrolling may be required, to shrink the window?


Thanks for the feedback.
Hadn't thought of SDTV (am spoiled with HD), and will go look for an analog cable and give that a try.

I'll be interested to see how kernel modules and upgrades are going to be kept in synch.


Through the "add os" window I can offer berryboot/kernel modules updates as well.
They are shared with all operating systems (in the /shared folder).
Don't plan to release too many updates though.
Better to stick to a kernel version that is known working then the latest stuff.

I'm also interested to know how OpenElec can be upgraded but purely from a curiosity viewpoint, as I'll probably go with a raspbian/xmbc combination, as per usual.


Currently do not have an automatic way to update OpenELEC.
by Montala » Mon Jul 30, 2012 11:35 am
Presumably it is relatively easy to add additional 'distros', such as 'Puppy' for example, to the menu... or is this one already included?

Thanks! :)
Last edited by Montala on Mon Jul 30, 2012 11:36 am, edited 1 time in total.
User avatar
Posts: 638
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)
by Max » Mon Jul 30, 2012 11:36 am
AndrewS wrote:Another suggestion: Could you store the icon files external to the distro.smime file (as separate URLs)?
The distro.smime file is currently 213KB ( :!: ) but if I take out the 5 icon= lines, it drops down to just 3KB.
It will make your program's download logic only slightly more complex, but I expect the icon files won't be changing much (if at all) so could be cached locally (if you're worried about a stale cache I guess you could name the icons after their sha1sum?); whereas the distro.smime file will probably be downloaded/updated much more frequently.


.smime is the human readable version.
.zsmime is the compressed one Berryboot actually downloads, and is currently 98 KB.

Yes, icons could be outlined but it is not a priority right now.
Not that concerned about the 0.1 MB extra data traffic when someone is about to download a +/- 400 MB image. 8-)
by Aydan » Mon Jul 30, 2012 11:55 am
Does Berryboot only work with squashFS or can I use root file systems on different partitions also?
Posts: 229
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, Lake Constance
by Max » Mon Jul 30, 2012 12:16 pm
Aydan wrote:Does Berryboot only work with squashFS or can I use root file systems on different partitions also?


Only support SquashFS/aufs for now.


I did some experimenting with using BTRFS without SquashFS the other day, as that also allows you to easily put multiple distributions inside the same partition, and work with snapshots.
But there are still some issues with that.
(Half the time the Pi gets stuck during file system creation, while "top" shows the kernel spends 99% of the time with IO.
Think it might be caused by the discard/ata trim commands it sends to the storage, as I'm also seeing that with ext4 from time to time, unless you do "mkfs.ext4 -E nodiscard"
Problem is mkfs.btrfs does not seem to have any option to disable sending discards)
by Aydan » Mon Jul 30, 2012 1:24 pm
Well, I don't really want it to copy stuff, just tell the kernel that root is on partition xyz.
Just like you'd do with grub.
Posts: 229
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, Lake Constance
by Max » Mon Jul 30, 2012 3:28 pm
Montala wrote:Presumably it is relatively easy to add additional 'distros', such as 'Puppy' for example, to the menu... or is this one already included?


Added Pup to the distro list.

Works fine, although it takes a while to initialize the first time you start it.
(does work fast after that)