GoodOldJack12
Posts: 16
Joined: Tue Nov 29, 2016 9:39 pm

Multiplatform boot

Tue Nov 29, 2016 9:48 pm

Hello everyone,

I'm new to linux, I'm starting my first year of programming classes where we use Ubuntu to practice Linux. Since I have a Raspi lying around I was wondering if there was a way to make an sd card that can be used both on the Pi and on a laptop with an Intel processor.
Before entering commands I dont understand and misusing guides, I wanted to ask here if there is any solution for it.

I also really dont care if I need to format my sd card, though i'd prefer to use Ubuntu 16.04, since that is what we're supposed to use in class. If I cant run that distro however, I'm still interested.

EDIT: I'm using a RPI3

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Multiplatform boot

Tue Nov 29, 2016 10:33 pm

Pi uses ARM chip and Intel uses Intel chip. They are different. Software has to be compiled for the right chip.

There is an Ubuntu with MATE for Pi. It is slow. Use a Pi 3. https://www.raspberrypi.org/downloads/

The latest Raspbian, Ubuntu, and Linux Mint are based on Debian Jessie. Most software is available across all four operating systems and works the same. Raspbian uses the LXDE user interface which looks similar to MATE and Cinnamon.

The boot process for the Pi is a little bit different. After the user interface starts, almost everything is the same across all four operating systems. I often use Ubuntu documentation to do things in Raspbian and Linux Mint.

GoodOldJack12
Posts: 16
Joined: Tue Nov 29, 2016 9:39 pm

Re: Multiplatform boot

Wed Nov 30, 2016 7:48 am

peterlite wrote:Pi uses ARM chip and Intel uses Intel chip. They are different. Software has to be compiled for the right chip.

There is an Ubuntu with MATE for Pi. It is slow. Use a Pi 3. https://www.raspberrypi.org/downloads/

The latest Raspbian, Ubuntu, and Linux Mint are based on Debian Jessie. Most software is available across all four operating systems and works the same. Raspbian uses the LXDE user interface which looks similar to MATE and Cinnamon.

The boot process for the Pi is a little bit different. After the user interface starts, almost everything is the same across all four operating systems. I often use Ubuntu documentation to do things in Raspbian and Linux Mint.
so basically it cant be done?

User avatar
HawaiianPi
Posts: 5969
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Multiplatform boot

Wed Nov 30, 2016 8:58 am

GoodOldJack12 wrote:...so basically it cant be done?
I wouldn't say it's impossible. In theory I think it's possible, but I'm not familiar enough with the Raspberry Pi boot process to say that with 100% certainty.

On the other hand, if you are going to be using an Intel based laptop in class, I'd suggest you just install Ubuntu alongside of Windows and reboot whenever you want to switch OS (dual boot). Running a PC from a flash card will be very slow, and then there's the problem of persistence.

It's just simpler and better to have Ubuntu on the laptop's system drive. My laptop can triple boot between Windows 10, Linux Mint and Parted Magic. And don't panic, most Linux distributions (including Ubuntu) can set up dual-boot automatically when you install them.

So keep your SD card in your Pi and install Ubuntu on your laptop.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

GoodOldJack12
Posts: 16
Joined: Tue Nov 29, 2016 9:39 pm

Re: Multiplatform boot

Wed Nov 30, 2016 9:17 am

We're probably going to destroy linux for lolz at some point, hence me running it from an sd card.

thanks for replying!

User avatar
HawaiianPi
Posts: 5969
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Multiplatform boot

Wed Nov 30, 2016 9:31 am

GoodOldJack12 wrote:We're probably going to destroy linux for lolz at some point, hence me running it from an sd card.

thanks for replying!
Then just run Ubuntu from a USB flash drive. It will still be a lot slower than installing it, but it's simple to do. If you want or need persistence it's a little more complicated, but still not terribly hard to do. You could also use an SD card, if the built-in SD card slot on your computer is bootable (not all are), but flash drives are usually cheaper.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

jbudd
Posts: 1466
Joined: Mon Dec 16, 2013 10:23 am

Re: Multiplatform boot

Wed Nov 30, 2016 10:15 am

Unless destroying Linux for lolz involves a hammer, you can still have both Windows and Ubuntu installed on your laptop. Once Linux is dead, a partition manager lets you reclaim the disk space for Windows.

GoodOldJack12
Posts: 16
Joined: Tue Nov 29, 2016 9:39 pm

Re: Multiplatform boot

Wed Nov 30, 2016 10:23 am

Well I probabbly will run it from usb, I was just to cheap to go out and buy a usb stick. and now too lazy to make a bootable one. I actually managed to get it on sd card by live booting from a DVD. Bad.Idea. very very slow

mfa298
Posts: 1386
Joined: Tue Apr 22, 2014 11:18 am

Re: Multiplatform boot

Wed Nov 30, 2016 11:38 am

