openSUSE 13.2: live usb stick not working

Hello everyone. I am new to linux (well, almost) and thank you for helping me with my problem.:slight_smile:
I am trying to make a live usb stick myself.
My laptop OS is Win7 but I did the work on VMware with Ubuntu.

I downloaded the 13.2 gnome live x86_64 version iso (checked md5sum already) and used
sudo dd if=openSUSE-13.2-GNOME-Live-x86_64.iso of=/dev/sdb1
to make the bootable disk.

The disk can be recognized under Ubuntu and shows it has two directories (boot and efi) and several other files so I assume it is right by now. The disk is not recognized under Win7 however.

Then I change the BIOS to let the usb stick boot first. But it seems the usb stick exactly have no use. There’s no failure or mistake reports or whatever. The system started Win7 as usual. Then I tried to boot the UEFI first but get the same result.

I used fdisk to check the partition and shows one is efi and another is linux. The second one has a star sign under BOOT.

Is this the problem with my BIOS setup? or does it means I did not make the live usb right?

When /dev/sdb is the USB memory stick, you should use /dev/sdb, writing to the device. Not /dev/sdb1, which is only the/a partition on the device.

That’s wrong.
You need to copy the ISO to the device itself, not the first partition.

sudo dd if=openSUSE-13.2-GNOME-Live-x86_64.iso of=/dev/sdb

But be aware that everything gets overwritten, including the partition table, so all data is lost (even on other partitions that might exist on the stick).
If you want to be able to restore the stick to the current state including the partitioning, make a copy first, also with dd, just the other way round:

dd if=/dev/sdb of=backup.img

does it mean if I do it right, then there should be only one partition? No EFI included?

Umm it seems this is the reason. Thanks a lot. I will try it later today. just stayed up all night lol.

On the USB mass-storage device, there will be no partition at all. Just an ISO file system.

Well, that’s not completely true.

A Live USB stick consists of several (2 I think) partitions, for the read-only part (the ISO filesystem) and the writeable (persistant) one (containing /home e.g.).
But I think the further partitions are created during the first boot…

To clarify a bit: I do think that a Live USB stick has 2 partitions right after “burning” it.

The actual filesystem on the second partition is created during the first boot.

On 2015-06-29 13:36, wolfi323 wrote:
>
> wolfi323;2717348 Wrote:
>>
>> A Live USB stick consists of several (2 I think) partitions, for the
>> read-only part (the ISO filesystem) and the writeable (persistant) one
>> (containing /home e.g.).
>> But I think the further partitions are created during the first boot…
> To clarify a bit: I do think that a Live USB stick has 2 partitions
> right after “burning” it.

Yes.

>
> The actual filesystem on the second partition is created during the
> first boot.

It grows a third partition on the first boot, as large as the rest of the stick:


minas-tirith:~ # fdisk -l /dev/sdb

Disk /dev/sdb: 4051 MB, 4051697664 bytes, 7913472 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xa19f8ba9

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            4084       12275        4096   ef  EFI (FAT-12/16/32)
/dev/sdb2   *       12276     1232895      610310   83  Linux
/dev/sdb3         1232896     7911424     3339264+  83  Linux
minas-tirith:~ #

and:


minas-tirith:~ # file -s /dev/sdb*
/dev/sdb:  DOS/MBR boot sector; partition 1 : ID=0xef, start-CHS (0x1,63,21), end-CHS (0x5,63,20), startsector 4084, 8192 sectors; partition 2 : ID=0x83, active, start-CHS (0x5,63,21), end-CHS (0x259,63,32), startsector 12276, 1220620 sectors; partition 3 : ID=0x83, start-CHS (0x25a,0,1), end-CHS (0x3ff,63,32), startsector 1232896, 6678529 sectors
/dev/sdb1: DOS/MBR boot sector, mkdosfs boot message display "This is not a bootable disk.  Please insert a bootable floppy a"
/dev/sdb2: # ISO 9660 CD-ROM filesystem data 'openSUSE 13.1 Live' (bootable)
/dev/sdb3: Linux rev 1.0 ext3 filesystem data, UUID=86135af3-9bba-4383-850d-bc1ac842617e, volume name "hybrid" (needs journal recovery) (large files)
minas-tirith:~ #

–
Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

If you do it correctly, there will be two partitions.


/sbin/fdisk -l openSUSE-13.2-KDE-Live-x86_64.iso


Disk openSUSE-13.2-KDE-Live-x86_64.iso: 908.8 MiB, 952926208 bytes, 1861184 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe28d2fda


