Vstar950
Posts: 7
Joined: Tue Aug 15, 2017 6:46 am

Need help trying to dual boot 2 custom images

Tue Aug 15, 2017 6:54 am

Hey all. I am trying to dual boot 2 custom images that i have created. 1 which is raspbian and the other is retropie. I have customised the images that i have to where i like. The first image (raspbian is 8gb). The second image (retropie is 16gb). I would like to get both images to have a little extra space to either customise down the road or to use the extra space for saving files that i make like doc files or pics and movies for (raspbian) and do the same for my (retropie) partition. I would like to dual boot these from a 32gb or 64gb. Please help me educated and knowledgeable people that know how to do this. Thank you.

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Tue Aug 15, 2017 1:18 pm

Follow the instructions here to create a backup of each of your custom images (as tar.xz files).
https://github.com/procount/pinn/blob/m ... os-version

Put them on a USB stick in /os/raspbian and /os retropie respectively, along with the other necessary meta files that you will find
on either http://downloads.raspberrypi.org/raspbian/ or https://sourceforge.net/projects/pinn/f ... Retropie2/
See also here for more info: https://github.com/raspberrypi/noobs/wi ... n-examples

Install NOOBS or PINN to your FAT32 formatted 32GB sd card, and boot it with your USB stick plugged in.
You can then install your custom OS images onto the SD card and use NOOBS/PINN to select between them.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Need help trying to dual boot 2 custom images

Tue Aug 15, 2017 1:31 pm

Why not use 2 sd cards and swap them?
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

Vstar950
Posts: 7
Joined: Tue Aug 15, 2017 6:46 am

Re: Need help trying to dual boot 2 custom images

Tue Aug 15, 2017 6:55 pm

Once i do this can i backup my dual boot image. So in the end it will be 1 image to equal a raspbian/retropie.img file. Instead of 2 different img files that need to be installed each time i make a 32gb sd card? I have some friends that like my setup and basically want me to clone my card so they can have the same thing.

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Tue Aug 15, 2017 7:20 pm

Yes of course.
But it will be a 32gb image file of your whole card.
You might find the 1-2gb tar files easier to manage and quicker to install/copy with PINN. But it's up to you. Try both methods and see which works best for you.

Check out Matt Huisman's blogs about how to switch/reboot from one OS to another directly and also his method of easily specifying the size of each partition of each OS when installing with noobs/pinn.
Http://matthuisman.nz
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

Vstar950
Posts: 7
Joined: Tue Aug 15, 2017 6:46 am

Re: Need help trying to dual boot 2 custom images

Tue Aug 15, 2017 8:00 pm

I completely forgot to add that my retropie image that i backed up is 14.8gb. I hope thats ok. My raspbian is 7.4gb. I am new to this. So lets keep this stupid simple for my mental health. Because of the image sizes. They will not copy to a fat 32 sd. It must be ntfs in order to copy that large of a img. Then pinn won read the card or usb because of the format.

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Tue Aug 15, 2017 8:41 pm

Those are larger than most installations.
Normally PINN uses FAT32 for USB sticks, but I'm sure it could use ext2/3/4 instead to avoid the 4GB filesize limit. I don't think it will do NTFS.
I suggest formatting a USB stick as ext2/3 or 4 and tar/xz the files on your partitions to that.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

millercb
Posts: 10
Joined: Sun Aug 13, 2017 3:40 pm

Re: Need help trying to dual boot 2 custom images

Tue Aug 15, 2017 8:55 pm

I don't know much about the file format used, as I have never used PINN or NOOBS, but just a piece of advice. Before you create your images, you can use GPARTED to shrink your image down, getting rid of all of the unused space. This makes the images a much more reasonable size. If you expanded the filesystem, it will have a lot of unused space. Also, in order to not copy the unused space when you make the image, you have to specify the size of the image. Using dd, you can specify a count, for example: "dd bs=4M if=/dev/sdaX of=backup.img count=XXXX" where XXXX is the number of blocks. If you want to back up 4GB, you can do bs=4M and count=1000, or bs=1M and count=4000, etc.

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Tue Aug 15, 2017 9:09 pm

PINN/NOOBS can use img files for each partition, but the downside is having to expand the file system after they have been restored.
Using tar.xz files means it only stores the file space used, and the file system does not need expanding so it might be easier.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Wed Aug 16, 2017 8:25 am

@Vstar950 - My apologies - after testing it appears PINN does not automount ext4 usb sticks. I will look into why not.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Wed Aug 16, 2017 8:51 am

@Vstar950 - I made a special version of PINN for you that will support ext4 on the USB stick to avoid the 4GB file size issue.
You can download it from https://sourceforge.net/projects/pinn/f ... p/download
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

Vstar950
Posts: 7
Joined: Tue Aug 15, 2017 6:46 am

