Running Haiku from USB only / Laptop with USB stick as hard drive

What are actually the drawbacks of running Haiku from an USB Stick?
I thought i will never need more than one USB slot, because I would only use Haiku, to learn how Computers work and learn how to code. For that I need only one slot to transfer Data.

There are tiny usb sticks available, which are not disturbing, when the USB for the system is plugged in all the time.

And this also made me wonder, if it would be nice to have a Laptop, with no harddrive.

My argument is, that it could have 4 usb C slots instead inside a little chamber, which one can open, with a tool, for the Operating Systems

Would it be possible to run all 4 operating systems at the same time?
I mean there are dual core processors required for most Systems and its not expensive for a computer to run on 8 cores, so i thought it would be nice, to have like a Sidebar, where you can see your systems and drag and drop items there and so on.

For office tasks, all this computing power is completely irrelevant.
And when you add 3 Displays to the Laptop, you could run a different System on every screen. I think there would not be much of an Argument to run more than 2 Systems at a time, but I think it would be cool.

Maybe you buy 1 PC let your girlfriend use Windows, use Linux yourself and let your 2 Kids run Haiku, so they can’t play modern games, which are addictive?
And they still learn how to use a computer, probably better than on any other operating system available?

And I know, that there are virtual machines, but they are difficult to use, imo.

1 Like

It would make my head hurt. I like to do one thing at a time. Life is confusing enough with having four different OSes in front of me at once.

2 Likes

Let’s say you live in India or Africa, or China, or so and your Family can only afford 1 Computer, like it is the case for 90 Percent of humanity, or less, due to some being even Poorer.

Wouldn’t it be nice to supply one Family with PC, by needing only one?
Everyone could use their own USB for their own System. :slight_smile:

Ahoy,

This way I use my Haiku 64 bit actually, however I do not develop things on it

What you would like to have easily possible for Linux, Haiku
but khm, is a bit tricky for Windows – especially for the modern versions, as MS discourages to install Windows onto external drive … and a USB thumbdrive is external this way.
Against it … it is possible, but needs at least a special “friend” who does it for you … :smiley: Or if you are a little bit experienced user related to partitioning / booting (difference between BIOS and UEFI boot – this way interesting partitioning as for UEFI boot you need on every USB sticks an EFI partition too).

Also question you want to share your laptop ?.. It can be sometimes problematic problematic if at least 2 of you need the machine at the same time. Kids can quarrel on it who would use it , ok there are times when they can play together peacefully … but be aware of this possibility as well.

Also there is a chance your wife and you need the machine at the same time :wink: I hope you have a tablet … in this case -

Yes possible – with virtual machines :))

IBM still had not shared their partitioning technics to the PC crowd, and also PC industry actually does not build PCs which can be partitoned this way. This partitioning not equal with harddisk partitoning, but the all computer - you need a HW/SW combo that enables to configure CPU/RAM / storage/net / other resources into a unit within the computer - that unit can be called a (logical) partition or zone or else … After that, this part of your computer or computer “part” can be independently used : started / OS,apps installed / configured / used / stopped /deleted / etc.

But you have a similar - SW only (almost, as finally CPU/chipset should
support it and a multicore processor needed as well) solution : the virtualization.
Basically virtualization is not complicated, just should learn the product and its usage - as usually in case anything you would use generally - so you would use for this purpose : one machine - multiple OS , at the same time.

There are different kind of virtualizations, but as you would use different operating systems on the same machine - OS virtualization is not your solution.
In case virtualization - USB is a no go situation.

But you can buy ***4 small form factor (SFF) PCs ***, those can be installed onto a big monitor or medium size TV - with at least 4 HDMI in ports - using VESA mount. I had not checked that actually : is there such VESA mount stuff which can hold 4 SFFs - e.g. x86 NUC - or similar small form factor machines ?
Bt you can put them below the monitor or install them onto the wall.
This way you just share the display, and you just simply switch among them … selecting the appropriate HDMI input on the TV remote or the monitor’s input select button.

Also consider, if there is one machine … if that damage or fails, then none of you have machines. Of course possibly it is not so important, as you are casual PC users, you rather use your mobile devices.

Back to USB storage - you should buy very good stick - so avoid nameless , cheap sticks - you would spare many annoyance - with dataloss and reinstalls, unnecessary failure detective tasks, etc.

Also choose at least 64 GB, not necessarily because the OS and apps requirements, but the data you download/create yourself/share with family.

Taking India or Africa as an example – it is very oldschool.:smiley: :smiley: :smiley:
You do not seem so old by your picture.
Nowadays they are using smartphones instead :))
That is more simple and easier avalable for them - as I were informed from a net article - some years ago.

China is prospering well - people there can buy any number of PCs, smartphones, etc. - if they have anough credit as a citizen. (For credit and what it means : study todays China’s society - you will be surprised :wink: )

1 Like

While 24% Indians own a smartphone, only 11% of households possess any type of computer, which could include desktop computers, laptops, notebooks, netbooks, palmtops or tablets.

I found this information in the internet.