Device                             Boot Start     End Sectors  Size Id Type
openSUSE-13.2-KDE-Live-x86_64.iso1       4224   12415    8192    4M ef EFI (FAT-
openSUSE-13.2-KDE-Live-x86_64.iso2 *    12416 1861631 1849216  903M 83 Linux

I used “fdisk” on the iso image file directly. But you will get the same running “fdisk -l” against your USB, except that the device column will be different (device names instead of file names). The EFI partition (partition 1) is used for UEFI booting, but is ignored on a non-UEFI system.

It has two partitions right after burning. Partition 1 is a small EFI partition (but the USB is legacy partitioned). Partition 2 is the live system.

During the first boot, partition 3 is added for saving anything you change while running the live system. As I recall, that uses “btrfs” for the third partition (the “hybrid persistent partition”), mainly because “btrfs” formats faster than “ext4”.

Which then would mean that the file, notwithstanding that the file name ends with .iso, isn’t a plain ISO file system in a file. It is a disk image, including a partition tabel and two partitions, each with their own file system.

Which is not a probl;em per se, but a bit confusing naming.

Yes, it is not a plain ISO CD/DVD image, it is a hybrid thing.

But it does contain a bootable CD/DVD image, with some hacks to create a persistant, bootable Live USB Stick too.

Which is not a probl;em per se, but a bit confusing naming.

The name should probably indicate that you can just burn it to a CD/DVD as well.

And I think the 32bit Live ISO doesn’t have an EFI “partition”, so it would probably fit more to your understanding of an ISO image.
But again, a second partition for the writeable part will be created on first boot (if you put it onto an USB stick, this won’t happen on a CD/DVD of course… :wink: ), also in this case.

It’s a hybrid. If you are looking for an iso9660 file system, then it is just that. If you are looking for disk partition, it has those.

If you burn to a DVD, then your firmware is going to be looking for the iso file system. If you “burn” to a USB, then the firmware is going to be looking for partitions. If you loop mount the “.iso” file, it will be seen as an iso9660 file system.

On 2015-06-29 17:26, hcvv wrote:

> Which then would mean that the file, notwithstanding that the file name
> ends with .iso, isn’t a plain ISO file system in a file. It is a disk
> image, including a partition tabel and two partitions, each with their
> own file system.

You can see from my code output I posted that the second partition is an
ISO.

And the entire thing can be burned on CD…

–
Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Actually it is. ISO filesystem defines 32K system area in the beginning that is not used by ISO9660. You can compare it with area reserved for bootloader. Anything can be put there, including partition table (or multiple partitions tables in some cases). Also EFI System Partition is not a “partition”. It is a file in ISO which is additionally exposed as partition by preparing partition table that that matches ESP file location.

On 2015-06-29 19:26, arvidjaar wrote:
>
> hcvv;2717366 Wrote:
>> isn’t a plain ISO file system in a file
>
> Actually it is. ISO filesystem defines 32K system area in the beginning
> that is not used by ISO9660. You can compare it with area reserved for
> bootloader. Anything can be put there, including partition table (or
> multiple partitions tables in some cases). Also EFI System Partition is
> not a “partition”. It is a file in ISO which is additionally exposed
> as partition by preparing partition table that that matches ESP file
> location.

Sounds a bit ugly, no? :-}

–
Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Thanks a lot everyone! After re-burned it on sdb instead of sdb1 it worked. And right after burned it did have two partitions, one is labeled linux and the other labeled EFI.

No. Why? It had been this way since the very beginning. When you create bootable ISO image, your program that is executed by BIOS has always been a file in the image, which additionally was referenced by boot catalog. ESP on ISO is just a kind of boot image, same as floppy or HDD emulation.

What is ugly, is the fact that it is impossible to add MBR that works both in CD and HDD “modes” because block size is different. GPT works around it by auto-detecting block size; MBR does not have information to do it.

On 2015-06-30 06:06, arvidjaar wrote:
>
> robin_listas;2717403 Wrote:
>>
>> Sounds a bit ugly, no? :-}
>>
>
> No. Why? It had been this way since the very beginning.

Maybe because I was not fully aware of it :slight_smile:

> When you create
> bootable ISO image, your program that is executed by BIOS has always
> been a file in the image, which additionally was referenced by boot
> catalog. ESP on ISO is just a kind of boot image, same as floppy or HDD
> emulation.
>
> What is ugly, is the fact that it is impossible to add MBR that works
> both in CD and HDD “modes” because block size is different. GPT works
> around it by auto-detecting block size; MBR does not have information to
> do it.

Interesting…

–
Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))