When you’re using the included BerryBoot images,as I described in my last post such as Raspbian and Puppy Linux, installation is a easy job.In order to import a Linux distribution into the BerryBoot, you need to optimize that distribution for SquashFS. first get an image of that distribution.in three ways you can get it done:
- First,the easiest way to do is to get optimized images from the BerryBoot that has not been officially added to the installer yet you can open here.SquashFS optimization is not necessary here.
- Second, in Raspberry Pi optimized images that are available for general download but are not optimized for BerryBoot yet, you can simply get the image.
- third, in the case of distributions such as Raspbmc that requires an use of installer tool to download everything directly to the RPi and go from there, you need to create an image of the SD card that you installed it into
- In addition to the .IMG file you will need the access to a Linux machine( like maybe Linux powered desktop, Linux Live CDon a computer, or even the copy of Rasbian on your RPi), to use the SquashFS tool. There simply hasn’t been a consistent port yet, so we’re going to keep things on and simple by using SquashFS on it’s indigenous platform.
- If the distribution doesn’t have SquashFS installed already (like Raspbian doesn’t be with it before), therefore you must enter the following command at the terminal to get a copy of it
sudo apt-get install squashfs-tools
- To convert the the .IMG, plug in an SD card or USB device in which the file exists, into your Linux machine. I am going to consign to the image file as NewBerryBoot.img in the commands. Open the terminal and run the following command on the .IMG:
sudo kpartx -av NewBerryBoot.img
add map loop0p1 (252:5): 0 117187 linear /dev/loop0 1
add map loop0p2 (252:6): 0 3493888 linear /dev/loop0 118786(or 4)
- The 2nd larger partition, loop0p2, is the one we are in. In your image, the loop will maybe different (i.e. loop3p2), so copy the name for the next commands. Then Enter the following commands:
sudo mount /dev/mapper/loop0p2 /mnt
sudo sed -i ‘s/^\/dev\/mmcblk/#\0/g’ /mnt/etc/fstab
sudo mksquashfs /mnt converted_image_for_berryboot.img -comp lzo -e lib/modules
sudo umount /mnt
sudo kpartx -d NewBerryBoot.img
- These commands makes the partition, and edits the file systems table in the original partition,then optimizes the image with SquashFS (except the lib/modules which are shared in the distributions on BerryBoot), and then unmounts and deletes the partition mappings.
- Plug in the external media that holds the .IMG file into your Raspberry Pi unit or attached USB hub. Boot into your Raspberry Pi with the original BerryBoot SD card. At the boot selection menu, press Edit menu to open the BerryBoot menu editor.
- To add your .IMG file, click and hold the Add OS button as shown below
- Select ‘Copy OS’ from USB stick, and you’ll see a file selection dialog box
- After selecting your .IMG file and Opening it, wait for a moment as the .IMG is unpacked and installed. After that, you’ll see the BerryBoot menu editor with a new additional
Poof done!!, here are the ways you can download or create an .IMG file to load into BerryBoot
- Download from the official(not included) BerryBoot repository list,
- modify an existing .IMG with SquashFS, or your own .IMG from a SD card install and then modify it with SquashFS.
It is possible, for example, to create a .IMG of a Raspbmc installation but according to the project’s mind Sam Nazarko, converting it to SquashFS stops the upgrade system.
Feel free to explain your problems and experiments below in comments
Thanks!
ReplyDelete