And I have no wife or kids, I actually want to prevent computer addiction in the future and I was looking for a single user operating system, which could be modfied for that purpose.

All of the above is more of a mindmap and I didn’t want to start like 10 topics, creating a mess.

So it does not have to be like that at all.
I don’t know yet, what I will end up planning.

I’m currently using Haiku from an external SSD most of the time and it works great. Aside from storage speed, the other problem with using flash drives/pendrives as long-term persistent live media is that they may not be designed with that secase in mind. They often have smaller read/write counts in mind, which could result in a persistent live install becoming unbootable in a relatively short period of time.

This is not just with Haiku, but any OS that can have persistent live installs on most portable flash storage.

Thats good to know, so I will test, how long it works.

Another +1, I run Haiku directly from a USB stick. I’m using Samsung Bar 128GB USB 3.1 drives, the weirdly shaped metal USB sticks. They have a throughput of 400MB/s, which is almost as fast as the SATA SSD drives I have installed on some of my older Macs. It seems to be fine, I’ve been working this way for a few months.

I regularly switch between operating systems. Windows 10 is installed on the actual internal NVMe SSD, but I also run elementaryOS (a version of Ubuntu Linux), and that’s also using one of those Samsung Bar sticks. Again, no problems after months of use.

I’m sure running from a USB stick is not “advisable”, but I wish I’d known earlier that it’s actually quite reliable & viable, if you have a quality USB stick. It’s because of this I’m able to run alternative operating systems “on bare metal”, instead of in a VM.

I have a Haiku installation on a USB stick (and it works great) but I rarely use it because I have a Haiku-dedicated laptop anyway. Still useful when not at home and not having said laptop with me, though. Installing on an external SSD is also an option, but disk data transfer is not impressive no matter the OS installed - presumably because it is bottlenecked by the USB.
Edit: It is worth noting here that Haiku’s Installer does a great job on creating USB installations from an existing Haiku system, and everything is coming along: not just the operating system but also any extra packages installed, your system’s settings, your shortcuts, and even your own folders. It basically clones your running system to a USB drive.

As for your idea on having multiple operating systems installed on USBs and running at the same time, well, while theoretically possible I am not aware of an application that does the housekeeping. I think virtual machines are a much easier solution. You have full control on how many cores each OS will use, you can transfer files between OSes rather easily, and data transfer from a virtual disk is faster compared to a USB’s “disk” data transfer.
Typically, I use VirtualBox but QEMU works as well. I’m not sure what you mean by saying VMs are difficult to use. Using multiple USBs sounds a much harder way to do the same thing to me.

Well maybe i shouldn’t have brainstormed at first and skipped the introduction :/…
I actually got the advice on the internet, that when you are learning how to code, you should start a project, which is of great personal importance, no matter how crazy it sounds.

MY project is, to create a cheap and easy to setup, but also challenging, yet still engaging to use, code and office laptop solution, for students and kids.

My motivation is, that I got addicted to gaming, due to social problems and I think, if I had basic knowledge about how to code back then and no access to games, I would have probably dove into that world.

It is also good to have a laptop, which is dedicated for work only. I couldn’t have a computer for 5 years, where I got rid of my addiction, now it’s gone, but what about the kids, growing up with that at an even younger age… They will suffer even more than me, when they grow older…

So I already have an idea.
The idea is, that I want to provide the building plan for the entire setup, operating System, Hardware, etc and charge 50 Cent for each Laptop sold, from the manufacturers, for further development and support, etc.

So it should be non profit, all the profit, that exceeds the needs of the project, will be donated to other NGOs.
I believe, that the System of donations only is inefficient, for a serious project. A well thought out system for income is important, for the project to succeed.

So I want to rent the building plan for that laptop to manufacturers, and everyone pays for each laptop, they sell, a tiny fee.

The idea is, that it should be a single core processor, with a cheap graphic chip integrated and an operating system, which has only educational games available.

The laptop should have leds in the keyboard, which can be coded with hex values or RGB values, for understanding at an early age, how the color values behave.

My plans do not go further yet, but I consider Haiku as the basis for the operating system. So the os shall be open source, but for the optimized hardware, you have to pay.

I probably mixed ideas above, which shall not have been blended together. :/…

However, when I become creative I feel the need to share my ideas and I enjoy, the discussion about possibilities and solutions. :slight_smile:

Well as I believe, I said earlier, before I know what I am doing, while using a Computer, I will stay inside this thread.

So the real question, which I needed to be answered right away, is the one with using the USB as harddrive.

Before I start my project, I will learn conding for 5-8 years or so. I think, that AI will be able to do a lot of the work for me, in the future and I need skill, time and money, for the project, and all what I have is time. So I need to invest time into skill, skill and time into money and then skill, time and money into the project, mentioned above.

Good luck with your project, but do not trust AI in programming. Unless you ask for a really simple program, it fails miserably most of the time. The situation is even worse if your code has to make use of existing libraries (and it will, for any project that’s not elementary). Quite frequently I get AI code that calls functions with the wrong number of arguments - or invalid arguments. Even worse, it may call functions that don’t even exist.

