
Wrong information being reported using fdisk command
Wrong information being reported using fdisk command
I am a beginner to Linux and currently taking a class in it. I am using Slackware 15 Linux with VirtualBox 7.0. I was watching the instructor step for step using fdisk and related commands. However, I noticed my fdisk pick up my host computer storage instead of the USB. The lsblk command results are correct but fdisk is reporting my host computer information. I don't have a clue why. I restarted the VM and removed the USB (formatted it in case)..... the same issue. I attached a picture of it. The USB is an older 2GB generic one. Any help would be greatly appreciated. 

- Attachments
-
- Screenshot 2023-09-30 210641.png (94.78 KiB) Viewed 4892 times
-
- Site Moderator
- Posts: 39156
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: Wrong information being reported using fdisk command
If a tool is reporting info about the host then you are running the tool on the host. I see nothing in your screenshot to indicate that you were running in a VM.
Also I'm puzzled by your "instead of the USB". What USB? A VM will not see any host drives, the drives you see are virtual SATA drives.
Also I'm puzzled by your "instead of the USB". What USB? A VM will not see any host drives, the drives you see are virtual SATA drives.
-
- Volunteer
- Posts: 5402
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Wrong information being reported using fdisk command
Whatever you did, /dev/sdb has no partition table. The shown Start and Sectors values of /dev/sdb1 are an interpretation of the byte sequence "0x65 0x79 0x20 0x74 0x6f 0x20 0x72 0x65", which is an ASCII text fragment: "ey to re".
Re: Wrong information being reported using fdisk command
In the class, our instructor had us install Slackware 15 into a VM (so if we messed it up we could go back to a snapshot) instead of a bare metal install. I connected a simple 2 GB generic thumb drive and then passed it through from the host to VM Virtualbox. When I used the command lsblk in the VM Linux. It shows the proper size of 1.9 G for the thumbdrive, but no partition (which I formatted to FAT32). What confuses me is that fdisk command returns 3 partitions for over 811 GB.mpack wrote: ↑1. Oct 2023, 11:31 If a tool is reporting info about the host then you are running the tool on the host. I see nothing in your screenshot to indicate that you were running in a VM.
Also I'm puzzled by your "instead of the USB". What USB? A VM will not see any host drives, the drives you see are virtual SATA drives.
I really do appreciate the assistance fth0 and mpack.
Attached is my host computer partitions.

- Attachments
-
- Screenshot 2023-10-01 103241.png (70.62 KiB) Viewed 4839 times
Re: Wrong information being reported using fdisk command
After you mention that ... I checked the hex of the USB drive and found the hex sequence.

- Attachments
-
- Screenshot 2023-10-01 104409.png (86.09 KiB) Viewed 4836 times
-
- Volunteer
- Posts: 5402
- Joined: 14. Feb 2019, 03:06
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Linux, Windows 10, ...
- Location: Germany
Re: Wrong information being reported using fdisk command
This is a MSDOS 5.0 boot sector. You've formatted the USB stick with a single FAT32 filesystem without any partitioning (MBR/GPT). This is the normal use case for small USB sticks, since you usually don't want to split the 2 GB into multiple partitions. In consequence, there's nothing for fdisk to work with.
Re: Wrong information being reported using fdisk command
Ok, now that makes sense. Thank you fth0! It's a good morning when I get to learn something new. Have a great Sunday!fth0 wrote: ↑1. Oct 2023, 17:02 This is a MSDOS 5.0 boot sector. You've formatted the USB stick with a single FAT32 filesystem without any partitioning (MBR/GPT). This is the normal use case for small USB sticks, since you usually don't want to split the 2 GB into multiple partitions. In consequence, there's nothing for fdisk to work with.