Fix flash drive after having used it to build live opensuse

I used a flash drive to build live opensuse according the tutorial in the opensuse wiki article.

Now it seems my usb can’t be used to build other linux distros. How do I get rid of the MBR (if I’m not wrong) it installed when I built opensuse.

Another question:

There are some third party programs that are used to build linux distros on usb drive, e.g. YUMI. But I find opensuse is always poorly supported. The latested support version is only 12.1 with YUMI. I wonder who is to blame here…

MBR is jut the first sector on any drive. I really can’t believe that is a problem tor other distros

openSUSE has their own way of doing the USB thing… in essence you just do a binary copy to the USB devise and it works no need for extra software to run the live versions. So no ones fault. Other Distros may need additional stuff to make them work openSUSE does not.

You know what. After I used one of those programs and installed UBUNTU, when I boot from the flash flash drive, it showed me the welcome screen of opensuse. I tried the first option “start live session of opensuse” but was given an error.

Now I have used some partition tools in windows and found some strange partition table so I formatted the whole disk but still can’t boot ubuntu normally saying missing sth I can’t recall.

Any thing that is to boot has to use the MBR so it must put code there . There is no way any OS can “protect” that area. Many USB boot solutions assume a FAT format is on the stick. So you may need to repartition and format the partition as FAT. Also check the box make bootable that will over write the MBR

You can make the USB FAT compatible using YaST ==>Partitioner.

Normally,


# dd if=/dev/zero of=/dev/sdx count=1

would zap the MBR. (Change “/dev/sdx” to the correct device name for your flash drive).

I have run into problems with some isos, which put a gpt partitioning format on the USB. If I run into that, I use “gdisk”, and then use the “x” command (extra functionality) followed by the “z” command (zap all gpt structures).

When done with that, you might need to use “fdisk” to create one partition and format that as FAT32.

Normally, I just keep a USB for use with isos, and don’t try to use it for other purposes. And then it normally does not matter. The next time that I write an iso to the drive, that will overwrite the old MBR.

Without a better, detailed description what you’re seeing, any response is guesswork.

So, for starters it might be important if your storage is a USB dongle or an SSD.

Particularly with dongles, you may need to manually delete files to free up space. I’ve had poor experiences attempting to “re-format.”

Also, you need to understand how solid state storage requires an extra step to erase and properly prepare for a write compared to HDD. So, fresh from the factory the disk is already prepared but once you’ve extensively written to disk(particularly if you exceeded approx 65% total capacity) then the disk will be exceedingly slow for writing unless you properly erase (after deleting).

Look up info on SSD read/write, TRIM and memory traps to better understand working with SSD.

HTH,
TSU

Thank you guys. I just didn’t think it would be a little troublesome.

Anyway I fixed it by using YAST, “rebuild partition table” and I chose “windows”. Then I use Yast partitioner to format the disk.

Now the flash drive works normally again.

On 2013-07-13 10:06, bonedriven wrote:
>
> Thank you guys. I just didn’t think it would be a little troublesome.
>
> Anyway I fixed it by using YAST, “rebuild partition table” and I chose
> “windows”. Then I use Yast partitioner to format the disk.
>
> Now the flash drive works normally again.

I was going to suggest “gparted”.

The trick is that you need not only “format”, but “repartition”. The
openSUSE usb disk has 2 partitions (I’m looking at the “DVD” while I
write this). To reuse the stick, you either delete all the partitions
and use it whole, or create a single fat partition.

A plain reformat only formats one of those 2 partitions, probably the
first one, which is a 4 MiB FAT.

The quickest route is to run this:


dd if=/dev/zero  of=/dev/sdX  count=10

but you have to make sure you find the correct value for X, or you can
nuke one of your valuable system disks.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)