AI also fails to correct its serious mistakes even if you give it hints. If you are lucky, you may get a decent code after 3-4 tries, and hints you give in the process - but if you have to guide the AI towards the correct code giving hints, why would even need the AI in the first place. If you are not lucky, you will get wrong answers again and again, just slightly different than the previous ones. Sometimes it also falls into an eternal loop, giving the exact same answer again and again, despite you telling it the answer is wrong and the same as in its previous answer.
While it is true I managed to get some correct (and sometimes optimized) code using the AI, this was the exception rather than the rule.

Whoever trusts the AI for anything more serious than basic programming is a fool. Treat AI as a glorified search engine and you should be fine.

You are describing the https://frame.work laptops, unfortunatly i dont know how good haiku is running on them

I strongly believe, that AI will improve every year and as long as it does not produce decent code, I won’t start my project.

I wont be able to do so much coding alone. But in 8 years, AI should be good enough, for most tasks.

I tested AI and also came to the conclusion, that It fails at somewhat difficult programs, but AI is not a fully optimized nor fully developed technology.

Why shouldn’t I be able to do it with, let’s say Chat GPT 10.0 ?

Anyway I practice coding for one year now. So it comes handy, that I need to practice more anyway. Before I am a senior developer, there is no way of coding an os.

Could the problem with running an Os from USB be solved with an optimized driver, which handles Memory differently?

As far as I am informed, SSDs use a part of their Memory to replace dead memory, if necessary.

Let’s say someone writes code, which reduces an USB C Sticks Memory from 128 GB to 100GB, but the Memory becomes more enduring.

Would this solve all the issues, with USB as Hard drive?
Besides the Speed Issue.

@Daydream
Username checks out. :wink:

1 Like

Speed (as in slow performance) might be one of the drawbacks, depending on the type of USB drive. But it´s not as bad with Haiku as with a modern desktop oriented Linux distro (this is only based on my own experience and not backed up with any benchmark data). Apart from that, Haiku should be running fine.

For this you need a piece of software called a hypervisor, also known as virtualization software. As far as I know there is no x86 hardware with a hypervisor built into the firmware directly. You could use a bare-metal hypervisor like VMWare ESXi, but that´s going to be pretty expensive. With that out of the way, the more practical solution is to install a host operating system and use a hypervisor running on this OS. Linux has native KVM, Windows has Hyper-V, Virtualbox runs on Linux, Windows and MacOS (at least on the intel version), also QEMU runs on pretty much any OS out there. Haiku itself is not ideal as a host OS because it has no support for hardware accelerated virtualization which means you have slow performance and some other restrictions.

If I had to set up a system like you described I´d probably use a lightweight Linux distro (minimal Debian installation etc.) and run the guest OS´s in QEMU/KVM virtual machines. There´s no need to use any USB sticks for that. The disks that the guest OS use can be just files on a normal internal disk.

1 Like

Thank you for your reply,

My brainstorming went further and now I believe, it would be optimal for me, to specialize on something, related to my plan of supplying schools with non gaming hardware.
I could learn how to optimize USB-C Sticks for the usage as a harddrive for Operating Systems and would like to know, if this could be solved with software only?

I predict, that Data will continue to be transferred faster and in 10 years, it wouldn’t be so much of a problem anymore to use an USB port.

Altough I have no clue, how to achieve that at the moment, it:

  • Would be a managable task if I work on it over a long period of time

  • Would have more use cases than just Haiku

  • And could make it easier to try many different operating systems, which could result in a rising popularity of alternative operating systems.

USB SSDs or HDDs might be better than regular USB sticks for your purpose, as I think they are more reliable, and are larger.
You could set up multiple operating systems or installations using the Haiku bootloader or GRUB, with a menu on boot-up to choose between them.

I like the Concept of Memory Cards like in Video Gaming Consoles.
Maybe SSDs will shrink to the Size of an USB Stick?

I don’t know, what I end up doing. At the moment, I need to study every day, to get at least something done in the future.

However there is no way, I start my project right away. I will start it in 8 Years or whenever I see myself capable of succeeding.

I think of a Modular Laptop, where 80% of the space is occupied by the Akkumulator. The calculation unit should be tiny. Only a one core ore quad core processing unit for 32 or 64 Bit computing. I want to create a super cheap and super enduring laptop.

So there shall be an easy to replace Battery, and an easy to get out main unit, with all the tech, and etc., to use again, if sth breaks somewhere else and the rest should be a third unit. When something breaks, you only have to replace a part of the laptop.

I will also wait untill there are really cheap 1 NM or 0.5 nm Transistors available, so when this kind of standard is already outdated.

The entire setup should be standardized and every manufacturer can produce the units for it.
The consumer should be able to put the 3 pieces together by himself. (In under 2 Minutes, if inexperienced).

That’s where I am at the Moment. Trying to figure out, what the ideal standard would be, for a real good product.

I think the advantage of 1 core only would be the low power usage and the insane Akku endurance. The advantage of the quad core would be more software compatibility.