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 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 |
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? |
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). |
Perhaps you should review this. You need to write the ISO to the USB drive, not a partition.
|
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 |
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 ? |
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. |
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 and a regular 16GB fat32 usb, mounted Code:
bash-4.3# lsblk |
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.
|
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.
|
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.
|
Can I ask why you only want to use dd? Its read-only at that point right?
|
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. |
So to be clear- are you trying to dd the slackware install iso to usb?
|
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
|
do you do bs=? and && sync?
I usually do Code:
dd if=/whatever.iso of=/dev/sdc bs=1024 && sync |
Hey Linus72,
It appears for whatever reason, the issue is with the actual ISO image. I downloaded Slackware 14.2 source code DVD ISO (The complete source code tree for both x86 and x86_64), but not sure if its missing any files. I downloaded Puppy Linux, just to check if I could write an ISO image to the USB and it worked. I'll have to investigate what is going on with my Slackware download. Nonetheless, I learned quite a bit from this thread. I appreciate the help. I am going to download a mirror, to see if I can successfully write that ISO image to the USB. |
|
Yes, that is the one I just did and it is working. Previously, I tried downloading the torrent from here: http://www.slackware.com/getslack/torrents.php
|
Quote:
I had several MP3 players that used that latter format. If it's an unpartitioned drive and you've got an image that is one of a partition (that is: it does NOT contain a MBR) you should first create a partition ON the drive of at least "iso size) and then write the image to that partition. To see the difference between UN- and floppy partitioned drive, do a dd of block 0 Code:
dd if=/dev/sd<letter> count=1 | hexdump -C |
Quote:
|
All times are GMT -5. The time now is 06:45 PM. |