LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to create a USB booting stick (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-create-a-usb-booting-stick-4175640521/)

Yotaphoner 10-16-2018 02:56 PM

Unable to create a USB booting stick
 
Hi. I am not a newbie, or at least not enough to be posting here, but my problem seems so basic that I think it has to be here.

I am trying from a Linux distro which is not ubuntu to create a Ubuntu bootable USB stick. For that I create the partitions and format them with fdisk and mkfs.vfat (also tried with mkfs.ext4) and when its done I copy the iso file to the pendrive with dd: "sudo dd if=./path/to/file of=/path/pendrive"

Initially I had a multiple partition pendrive but I tried diferent partition structure and filesystem to be sure this wasn't the problem, so finally I enden creating a single partition on the pendrive.

Also I said to the BIOS to start from the pendrive, but nothing.

What I have to do?

fido_dogstoyevsky 10-16-2018 03:46 PM

Quote:

Originally Posted by Yotaphoner (Post 5915556)
...so finally I enden creating a single partition on the pendrive.

Also I said to the BIOS to start from the pendrive, but nothing.

What I have to do?

What is the actual dd command you used? If your pendrive is /dev/sdb so that the partition is /dev/sdb1, your dd command should be
Code:

sudo dd if=./path/to/file of=/dev/sdb
(bootable) and not
Code:

sudo dd if=./path/to/file of=/dev/sdb1
(not bootable).

Yotaphoner 10-16-2018 04:16 PM

Ok, that explains something.

I did it how you say and now it boots perfectly, but how I have to do it if I have more than one partition in the live USB?

I am going to create a persistent live USB for when the SSD/HDD fails or if I need to start others computer with it, so I will need a swap partition at least, and maybe another partition in FAT32 for software.

fido_dogstoyevsky 10-16-2018 06:43 PM

Quote:

Originally Posted by Yotaphoner (Post 5915589)
...I am going to create a persistent live USB for when the SSD/HDD fails or if I need to start others computer with it, so I will need a swap partition at least, and maybe another partition in FAT32 for software.

I don't know if you need a swap partition, someone with more knowledge about live USB installs will have to answer. My PCLinuxOS and Slackware live USB drives both have space left over for another partition, so fdisk will give you that if you need it.

Edit: If you want more than one partition I suggest making the bootable drive first to let Ubuntu use what it wants and then add your other partitions.

Yotaphoner 10-16-2018 08:08 PM

Smart answer! I solved all my problems about that... except one more question ;)

This question is because what I saw doing the research to try to solve this problem for myself. For the ubuntu partition I am not sure which filesystem it would be better. I always thought the ext4 it would be the best, but in almost all the tutorials to do this kinds of pen the specify the FAT32 filesystem. Which is your opinion?

Also... want to say that I also love Dostoievski. I almost read all their books, but I am not sure if I like the name-game with the word "dog" jajaja ;)

fido_dogstoyevsky 10-16-2018 09:46 PM

Quote:

Originally Posted by Yotaphoner (Post 5915666)
...This question is because what I saw doing the research to try to solve this problem for myself. For the ubuntu partition I am not sure which filesystem it would be better. I always thought the ext4 it would be the best, but in almost all the tutorials to do this kinds of pen the specify the FAT32 filesystem. Which is your opinion?...

There are better people to ask, but I think the reason for FAT32 is that it's the format that all the major OSes (Linux, *BSD, OSX and even Windows) can read/write to/from without any problems.

Quote:

Originally Posted by Yotaphoner (Post 5915666)
...Also... want to say that I also love Dostoievski. I almost read all their books, but I am not sure if I like the name-game with the word "dog" jajaja ;)

Different (and fictitious) author - I shamelessly stole my username from Wallace and Gromit (the short film A Close Shave) :)

jefro 10-17-2018 01:32 PM

Generally the live usb creators require fat. In reality most modern computers could be used if one created a live usb in some linux format but it's currently uncommon. Real installs to a usb would be some linux format in almost all cases. Remember, live to usb is sort of a hack or trick that was used to take a CD/DVD image and place it on a usb drive.

fatmac 10-18-2018 05:17 AM

Quote:

I am trying from a Linux distro which is not ubuntu to create a Ubuntu bootable USB stick
Download the Ubuntu .iso image, which should be a hybrid, then use dd to put it onto your USB stick.

Check that your USB stick is actually sdb, plug it in, then do
Code:

dmesg | tail
then, (make sure it isn't mounted),
Code:

sudo dd if=ubuntu.iso of=/dev/sdb bs=1M
& you should now have a 'live' USB stick.


All times are GMT -5. The time now is 10:52 PM.