LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Issue with USB partition number (https://www.linuxquestions.org/questions/linux-newbie-8/issue-with-usb-partition-number-4175653956/)

Belikewater 05-15-2019 10:57 AM

Issue with USB partition number
 
Hello LQ,

I am attempting to write an ISO image to USB, however I am running into an issue trying to get the partition number of the USB.

I ran sudo fdisk -l and it returns:
Code:

Disk /dev/sdb: 14.9 GiB, 16008609792 bytes, 31266816 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: 0x00000000

Usually, I'd see something like /dev/sdb1.


So I ran sudo fdisk /dev/sdb then p to print the table partition, but again its only sowing sdb with no partition number like sdb1.

Have any of you run into this issue before? This is causing me to be unable to write the ISO image to the USB.

Thanks

jsbjsb001 05-15-2019 11:07 AM

You might say WHAT ISO image it is you're trying to write?
How you've tried to write it?

The more details you provide, the more likely someone will be able to help you. Given an ISO image is generally a complete disk image, then I would have thought the ISO image would include whatever partitions there are to be made.

Have you followed any instructions? If so, which ones?

Belikewater 05-15-2019 11:11 AM

Hey jsbjsb001,

Usually, when I write an ISO image (in this case ISO image of Slackware to USB on an UBUNTU machine), i do sudo fdisk -l. Get the partition. Then format the USB to fat32 with mkdosfs -F 32 -I /dev/sdbX (x being whatever partition number, usually sdb1). Then use sudo dd if=(path to iso image) of=/dev/sdb1 (or whatever partition).

jsbjsb001 05-15-2019 11:15 AM

Perhaps you should review this. You need to write the ISO to the USB drive, not a partition.

Belikewater 05-15-2019 11:59 AM

ah that was my dumb error. Thanks. I still am unable to format the USB to fat32. It seems to be an issue due to the partition. I used:
sudo mkdosfs -F 32 -I /dev/sdb (I believe here I would use sdb1). My results were
mkfs.fat 4.1 (2017-01-24)
attribute "partition" not found

linus72 05-15-2019 12:02 PM

Once youve written the iso to usb using dd you cant format it or make partitions or it probably wont boot anymore.

Has that formula worked before and it booted or ?

Belikewater 05-15-2019 12:05 PM

Hi Linus72,

The way I've always done it manually is first using fdisk -l to find the path to the usb. Then formatting the USB to fat32 with the above command. After that is when I use the dd command. Ive tried a few times today to skip formatting to fat32, but seems like the data is now being written to the USB.

linus72 05-15-2019 12:20 PM

I always use lsblk as root, first output is a 2GB usb I dd'd Slacker iso to., note that the dd'd iso takes up 1.4gb of total 1.9GB

Code:

bash-4.3# lsblk
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0    11:0    1  1024M  0 rom 
loop0    7:0    0  1.4G  1 loop
sdc      8:32  1  1.9G  0 disk
`-sdc1  8:33  1  1.4G  0 part
sda      8:0    0 149.1G  0 disk
|-sda4  8:4    0    1K  0 part
|-sda2  8:2    0  24.4G  0 part
|-sda7  8:7    0  30.8G  0 part
|-sda5  8:5    0  19.9G  0 part
|-sda3  8:3    0  25.1G  0 part
|-sda1  8:1    0  24.4G  0 part
|-sda8  8:8    0  4.8G  0 part
`-sda6  8:6    0  19.8G  0 part
zram0  252:0    0  512M  0 disk


and a regular 16GB fat32 usb, mounted

Code:

bash-4.3# lsblk
NAME  MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0    11:0    1  1024M  0 rom 
loop0    7:0    0  1.4G  1 loop
sdc      8:32  1  14.5G  0 disk
`-sdc1  8:33  1  14.5G  0 part /run/media/live/MULTIDISTRO
sda      8:0    0 149.1G  0 disk
|-sda4  8:4    0    1K  0 part
|-sda2  8:2    0  24.4G  0 part
|-sda7  8:7    0  30.8G  0 part
|-sda5  8:5    0  19.9G  0 part
|-sda3  8:3    0  25.1G  0 part
|-sda1  8:1    0  24.4G  0 part
|-sda8  8:8    0  4.8G  0 part
`-sda6  8:6    0  19.8G  0 part
zram0  252:0    0  512M  0 disk


drillsar 05-15-2019 12:53 PM

Yea I always run lsblk as well to make sure the device is what I think it is. I previously thought the USB stick was mounted on /dev/sdb actually though was mounted on /dev/sdc.

273 05-15-2019 01:05 PM

There is no need to format the drive at all before dding the image onto it -- any file system will be lost when you dd the image anyhow. You likely read a guide written by a Windows user or similar.

Belikewater 05-15-2019 02:40 PM

I will have to keep playing around with it. I've tried several USBs'. For some reason it doesn't become bootable after using dd and rebooting. I've also tried on another machine. Very odd. Maybe ill stumble over something silly that is being overlooked.

linus72 05-15-2019 03:08 PM

Can I ask why you only want to use dd? Its read-only at that point right?

Belikewater 05-15-2019 03:34 PM

Hey linus72,

I am just trying to get ISO image on the USB to boot up slackware and install. I even tried unetbootin, but still no go. Not sure if somehow, I corrupted my USB or if its something else.

linus72 05-15-2019 03:43 PM

So to be clear- are you trying to dd the slackware install iso to usb?

Belikewater 05-15-2019 03:48 PM

Right. I have the iso image in my downloads. I CD into ~/Downloads/slackware-14.2-iso and then sudo dd if=/slackware-14.2-source-dvd.iso of=/dev/sdb


All times are GMT -5. The time now is 07:53 AM.