LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-15-2019, 10:57 AM   #1
Belikewater
Member
 
Registered: Mar 2016
Location: Orlando Fl
Distribution: Slackware/Peppermint
Posts: 164

Rep: Reputation: Disabled
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
 
Old 05-15-2019, 11:07 AM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth? I would say I hope so but I'm not so sure about that... I could just be a figment of your imagination too.
Distribution: CentOS at the time of this writing, but some others over the years too...
Posts: 2,745

Rep: Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420
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?
 
Old 05-15-2019, 11:11 AM   #3
Belikewater
Member
 
Registered: Mar 2016
Location: Orlando Fl
Distribution: Slackware/Peppermint
Posts: 164

Original Poster
Rep: Reputation: Disabled
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).
 
Old 05-15-2019, 11:15 AM   #4
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth? I would say I hope so but I'm not so sure about that... I could just be a figment of your imagination too.
Distribution: CentOS at the time of this writing, but some others over the years too...
Posts: 2,745

Rep: Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420Reputation: 1420
Perhaps you should review this. You need to write the ISO to the USB drive, not a partition.
 
1 members found this post helpful.
Old 05-15-2019, 11:59 AM   #5
Belikewater
Member
 
Registered: Mar 2016
Location: Orlando Fl
Distribution: Slackware/Peppermint
Posts: 164

Original Poster
Rep: Reputation: Disabled
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
 
Old 05-15-2019, 12:02 PM   #6
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,491

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
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 ?
 
Old 05-15-2019, 12:05 PM   #7
Belikewater
Member
 
Registered: Mar 2016
Location: Orlando Fl
Distribution: Slackware/Peppermint
Posts: 164

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-15-2019, 12:20 PM   #8
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,491

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
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

Last edited by linus72; 05-15-2019 at 12:21 PM.
 
1 members found this post helpful.
Old 05-15-2019, 12:53 PM   #9
drillsar
Member
 
Registered: Jan 2017
Posts: 139

Rep: Reputation: Disabled
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.
 
1 members found this post helpful.
Old 05-15-2019, 01:05 PM   #10
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,270

Rep: Reputation: 2201Reputation: 2201Reputation: 2201Reputation: 2201Reputation: 2201Reputation: 2201Reputation: 2201Reputation: 2201Reputation: 2201Reputation: 2201Reputation: 2201
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.
 
3 members found this post helpful.
Old 05-15-2019, 02:40 PM   #11
Belikewater
Member
 
Registered: Mar 2016
Location: Orlando Fl
Distribution: Slackware/Peppermint
Posts: 164

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-15-2019, 03:08 PM   #12
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,491

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Can I ask why you only want to use dd? Its read-only at that point right?
 
Old 05-15-2019, 03:34 PM   #13
Belikewater
Member
 
Registered: Mar 2016
Location: Orlando Fl
Distribution: Slackware/Peppermint
Posts: 164

Original Poster
Rep: Reputation: Disabled
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.
 
Old 05-15-2019, 03:43 PM   #14
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,491

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
So to be clear- are you trying to dd the slackware install iso to usb?
 
Old 05-15-2019, 03:48 PM   #15
Belikewater
Member
 
Registered: Mar 2016
Location: Orlando Fl
Distribution: Slackware/Peppermint
Posts: 164

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply

Tags
iso image, partition table, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Identify and explain the major number, minor number, and revision number in Linux... turbomen Linux - Newbie 1 11-16-2010 02:48 AM
Preserving number of links with 'cp'. ( preserve number of links ) Devyn Linux - General 7 09-16-2005 10:07 PM
what is a major number and a minor number ? Menestrel Linux - Newbie 2 10-11-2004 07:53 AM
how do you edit your virtual console number? (or VT number 3) jjorloff1 Linux - General 2 04-03-2004 07:21 PM
why there is a need for minor number and major number for monitor/keyboard in pc? tripathi Solaris / OpenSolaris 1 11-07-2003 09:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration