1

I currently have a setup on Debian Stretch and I want to dual boot with Ubuntu 16.04. I'm not very experienced in installing another OS so I'm not sure what I'm doing.

What I've done so far :

  • I have downloaded the desktop iso for Ubuntu 16.04.
  • Formatted my USB to fat32 and erased everything on it
  • Used dd if=path/to/iso of=/dev/sdb1
  • Using gnome-disks, the USB is on auto-mount and bootable

  • Restarted my laptop and pressed F9 (Probook 6470b)

I see in the selection my "Generic USB", after pressing F9 on the start of my laptop. When I select it, it still goes to Debian like if I selected to boot from my hard drive with debian. Prior to using Debian, Ubuntu used to be installed. However, my previous bootable USBs were created on Windows 7 with Zadig. Am I missing something?

  • 2
    Should it be "of=/dev/sdb" not sdb1? – Rusi Jul 19 '19 at 17:08
  • Ditto. You don't need to format media before copying a device image to it, "device" being distinct in that it represents a whole block device with filesystem partitions in it (which should be written to /dev/sdb, a block device), vs. an image that just contains a filesystem (which would need to be written to /dev/sda1, a partition). Bootable images are always device images, not just single filesystems, although they may contain only one filesystem. – goldilocks Jul 19 '19 at 17:18
  • This fixed it! Thank you! Please add an explained answer, I will accept it – Cedric Martens Jul 19 '19 at 17:33
  • Hard to do at reasonable length... What with terms like device having multiple confused meanings etc etc. So I've no problem if @goldilocks puts his answer even if it so happened that my suggestion was the first. To me the more interesting question is : Could we have kept your "sdb1" approach, and turned on the bootable flag? – Rusi Jul 20 '19 at 06:24
  • @Rusi No, try fdisk -l whatever.iso and you'll see why that can never work. – goldilocks Jul 20 '19 at 10:35
  • @goldilocks Some people have made it work If you say that's a lot of work I won't dispute – Rusi Jul 20 '19 at 13:40
  • Interesting but isohybrid is obviously a hack, that doesn't count ;P – goldilocks Jul 20 '19 at 13:45

1 Answers1

2

I'll explain this in terms plagarized from myself.

People are commonly confused by the difference between three distinct things:

  1. A random access block storage device such as an SD card (or HDD).
  2. A storage partition which is a section of a device; there may only be one which occupies pretty much the whole thing.
  3. A filesystem which is something used to organize the data on a partition. Generally speaking there is a one-to-one correspondence between a filesystem and a partition.

On a certain level 1 and 2 are both regarded as "block devices" by the system, (and, on another, colloquially 2 and 3 are often conflated), but in context they are distinct entities. System images come in two flavours, device and filesystem. A bootable image is always the former, because it must contain some meta-information about the structure of the filesystem(s) and partition(s) contained in them in a format that that standard PCs etc. can use from boot, and that information is stored on the device but not all of it is in a partition. The two common formats for this information are (DOS-)MBR, a legacy of BIOS based systems, and (much newer), GPT, an artifact of UEFI based systems.

With regard to linux device nodes, partitions always have a number as a suffix,1 like this:

/dev/sdb1
        ^

Indicating this is the first partition on the sdb device. Again, remember, you can't boot a partition, so there is nothing you can write to this which will make the device bootable if it is not already. Moreover, .iso files are always device images, and if you copy one onto a partition, it won't be usable. What you want is the device itself:

/dev/sdb

When you copy a device image onto this, it is copied from block zero, and will erase any and all information currently on that device, including any of the meta-information about partitions and filesystems created by formatting, meaning there's no point in formatting it in any way first. Some people recommend this out of superstition (aka. cargo cult practices gone wrong), but it won't matter.


  1. An exception to this would be if you format a device as one big filesystem, in which case it is partitionless, and no good to boot from, but can still be mounted as a single fs. This is not a normal practice however.
goldilocks
  • 87,661
  • 30
  • 204
  • 262