Dual-booting the Raspberry Pi with custom OS


5 posts
by tasoulis12 » Tue Oct 22, 2013 12:07 pm
Hello board,
I am new here, but I thought I'd post this in the Advanced section, because I've made two threads about this on 4chan's /g/ - technology board - and still we haven't found any solution for it .

Anyhow..
I have a Raspberry Pi, which I want to use as both a multimedia station and a Retro console mutli-emulator which accepts controllers. In other words, I want to dual boot both Debian (Raspbian) and EmulationStation from the same SD card (16 Gigabytes - Class 4 {Does the class of the SD card give any real benefits when used with the Raspberry Pi?}).

I found a way to do this, with a software that's called BerryBoot. You boot from it and it, normally, downloads the OS's you select from the internet, partitions the SD card and installs them - but in my case, EmulationStation is a custom OS and not included, so I have to import it's image from a USB stick, along with the image of Debian.

Problem is, BerryBoot wants the images in SquashFS format, and the only way to do this is with a Linux OS. So, I installed Mint Linux in Virtual Box on my PC to do that. I have to say I am not very used to Linux (Although I'm learning) and I struggled a bit to install SquashFS, but finally did it.

Now, SquashFS needs a compressor called LZO to compress the images, and whatever I do wont get LZO to work with SquashFS.

>I know there is the option to use Gzip for compression, but this will make the OS's slower, which will have an impact at the already slow Raspberry Pi.

>I also know that it is stated that LZO is not supported in older versions of SquashFS, but I have the newest version: 4.2
(doublechecked with: mksquashfs -version)

>I have read the makefile about Building LZO support Support - I have downloaded the LZO library from the link given there, I uncommented the LZO_SUPPORT line and I also set LZO_DIR for the default LZO_DIR= /usr/local to the folder of LZO which is: /home/riel/Desktop/lzo-2.06
I also tried to run it with the LZO_DIR line commented. Still, it is telling me that LZO in not supported.

>Inbetween doing "make" and "make install" (either the Squashfs-tools or LZO) I always do "make check" and all checks are passed.

Update: I tried rebuilding once again LZO with "sudo make install" while monitoring the /usr/local/bin folder - and no new files appeared there... Maybe that has something to do with it. I'd like to uninstall everything squashfs and LZO from the virtual machine and re-attempt to do it fresh, but "make uninstall" "make remove" "make clean" wont work - it tells me the makefile doesn't have instructions to uninstall or remove the target.

I will also dumping some images with stuff that I tried. I am really stuck and don't know why this is happening, so any help would be appreciated.

Image
Image
Image
Image
Image
Image

Thanks in advance! ^_^
Last edited by tasoulis12 on Wed Oct 23, 2013 3:17 pm, edited 1 time in total.
Posts: 2
Joined: Tue Oct 22, 2013 11:42 am
by sistemmsn » Fri Aug 14, 2015 2:15 am
hello sorry I have problems with the procedure no way that I can support
Posts: 2
Joined: Fri Jul 03, 2015 12:29 am
by asavah » Fri Aug 14, 2015 2:43 pm
What's the version and flavor of Mint you got installed ?
It's strange they don't have squashfs-tools with lzo support ...

Your problem is linux-mint related, not pi specific, I suggest you post in their forums or install ubuntu 14.04 in another VM.
Code: Select all
lsb_release -a
No LSB modules are available.
Distributor ID:   Ubuntu
Description:   Ubuntu 14.04.3 LTS
Release:   14.04
Codename:   trusty


Code: Select all
apt-cache policy squashfs-tools
squashfs-tools:
  Installed: 1:4.2+20130409-2
  Candidate: 1:4.2+20130409-2


Code: Select all
Compressors available and compressor specific options:
   gzip (no options) (default)
   lzo (no options)
   xz


Code: Select all
ldd /usr/bin/mksquashfs
   linux-vdso.so.1 =>  (0x00007ffe5cffc000)
   libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4776721000)
   libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f477641b000)
   libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f4776202000)
   liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f4775fe0000)
   liblzo2.so.2 => /lib/x86_64-linux-gnu/liblzo2.so.2 (0x00007f4775dbf000)
   libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f47759fa000)
   /lib64/ld-linux-x86-64.so.2 (0x00007f477693f000)
   libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f47757f6000)
Posts: 103
Joined: Thu Aug 14, 2014 12:49 am
by SimonSmall » Sat Aug 15, 2015 11:07 am
An alternative option would be to try the NOOBS software; this allows you to have multiple OSs on a SD card. A custom OS can be installed using just a 'tarball' (zip file). The instructions are not too detailed but look like they should be easy to follow if you are reasonably experienced (I have not tried this yet, but plan to do so in a while). Despite NOOBS being aimed at beginners it does contain a few "clever nuggets" of functionality.

Check the bottom of page "https://github.com/raspberrypi/noobs"
Posts: 218
Joined: Tue Oct 09, 2012 8:13 pm
by beta-tester » Sun Aug 16, 2015 2:25 pm
SimonSmall wrote:An alternative option would be to try the NOOBS software; this allows you to have multiple OSs on a SD card. A custom OS can be installed using just a 'tarball' (zip file). The instructions are not too detailed but look like they should be easy to follow if you are reasonably experienced (I have not tried this yet, but plan to do so in a while). Despite NOOBS being aimed at beginners it does contain a few "clever nuggets" of functionality.

Check the bottom of page "https://github.com/raspberrypi/noobs"
yeah, i have done custom OS'es for my NOODS already.
in general it is like:
1. install you favorite OS to a SD card as usual as single OS.
2. boot into and set it up.
3. put the SD card to a Linux PC
4. make tar.xz archives of the boot and root parittion
Code: Select all
tar -cvpaf <label>.tar.xz /* --exclude=proc/* --exclude=sys/* --exclude=dev/pts/*
5. put those tar.xz archives to the "os" folder with the scripts that will adjust the boot/root partiton names to boot up correctly in multiboot NOOBS environment.
6. done...
(you can step over some steps, by doing the work of NOOBS by hand (partitionize, adjust partiton names, put partitons informations to NOOBS, create boot NOOBS entries), to do not waste SD space, but that is a bit more tricky - you have to know, how NOOBS works and how the SD card will be partitionized)
[I only give negative feedback]
RPi Model B (rev1, 256MB) & B (rev2, 512MB) & B+, RPi2B (1GB), 64GB microSDXC1 class 10, HDMI 1920x1080, keyboard-mouse-combo (wireless), PiCamera, ethernet-cable, 5V/1.2A power supply, Wifi dongle (rt5370)
Posts: 490
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE