Why does fdisk and parted not show same partition table on a fresh bootable usb image












0















I follow the instruction on https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu except I use a SD-card to flash.



When I use fdisk and parted to investigate the result of the flashed SD-card I get two very different results. Both results are very weird:




jarl@hermes:~$ sudo LANG=C fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 1.9 GiB, 2032664576 bytes, 3970048 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: 0x133f436e

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 0 3905279 3905280 1.9G 0 Empty
/dev/mmcblk0p2 3828884 3833811 4928 2.4M ef EFI (FAT-12/16/32)



jarl@hermes:~$ sudo LANG=C parted /dev/mmcblk0
GNU Parted 3.2
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit
Unit? [compact]? b
(parted) print
Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Ignore/Cancel? I
Model: SD SD02G (sd/mmc)
Disk /dev/mmcblk0: 8130658304B
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags:

Number Start End Size File system Name Flags
1 2048B 6143B 4096B Apple
2 1960388608B 1962911743B 2523136B EFI

(parted) q




  1. parted gives a warning (that I don't understand) that fdisk doesn't. Any explanation?


  2. fdisk shows that partition 2 (the EFI one) starts in the middle of partition 1 (ISO image)


  3. parted seem not to show the correct start and end of partition 1


  4. parted seem not to show the correct end of partition 2


Can anyone explain the above differences? I belive that parted is quite buggy, and that fdisk information is correct, but then again it shows overlapping partitions.










share|improve this question


















  • 1





    I do not think you are seeing standard partitions. Most of the installers now use dd or dd under the hood to create flash drive installers. And that is a hybrid DVD/flash drive image, not a standard partitioned drive with installer. If you have and only want UEFI you can create your own. UEFI only USB key, just extract ISO ( 7 zip or similar) to FAT32 formatted flash drive partition & set boot flag. askubuntu.com/questions/395879/… If you want to reuse flash drive: help.ubuntu.com/community/mkusb#Re-use_the_pendrive

    – oldfred
    Jan 5 at 16:02











  • Thank you @oldfred. Very informative answer. Thank you very much for the links

    – Jarl
    Jan 7 at 7:57
















0















I follow the instruction on https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu except I use a SD-card to flash.



When I use fdisk and parted to investigate the result of the flashed SD-card I get two very different results. Both results are very weird:




jarl@hermes:~$ sudo LANG=C fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 1.9 GiB, 2032664576 bytes, 3970048 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: 0x133f436e

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 0 3905279 3905280 1.9G 0 Empty
/dev/mmcblk0p2 3828884 3833811 4928 2.4M ef EFI (FAT-12/16/32)



jarl@hermes:~$ sudo LANG=C parted /dev/mmcblk0
GNU Parted 3.2
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit
Unit? [compact]? b
(parted) print
Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Ignore/Cancel? I
Model: SD SD02G (sd/mmc)
Disk /dev/mmcblk0: 8130658304B
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags:

Number Start End Size File system Name Flags
1 2048B 6143B 4096B Apple
2 1960388608B 1962911743B 2523136B EFI

(parted) q




  1. parted gives a warning (that I don't understand) that fdisk doesn't. Any explanation?


  2. fdisk shows that partition 2 (the EFI one) starts in the middle of partition 1 (ISO image)


  3. parted seem not to show the correct start and end of partition 1


  4. parted seem not to show the correct end of partition 2


Can anyone explain the above differences? I belive that parted is quite buggy, and that fdisk information is correct, but then again it shows overlapping partitions.










share|improve this question


















  • 1





    I do not think you are seeing standard partitions. Most of the installers now use dd or dd under the hood to create flash drive installers. And that is a hybrid DVD/flash drive image, not a standard partitioned drive with installer. If you have and only want UEFI you can create your own. UEFI only USB key, just extract ISO ( 7 zip or similar) to FAT32 formatted flash drive partition & set boot flag. askubuntu.com/questions/395879/… If you want to reuse flash drive: help.ubuntu.com/community/mkusb#Re-use_the_pendrive

    – oldfred
    Jan 5 at 16:02











  • Thank you @oldfred. Very informative answer. Thank you very much for the links

    – Jarl
    Jan 7 at 7:57














0












0








0


1






I follow the instruction on https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu except I use a SD-card to flash.



When I use fdisk and parted to investigate the result of the flashed SD-card I get two very different results. Both results are very weird:




jarl@hermes:~$ sudo LANG=C fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 1.9 GiB, 2032664576 bytes, 3970048 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: 0x133f436e

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 0 3905279 3905280 1.9G 0 Empty
/dev/mmcblk0p2 3828884 3833811 4928 2.4M ef EFI (FAT-12/16/32)



jarl@hermes:~$ sudo LANG=C parted /dev/mmcblk0
GNU Parted 3.2
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit
Unit? [compact]? b
(parted) print
Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Ignore/Cancel? I
Model: SD SD02G (sd/mmc)
Disk /dev/mmcblk0: 8130658304B
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags:

Number Start End Size File system Name Flags
1 2048B 6143B 4096B Apple
2 1960388608B 1962911743B 2523136B EFI

(parted) q




  1. parted gives a warning (that I don't understand) that fdisk doesn't. Any explanation?


  2. fdisk shows that partition 2 (the EFI one) starts in the middle of partition 1 (ISO image)


  3. parted seem not to show the correct start and end of partition 1


  4. parted seem not to show the correct end of partition 2


Can anyone explain the above differences? I belive that parted is quite buggy, and that fdisk information is correct, but then again it shows overlapping partitions.










share|improve this question














I follow the instruction on https://tutorials.ubuntu.com/tutorial/tutorial-create-a-usb-stick-on-ubuntu except I use a SD-card to flash.



When I use fdisk and parted to investigate the result of the flashed SD-card I get two very different results. Both results are very weird:




jarl@hermes:~$ sudo LANG=C fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 1.9 GiB, 2032664576 bytes, 3970048 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: 0x133f436e

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 0 3905279 3905280 1.9G 0 Empty
/dev/mmcblk0p2 3828884 3833811 4928 2.4M ef EFI (FAT-12/16/32)



jarl@hermes:~$ sudo LANG=C parted /dev/mmcblk0
GNU Parted 3.2
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit
Unit? [compact]? b
(parted) print
Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.
Ignore/Cancel? I
Model: SD SD02G (sd/mmc)
Disk /dev/mmcblk0: 8130658304B
Sector size (logical/physical): 2048B/512B
Partition Table: mac
Disk Flags:

Number Start End Size File system Name Flags
1 2048B 6143B 4096B Apple
2 1960388608B 1962911743B 2523136B EFI

(parted) q




  1. parted gives a warning (that I don't understand) that fdisk doesn't. Any explanation?


  2. fdisk shows that partition 2 (the EFI one) starts in the middle of partition 1 (ISO image)


  3. parted seem not to show the correct start and end of partition 1


  4. parted seem not to show the correct end of partition 2


Can anyone explain the above differences? I belive that parted is quite buggy, and that fdisk information is correct, but then again it shows overlapping partitions.







boot partitioning fdisk parted






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 5 at 14:09









JarlJarl

1376




1376








  • 1





    I do not think you are seeing standard partitions. Most of the installers now use dd or dd under the hood to create flash drive installers. And that is a hybrid DVD/flash drive image, not a standard partitioned drive with installer. If you have and only want UEFI you can create your own. UEFI only USB key, just extract ISO ( 7 zip or similar) to FAT32 formatted flash drive partition & set boot flag. askubuntu.com/questions/395879/… If you want to reuse flash drive: help.ubuntu.com/community/mkusb#Re-use_the_pendrive

    – oldfred
    Jan 5 at 16:02











  • Thank you @oldfred. Very informative answer. Thank you very much for the links

    – Jarl
    Jan 7 at 7:57














  • 1





    I do not think you are seeing standard partitions. Most of the installers now use dd or dd under the hood to create flash drive installers. And that is a hybrid DVD/flash drive image, not a standard partitioned drive with installer. If you have and only want UEFI you can create your own. UEFI only USB key, just extract ISO ( 7 zip or similar) to FAT32 formatted flash drive partition & set boot flag. askubuntu.com/questions/395879/… If you want to reuse flash drive: help.ubuntu.com/community/mkusb#Re-use_the_pendrive

    – oldfred
    Jan 5 at 16:02











  • Thank you @oldfred. Very informative answer. Thank you very much for the links

    – Jarl
    Jan 7 at 7:57








1




1





I do not think you are seeing standard partitions. Most of the installers now use dd or dd under the hood to create flash drive installers. And that is a hybrid DVD/flash drive image, not a standard partitioned drive with installer. If you have and only want UEFI you can create your own. UEFI only USB key, just extract ISO ( 7 zip or similar) to FAT32 formatted flash drive partition & set boot flag. askubuntu.com/questions/395879/… If you want to reuse flash drive: help.ubuntu.com/community/mkusb#Re-use_the_pendrive

– oldfred
Jan 5 at 16:02





I do not think you are seeing standard partitions. Most of the installers now use dd or dd under the hood to create flash drive installers. And that is a hybrid DVD/flash drive image, not a standard partitioned drive with installer. If you have and only want UEFI you can create your own. UEFI only USB key, just extract ISO ( 7 zip or similar) to FAT32 formatted flash drive partition & set boot flag. askubuntu.com/questions/395879/… If you want to reuse flash drive: help.ubuntu.com/community/mkusb#Re-use_the_pendrive

– oldfred
Jan 5 at 16:02













Thank you @oldfred. Very informative answer. Thank you very much for the links

– Jarl
Jan 7 at 7:57





Thank you @oldfred. Very informative answer. Thank you very much for the links

– Jarl
Jan 7 at 7:57










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1107192%2fwhy-does-fdisk-and-parted-not-show-same-partition-table-on-a-fresh-bootable-usb%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1107192%2fwhy-does-fdisk-and-parted-not-show-same-partition-table-on-a-fresh-bootable-usb%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Mouse cursor on multiple screens with different PPI

Agildo Ribeiro

Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”