Install OpenMandriva Lx to USB flash drive

This question was asked here among other posts about this. This thread is basically working towards a simple ‘How To’ for our ‘Resources’ forum category.

The goal is to install OM Lx to a USB Flash Drive. And the installed system has to be bootable. Unfortunately at present we don’t have the ability to make a USB install “persistant” or writable.

Be very careful with the following if you enter the wrong drive you will erase everything on it, don’t get this wrong and erase your Hard Drive or SSD. You have been warned. If your are not sure you know what you are doing with this then don’t do it.

To do this the drive needs to be empty. Not erased, but empty, blank. To do this first plug flash drive in to USB port and use ‘fdisk -l’ to locate your flash drive (usually it is at the end of the list):

$ sudo fdisk -l
[sudo] password for ben79:
...
Disk /dev/sdc: 14.44 GiB, 15496445952 bytes, 30266496 sectors
Disk model: TD USB 3.0      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disklabel type: gpt
Disk identifier: B4EE3058-FE04-B24F-AFBF-05E6312D0953

Device        Start      End  Sectors  Size Type
/dev/sdc1      4096   618495   614400  300M EFI System
/dev/sdc2    618496 27301662 26683167 12.7G Linux filesystem
/dev/sdc3  27301663 30266459  2964797  1.4G Linux swap

So in this case we see the flash drive is /dev/sdc. (fdisk -l lists a lot of other devices so the … means I skipped all that.) To “blank” the device we use the command ‘sudo dd if=/dev/zero of=/dev/sdX bs=1k count=2048’ where X is the letter of your drive. So in the case:

sudo dd if=/dev/zero of=/dev/sdc bs=1k count=2048

Does not take long at all. Now run ‘fdisk -l’ again and notice the output:

Disk /dev/sdc: 14.44 GiB, 15496445952 bytes, 30266496 sectors
Disk model: TD USB 3.0      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes

That is what we want. Now the Calamares installer should be able to see your USB flash drive as install-able storage device and you should be able to install OM Lx.

1 Like

If the above worked then you should see something similar to this in Calamares partitioner drop down menu:

Post-edit: You should be able to install to that. But keep in mind this is not the same as installing to a SSD or conventional Hard Drive in terms of time. There are a number of things that affect how long this type of install will take among them are:

  1. USB flash drive speed, these are usually slower to a whole heck of a lot slower than a conventional drive.

  2. Your USB controller hardware. This is a big variable. But is as far as I know always slower than installing to conventional drive.

  3. Other things I don’t know the specifics of yet myself. (If anyone knows I can put here.)

In this case my install took approx. 35-37 minutes as opposed to 3-10 minutes for an install to SSD on any of my computers.

Post-edit-2: I just did this with the OM Lx 4.0 x86_64 ISO downloaded from SourceForge so it works. Part of the purpose of this thread is to see if it works universally or if there are exceptions I need to address in any ‘How To’ or if there is any bug.

1 Like

Post-edit: At this time I do not see the following as necessary to install OM Lx to USB Flash Drive. Just do the one ‘blank’ command described above. Developer told me this might be useful if someone has a problem with Calamares recognizing a blanked USB device.

It has been suggested that in addition to “blanking” the USB device as described above for certain hardware one might need to add a partition table to get you hardware to see the USB device.

This can be most easily done from command line. One way is like this using my /dev/sdc flash drive as an example:

$ sudo fdisk /dev/sdc

(type g to creage gpt partition table or o to create dos partition table)

(type w to write changes to disk)

To check simply:

$ sudo fdisk /dev/sdc

(type p to list partition table)

Disk /dev/sdc: 14.44 GiB, 15496445952 bytes, 30266496 sectors
Disk model: TD USB 3.0      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 1048576 bytes
Disklabel type: gpt
Disk identifier: 79AAC033-3BFB-CC49-A8FD-45ECC30BD02A

(type q or quit)

It is a little more cumbersome but you can also do this with a partition GUI such as KDE Partition Manager.

i don’t know if rosa is your’s or not, but you need to address the fact that it doesn’t seem to pick only the flash drive first. every other tool for creating a bootable flash drive i’ve used picks the flash drive first, and it’s up to the enduser to change it from that if they want the boot media somewhere else. that is how rosa should be set up. as far as empty vs erased it doesn’t matter. when i go to overwrite a bootable flash drive i always erase and reformat it. then i create my media. flaw with a lot of the tools for linux is they tell you they overwriting and actually don’t, so i got in the habit of open disk and from there erase and format.

What I’m talking about here has nothing to do with burning an ISO to a USB flash drive. That is not under discussion in this thread.

I’m talking, actually showing how to install bootable OM Lx system on a USB flash drive. Entirely different.

and i quote

" Be very careful with the following if you enter the wrong drive you will erase everything on it, don’t get this wrong and erase your Hard Drive or SSD."

And this is about the installation, not about dumping the ISO on USB (the step before the install).

1 Like

That is absolutely correct, I can guarantee you can erase a hard drive if you incorrectly do what I posted.

Do note however that ROSA Image Writer or burning an ISO to a USB flash drive is not mentioned anywhere in that post. This relates only to installing OM Lx Operating System on a USB flash drive.

The title of this thread is “Install OpenMandriva Lx to USB flash drive” not “Burn OpenMandriva ISO to USB flash drive”. I will say again. These are entirely different things.

Post-edit: Does my second post not make clear exactly what I’m talking about? That is a screen shot of our Calamares installer partition page for installing OM Lx showing the option to install to a USB device.

(Also I edited the content of the post since first written for clarity, spelling, and my usual attempt to be precise when discussing technical issues with user.)

@mrgrimm thanks for pointing out that I may need to be more clear what is being discussed in this ‘How To’ article. I added this to first post above. If you would be so kind as to let me know if this makes things more clear that would be appreciated.

I hope this clears things up. :thinking:

It was very clear since the beginning.
I’d dare even to say that it was more clear before than current…

1 Like

Thanks @rugyada that’s very helpful. Good point. The addition is over explaining IMO also.

I do try to strike a balance when I write a "How To’ between explaining things enough for newbies without over explaining and the result most of the time may be towards over explaining.

1 Like

And it looks also that the user’s complaint is just blind assumption and he did not even used rosa-imagewriter otherwise he would know that the tool picks the flash drive first as default, right as it should do :slightly_smiling_face:

1 Like

Uh, not necessarily:

That is a USB printer and if it is already on before I plug in USB Flash Drive it sees the printer first.

1 Like

http://en.rosalinux.com/downloads/

Just for information for all users: ROSA is ROSA not OpenMandriva. We do collaborate and some contributors contribute to both. We collaborate with a number of other organizations. And thus share contributors with other organizations. This is common throughout Linux World.

actually i dom’t speak about things i’ve never used,. now as for you asinine statement you do realized the only one you make as ass of when you assume is yourself, right? if you had bother to read the thread i created you would know yes i used rosa, and YES i do know what hell i’m talking about.

thank you

How To is done.

https://forum3.openmandriva.org/t/how-to-install-openmandriva-lx-to-usb-flash-drive/2861

I’m using ROSA imagewriter since year 2011 for all my distros installations.

I have 3 internal HD with many partitions (systems, data, swap) + 1 USB external HD (system and swap) where recently I successfully installed OMLx.
Never (never) the tool picked as first anything other than the plugged in USB stick.
There must be an USB stick plugged in already, of course.

@mrgrimm You popped up with PEBKAC misplaced/unrelated comments in this thread. So no, you clearly don’t know what hell you are talking about.

Not only you did not admit your mistake, but also you are offensive, so cool down and learn how to behave, mate.