Re: Need help trying to dual boot 2 custom images

Wed Aug 16, 2017 5:28 pm

Thank you. Do i just copy and paste my images in the os folder and then put in pi and install them?

Vstar950
Posts: 7
Joined: Tue Aug 15, 2017 6:46 am

Re: Need help trying to dual boot 2 custom images

Thu Aug 17, 2017 7:31 pm

Tge version of pinn you gave me is not readable by windows. I used linux reader. But there is no folder named os to put the img files in. How exactly am i supposed to install tgese images of mine?

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Thu Aug 17, 2017 8:06 pm

I just downloaded pinn-242i.zip and opened it just fine in Windows 7-zip. Maybe you need to re-download it?
It should have 3 folders in it: defaults, os and overlays and 18 other files in the root folder.
You should format your SD card to FAT32 and unzip the pinn files to it.
When you do this correctly, you will have an empty /os folder on your SD card.

Have you followed the instructions I pointed you at previously to create the tar.xz files from your custom Rapsbian & retropie OSes?
If so, you probably have these on an external USB memory device. Preferably an ext4 formatted device since (as discussed above) your images are probably larger than 4GB and won't fit on a FAT32 drive, and PINN won't use an NTFS formatted drive.
You should put these tar.xz files in /os/raspbian and /os/retropie on your USB stick. (You could put then in the /os folder of your SD card, but 1) they won't fit if they are larger than 4GB and 2) they will waste a lot of your precious SD card space.)
You then need to add the additional meta files (os.json, partitions.json etc) from each respective web folder previously indicated.

Then you can boot PINN on the SD card. When you plug in the USB stick, your 2 custom OSes should be listed which you should select and install.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

Vstar950
Posts: 7
Joined: Tue Aug 15, 2017 6:46 am

Re: Need help trying to dual boot 2 custom images

Thu Aug 17, 2017 9:18 pm

That does not tell me how to convert to a tar.xz it just tells me to convert it to tar.xz. I can't convert it if I don't know how. The bigger problem is the computer will not read the flash drive converted to ext4. I am using a program called disc internals Linux reader and I cannot open up the 32GB flash drive it errors out. At this point in time I don't know what to do. I appreciate your help on this. I have Googled around to turn a. IMG file into a tar.xz and found no results. I get either tar or xz not tar.xz.

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Thu Aug 17, 2017 11:24 pm

OK. I think you are going to need some hand-holding through this, because most of this will need to be done using Linux tools rather than on your Windows PC. Fortunately you already have a Raspberry Pi that does Linux. It will be a bit slower than running a Linux distro on your PC, but perfectly suitable. So I am willing to take you through the process if you have the patience, but it might be better taken off-line rather than filling the forum with pages of instructions to and fro. So if you want to PM me with your email address, I'll try and write you some more comprehensive step by step instructions.

But firstly, in answer to some of your queries - .img files and .tar files are totally different. You can't convert one to another just by changing the extension. I just googled and found these 2 links to some explanations of what they are and how you use them. Might be some good background reading: https://www.lifewire.com/tar-file-2622386 and http://dev.iachieved.it/iachievedit/exp ... -on-linux/ But don't worry if you don't understand it all, just an appreciation of the basic difference would be useful.

It would also be very useful for you to have a USB uSD card reader that would enable you to load your uSD card in one of the RPI's USB ports. I believe you can get cheap ones from Poundland or similar shops, if you don't already have one, but make sure they are suitable for your SD cards. Some readers will not work with the larger SDHC or SDXC SD cards. Your SD cards are most likely going to be SDHC cards.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Tue Sep 26, 2017 11:27 am

I have completed some step-by-step instructions on how to achieve this now on my wiki:

https://github.com/procount/pinn/wiki/H ... using-PINN

Currently it requires using a usb card reader and another Linux PC. If you have a PC but no Linux on it, you could use one of the many live linux distros that you can boot from temporarily or use virtual box or vmplayer to install linux alongside windows.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

JustLipe
Posts: 3
Joined: Thu May 17, 2018 3:07 am

Re: Need help trying to dual boot 2 custom images

Thu May 17, 2018 4:27 am

Hey guys, hello! So, sorry for reopen this tread. But i have almost the exactly problem of our friend VSTAR.

I have 2 OSes, my raspian and a custom recalbox, with specific sizes. And here is my first problem.

I dont have right files (.json .sh) for recalbox. I dont even remember where i got the ones that im using now. Already tried some things and still having some issues about "mount tables" and partitions. I got theses errors when installing from sdcard with PINN.

