EEVblog Electronics Community Forum

Products => Computers => Programming => Topic started by: ricko_uk on October 30, 2021, 04:05:34 pm

Title: Simplest way to make a USB bootable Linux
Post by: ricko_uk on October 30, 2021, 04:05:34 pm
Hi,
A couple of people mentioned that MPLAB runs better and faster on Linux. And others say that's not the case. Any feedback from anybody who tried both?

I have never used Linux myself but would like to try that test myself with the view to eventually install Linux on the main machine if I find it easy to use and faster. What is the simplest/fastest way to install Linux on USB stick so it is bootable?

Finally, can I then also run MPLAB from the USB stick if I decide to not install Linux on the main machine?

Thank you :)
Title: Re: Simplest way to make a USB bootable Linux
Post by: tunk on October 30, 2021, 04:09:24 pm
Would a virtual machine be an alternative? An advantage is that you can run both in parallel.
Title: Re: Simplest way to make a USB bootable Linux
Post by: langwadt on October 30, 2021, 04:09:34 pm
https://ubuntu.com/tutorials/create-a-usb-stick-on-windows#1-overview
Title: Re: Simplest way to make a USB bootable Linux
Post by: ricko_uk on October 30, 2021, 04:17:27 pm
Thank you both! :)

@tunk, I don't want to install anything on the current PC because since a year or so ago all sorts of weird things kept happening (truly endless list and increasing almost every couple of weeks) but don't want to reinstall Windows because I have a piece of software that is not available/supported anymore (the company closed long ago) and I don't have the serial number anymore. So I rather keep it going as is for as long as it will.

Thank you
Title: Re: Simplest way to make a USB bootable Linux
Post by: themadhippy on October 30, 2021, 04:46:40 pm
Quote
Finally, can I then also run MPLAB from the USB stick if I decide to not install Linux on the main machine?
depends how big it is,the magic phrase is persistent, random example via google  https://www.usbmemorydirect.com/blog/creating-your-own-linux-live-usb-with-persistent-memory/ (https://www.usbmemorydirect.com/blog/creating-your-own-linux-live-usb-with-persistent-memory/)
Title: Re: Simplest way to make a USB bootable Linux
Post by: mfro on October 30, 2021, 05:55:56 pm
an USB stick install likely will not show you the true potential of Linux. Unless it's a *really* fast one.

Probably even more true for something mainly disk I/O bound like a compiler toolchain.
Title: Re: Simplest way to make a USB bootable Linux
Post by: HB9EVI on October 30, 2021, 06:36:38 pm
a USB Linux install is quite usable with modern USB3 sticks

there are about 3 major ways to achieve that:

1. dd an iso image with a live system on the usb stick; easy and more or less pain free
2. try over the normal install routine to install on the usb stick, personally never tried, but I don't see a reason why it should not work
3. use tools like debootstrap which gives most freedom but probably the trickiest way of the three

one has to ask oneself: what do I want the stick for: random usage from time to time; a universal all-time available system; an emergency boot system, others...
Title: Re: Simplest way to make a USB bootable Linux
Post by: Doctorandus_P on October 31, 2021, 10:39:31 am
These day's you can get a small SSD for about EUR30.
So you can easily swap your current SSD for an empty one, then boot from an USB stick with Linux and then install Linux on it, which will give yo an advantage of a "normal" linux install and experience.

Most PC's have some option to to select a boot media right after power up and this gives you an option to select either the Linux or Windoze (after you also put that back) when booting.

Then, later on, some extra "left over" storage media can be put to good use for making backups.
Title: Re: Simplest way to make a USB bootable Linux
Post by: PartialDischarge on October 31, 2021, 11:06:05 am
There was a linux distribution, only text mode, packed with many different tools, aimed at installing and booting from Usb. Anyone remembers the name?

I remembered, it was actually knoppix, but it has graphic mode too
Title: Re: Simplest way to make a USB bootable Linux
Post by: mikerj on October 31, 2021, 01:22:27 pm
The "Core" version of Tiny Core Linux (http://www.tinycorelinux.net/downloads.html) is command line only.  Also the Ubuntu MinimalCD (https://help.ubuntu.com/community/Installation/MinimalCD) but not sure it's supported any more.
Title: Re: Simplest way to make a USB bootable Linux
Post by: ricko_uk on October 31, 2021, 04:52:34 pm
Thank you all!! :)
Title: Re: Simplest way to make a USB bootable Linux
Post by: Simon on October 31, 2021, 06:10:50 pm
how could MPLABX be 'faster" on linux? in what way?, it's a fancy text editor, it takes seconds to compile a MCU programme, what are you looking to gain? In my recent linux experiment I tried and failed to get MPLABX to install. having the linux version was one of the reasons I was willing to give linux a go. It then just gave up and failed to work on my work windown PC so I just ditched that pile of garbage that won't handle high resolution displays and went back to the much more sensible microchip studio.
Title: Re: Simplest way to make a USB bootable Linux
Post by: SiliconWizard on October 31, 2021, 06:15:23 pm
Could be a number of reasons for this.
MPLABX is Java stuff. On some Linux machines, Java apps may run faster than on Windows. For various reasons.
One thing I can say for sure - not as sure for Java - is that GCC runs consistently faster on Linux than on Windows. The exact reasons why are still a bit unclear to me, but I can definitely time it.

Title: Re: Simplest way to make a USB bootable Linux
Post by: Simon on October 31, 2021, 07:16:53 pm
Granted it was a small project, but my last project compiled in 2s, I doubt it would have been faster on linux. The program itself ran fine.