Whilst it might be technically possible to have both architectures boot from the same device I'm not sure there's much value in it. As they're different architectures they'll need to boot from different partitions on the same device so you'll need something with a decent amount of storage.

It would be a lot easier to have an SD card dedicated to the Pi, an SD or USB drive for booting the laptop and possibly a 3rd device (USB Stick) to store your data on (or use a cloud service if you want to sync data). For source code git (with a remote server) is a good way to manage your code.

Depending on the languages you're using you may need to compile the same code for each architecture (for C/C++ code make files can help with this). Some languages maybe more platform independent (the likes of Python/Ruby/Shell scripts/ Java).

User avatar
HawaiianPi
Posts: 5969
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Multiplatform boot

Wed Nov 30, 2016 5:58 pm

GoodOldJack12 wrote:Well I probabbly will run it from usb, I was just to cheap to go out and buy a usb stick. and now too lazy to make a bootable one. I actually managed to get it on sd card by live booting from a DVD. Bad.Idea. very very slow
It won't really be any faster from as USB flash drive. It may be very slightly faster, or it could be slower as well, depending on how fast the USB stick is compared to the SD card, but it's still going to be slow regardless (which is what I've been telling you).

There are ways to speed things up a bit, like booting the OS into RAM and running it entirely from there, but no changes you make will be saved when you reboot. There are ways to enable persistence, but that means saving changes back to the card or USB stick, and that slows things down again.

I don't know how you "managed to get it on sd card by live booting from a DVD" but if you installed it like the SD card was a system drive, that's not the best way to do it. Google "USB Ubuntu with persistence" for info on how to properly set up booting from SD or USB flash media. It's still going to be slow, but maybe not as bad as what you've already done.

Installing it to your laptop's system drive is really the best way to do it, but since you are unwilling to do that, you'll just have to live with the slow performance.

There are some USB sticks or SD cards that could offer better performance, but they are typically more expensive (the key is better random I/O performance, which most USB flash drives and SD cards suck at). The best bang for the buck, as far as I know, are the Samsung EVO+ (EVO plus) SD cards. If you're lucky you can find the 32GB on sale for under $10, but they usually cost around $15. The best USB flash drive is the SanDisk Extreme PRO, but it's only available in 128GB and costs around $70.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Multiplatform boot

Wed Nov 30, 2016 8:49 pm

When you use a physical Pi, you can configure it with remote desktop and open that on your regular computer. You can then work on the Pi using the same screen and keyboard. Your Pi becomes a window you can open at any time. The connection can be an Ethernet cable for a Pi 2 or 3. A Zero can connect through USB.

GoodOldJack12
Posts: 16
Joined: Tue Nov 29, 2016 9:39 pm

Re: Multiplatform boot

Fri Dec 02, 2016 2:12 pm

HawaiianPi wrote: It won't really be any faster from as USB flash drive. It may be very slightly faster, or it could be slower as well, depending on how fast the USB stick is compared to the SD card, but it's still going to be slow regardless (which is what I've been telling you).

There are ways to speed things up a bit, like booting the OS into RAM and running it entirely from there, but no changes you make will be saved when you reboot. There are ways to enable persistence, but that means saving changes back to the card or USB stick, and that slows things down again.

I don't know how you "managed to get it on sd card by live booting from a DVD" but if you installed it like the SD card was a system drive, that's not the best way to do it. Google "USB Ubuntu with persistence" for info on how to properly set up booting from SD or USB flash media. It's still going to be slow, but maybe not as bad as what you've already done.

Installing it to your laptop's system drive is really the best way to do it, but since you are unwilling to do that, you'll just have to live with the slow performance.

There are some USB sticks or SD cards that could offer better performance, but they are typically more expensive (the key is better random I/O performance, which most USB flash drives and SD cards suck at). The best bang for the buck, as far as I know, are the Samsung EVO+ (EVO plus) SD cards. If you're lucky you can find the 32GB on sale for under $10, but they usually cost around $15. The best USB flash drive is the SanDisk Extreme PRO, but it's only available in 128GB and costs around $70.
I did install it as if on a system drive. at the moment it isnt running any slower then my Windows, so I'm satisfied with that. tho it can be a bit funky. and the problem with making a usb persistant is that it gives problems with updates etc. I'll probablly need a new SD card though since this one is super small.

GoodOldJack12
Posts: 16
Joined: Tue Nov 29, 2016 9:39 pm

Re: Multiplatform boot

Fri Dec 02, 2016 2:15 pm

peterlite wrote:When you use a physical Pi, you can configure it with remote desktop and open that on your regular computer. You can then work on the Pi using the same screen and keyboard. Your Pi becomes a window you can open at any time. The connection can be an Ethernet cable for a Pi 2 or 3. A Zero can connect through USB.
I never found a way to load the graphical interface, which would probably end up being slow anyways. and just command line is a bit too basic for me. in addition, I cant keep it running all the time. but all this was just intended as an experiment anyways.

Return to “Beginners”