There is my second one. I cant use none of my pen drives (64gb and 8gb). PINN seems to not read the OSes on they. But the drive is listed on the PINN`s first page.

So, PINN only works with "pen card readers"?
And where i can find the rights partitions.json and partition_setup.sh ?
Whats the right way to configure my partitions?

Already got the file on MATT HUISMAN site. But im not sure if its working cause i cant install the OSes.

Thank you for the attention guys.

Oh, and thanks for the tuto PROCOUNT, i have been learning a lot with it and your repositories. Hope that soon i can use it all in the right way hehehe

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Thu May 17, 2018 10:10 am

So let's work backwards through your email....
JustLipe wrote:
Thu May 17, 2018 4:27 am
There is my second one. I cant use none of my pen drives (64gb and 8gb). PINN seems to not read the OSes on they. But the drive is listed on the PINN`s first page.
So, PINN only works with "pen card readers"?
No, it should work with most "pendrives" or SD card readers.
Any OS stored on a pendrive must be in a folder of the correct OS name , under the /os folder. So for example:

Code: Select all

/os/Raspbian
/os/recalbox 
etc.
If not, the oses will not be found. As the pendrive is showing up on PINN's first page, it shows it can read your pendrive.
JustLipe wrote:
Thu May 17, 2018 4:27 am
And where i can find the rights partitions.json and partition_setup.sh ?
Whats the right way to configure my partitions?
Already got the file on MATT HUISMAN site. But im not sure if its working cause i cant install the OSes.
I suggest you start with a blank pendrive.
Create a folder on it called 'os'.
Insert the pendrive into your PI and boot PINN when connected to the internet.
You should see the drive listed as a possible installation target as /dev/sda1.
Select the Raspbian and Recalbox OSes.
Move to the archive menu.
Make sure the pendrive is selected as your target and click the "download" button.
When they are downloaded, accept to reboot.
The Raspbian and Recalbox OSes should now show as a different icon to indicate they will be installed from your pendrive rather than downloaded from the internet. (You could reboot PINN without an internet connection to test they are the only OSes installable)
(If you want to test the files downloaded OK, you can try installing both of the OSes from your pendrive, but it's not essential, just confidence building)
JustLipe wrote:
Thu May 17, 2018 4:27 am
I dont have right files (.json .sh) for recalbox. I dont even remember where i got the ones that im using now. Already tried some things and still having some issues about "mount tables" and partitions.
Now you should have the correct partitions.json and partition_setup.sh for each OS.
You can delete (or move to some other storage on your PC, for example) the boot.tar.xz and root.tar.xz (maybe have slightly different names) files from the /os/Raspbian and /os/Recalbox folders.
It's also a good idea to backup all the downloaded files to your PC, as you will be modifying some of them later for your custom OS.
JustLipe wrote:
Thu May 17, 2018 4:27 am
I got theses errors when installing from sdcard with PINN.
What errors?
JustLipe wrote:
Thu May 17, 2018 4:27 am
thanks for the tuto PROCOUNT,
You're welcome. Now is the time to follow it to create the boot.tar.xz and root.tar.xz for each of your own custom OSes.
Also note the instructions on how to calculate the various sizes of the install files. Use this information to modify the os.json & partitions.json files etc. on your pendrive.
Copy your new tar.xz files into the appropriate folders of your pendrive to replace the downloaded ones.

Now you should be able to boot PINN with your pendrive inserted and install your custom OSes from the pendrive.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

JustLipe
Posts: 3
Joined: Thu May 17, 2018 3:07 am

Re: Need help trying to dual boot 2 custom images

Sat May 19, 2018 5:02 pm

Thanks man! Almost everything working! I didnt noticed the download "tool" :? . Now i can install the OSes from my pendrive! (dont know what was wrong, but now it reads all my sticks)

The new problem is a error on install "Error downloading or extracting tarball."

and then goes:
exp, not the real paths*

./lib/firmware/iwifi.........: write failed
./lib/firmware/iwifi.........: cant create ./lib/firmware/iwifi.........:
./lib/firmware/iwifi.........: failed to create dir ./lib/firmware/iwifi.........:

and on to all files for my ROOT tarball.

Could it be a syntase mistake when creating it?

User avatar
procount
Posts: 2209
Joined: Thu Jun 27, 2013 12:32 pm
Location: UK

Re: Need help trying to dual boot 2 custom images

Sat May 19, 2018 9:24 pm

Possibly, dunno, not enough info to tell.
Check the version of bsdtar you use to create it is v3.3.1 or later.
Once you've created your tarballs, try extracting them yourself manually.
PINN - NOOBS with the extras... https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=142574

JustLipe
Posts: 3
Joined: Thu May 17, 2018 3:07 am

Re: Need help trying to dual boot 2 custom images

Sat May 19, 2018 9:57 pm

Im a bad lucky guy... I tried one more time and got a "successful install", but after reboot got this:

PS:
Thanks for your attention. And if my case is a lost one, just let me know. I dont wanna spend your time.

Image

Return to “General discussion”