PDA

View Full Version : [SOLVED] Mounting external USB disk from Mybook using Ubuntu 22.04 virtualbox VM on Win10 host



vjekobalas
January 6th, 2023, 07:26 PM
What can I do to mount and copy data from a disk which was previously
in a WD Mybook Live ?

I had to remove the disk from MyBook Live as the network copy became
extremely slow / saw a brown spot on the Mybook Live pcb when I removed the disk).

The disk is connected to my pc as a USB drive (via a SCYTHE sata->USB "adapter").
Win10 is host OS and Ubuntu 22.04 is guest OS to which I have tried to mount the drive.
The drive is /dev/sdf as can be seen from

sudo lsblk

loop6 7:6 0 400,8M 1 loop /snap/gnome-3-38-2004/112
loop7 7:7 0 45,9M 1 loop /snap/snap-store/599
loop8 7:8 0 91,7M 1 loop /snap/gtk-common-themes/1535
loop9 7:9 0 45,9M 1 loop /snap/snap-store/638
loop10 7:10 0 49,6M 1 loop /snap/snapd/17883
loop11 7:11 0 284K 1 loop /snap/snapd-desktop-integration/14
loop12 7:12 0 304K 1 loop /snap/snapd-desktop-integration/43

sda 8:0 0 25G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 513M 0 part /boot/efi
└─sda3 8:3 0 24,5G 0 part /var/snap/firefox/common/host-hunspell

/

sdb 8:16 1 0B 0 disk
sdc 8:32 1 0B 0 disk
sdd 8:48 1 0B 0 disk
sde 8:64 1 0B 0 disk

sdf 8:80 0 931,5G 0 disk
├─sdf1 8:81 0 1,9G 0 part
├─sdf2 8:82 0 1,9G 0 part
├─sdf3 8:83 0 489M 0 part
└─sdf4 8:84 0 927,2G 0 part

sr0 11:0 1 50,5M 0 rom /media/username/VBox_GAs_7.0.4

If I look at GUI files view, I can see the USB disk (marked as 996 GB Volume)
If I try to mount it, I get the error:
"Unable to access "996 GB Volume"
Error mounting /dev/sdf4 at /media/username/number: wrong fs type,bad option,bad superblock
on / dev/sdf4, missing codepage or helper program, or other error.


I found this link referring to blocksize:
https://kevrocks67.github.io/blog/accessing-data-from-wd-my-book-live-hdd.html

oldfred
January 6th, 2023, 07:35 PM
Is format NTFS?
Windows fast start up may have set hibernation flag preventing normal mount.
It can be force mounted read only from terminal, but best to turn off fast start up in Windows.

Post this in question above (-e 7 to exclude snaps):
lsblk -e 7 -f

vjekobalas
January 6th, 2023, 10:15 PM
As far as I could understand from from googling, the format is ext4 (or is that for the OS partitions/not sure)
All I can say is if I plug the USB disk in pc, with Win10 host only running, I see two drives in Win10 but can't open either.
Once I start the Ubuntu VM, the disks disappear from Win10 and the one USB disk is visible in Ubuntu GUI
and I can't mount it with reason described in the message.

I think hibernation is turned off in Win10 as I split the Win10 disk into two partitions a few days ago
and turned it off as one possible cause of not being able to reduce size of Win10 partition enough.


Output for lsblk -e 7 -f:


AME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS

sda
├─sda1

├─sda2
│ vfat FAT32 FEDD-D067 506,7M 1% /boot/efi
└─sda3

ext4 1.0 8b1027f1-b30a-4989-b297-f1c94e7335f9 9,7G 54% /var/snap/firefox/common/host-hunspell

/
sdb
sdc
sdd
sde
sdf

sr0 iso966 Jolie VBox_GAs_7.0.4

2022-11-16-17-05-17-10 0 100% /media/username/VBox_GAs_7.0.4

MAFoElffen
January 7th, 2023, 12:13 AM
@oldfred

This is a Virtualization question. With Windows 10 running VirtualBox and trying to temporarily mount USB to an Ubuntu VM Guest.

I am sure that there is an option in the VirtualBox VM window menu to connect USB devices... But I haven't used VirtualBox for almost a decade.

I am sure there are VirtualBox Users in the Virtualization Section that can answer this question in an instant.

I'm thinking something like this:
https://www.linuxbabe.com/virtualbox/access-usb-from-virtualbox-guest-os
...but it might be even simpler by a window menu option for something temporary.

EDIT: I know 3 different ways to do this from KVM... LOL

tea for one
January 7th, 2023, 12:54 PM
Why not remove the obstacles of Windows 10 host and Ubuntu Guest?
Have you tried to access the drive via a live Ubuntu session?

Error mounting /dev/sdf4 at /media/username/number: wrong fs type,bad option,bad superblock
on / dev/sdf4, missing codepage or helper program, or other error.
The above message may still appear but, possibly, easier to diagnose?

MAFoElffen
January 7th, 2023, 08:15 PM
Is the VirtualBox Extension Pack installed? By default VB only supports USB 1.0. With the extension Pack it supports USB 2.0 and 3.x.

vjekobalas
January 19th, 2023, 10:06 AM
I installed Ventoy with Ubuntu 22.04 .iso on a USB disk drive and used Ubuntu in live mode with the
hard disk in question connected again as a USB drive (via a SCYTHE sata->USB "adapter").

The result is the same - the disc is visible but can't mount it and get the following error:

Unable to access "996 GB Volume"
Error mounting /dev/sdc4 at /media/ubuntu/.........: wrong fs type, bad option,
bad superblock on /dev/sdc4, missing code page or helper program, or other error

tea for one
January 19th, 2023, 02:23 PM
Assuming that your file system is ext4 (as mentioned in post 3), this info should help:-
https://www.cyberciti.biz/faq/recover-bad-superblock-from-corrupted-partition/
I know the instructions are old but I'm pretty sure that they are valid for ext4.
You may need elevated (sudo) privileges now.

ActionParsnip
January 19th, 2023, 03:00 PM
Windows can't read Ext4. I suggest you boot to a USB stick with Ubuntu on it and read the data that way.

Secondary question, is there no backup of the data? If not......why not?

vjekobalas
January 19th, 2023, 05:55 PM
Thanks, will try that out.

vjekobalas
February 5th, 2023, 11:14 AM
Trying the suggestions above the furthest I could get was to
see the directories and "?" in the permission fields for the drive and
still unable to mount or access.

I felt I was a bit out of my league in Linux to go further so I
tried using Photorec to try to recover the files but after 3 days running,
saw what was recovered was garbage (small bits and pieces of text
and corrupt images/videos.

In the name of learning, was wondering if anyone else has any
ideas on how to proceed otherwise, I'll call it a day with the data
on that disk and format it for further use.

DuckHook
February 6th, 2023, 12:39 AM
The fact that you can now see the directories is encouraging and means that you are closer to the end zone than you may think.

Directories with a string of ?s in the permission fields mean that you have the wrong permissions to see those directories. However, the mere act of their displaying themselves to you means that they are accessible. It's just a matter of using the right user ID to see them.

Others have suggested that you try reading them as root. That is to say, instead of simply:
ls -laH…preface that command with sudo. That may be all it takes.

PS. Photorec is strong medicine. It may not be necessary in this case. Proceed on a least harm basis by trying to read those directories with sudo first. If that doesn't work (they aren't owned by root) then chown them into the UID:GID that corresponds to yours (usually 1000:1000). Then try accessing the files.

vjekobalas
February 26th, 2023, 11:10 PM
While trying to make headway via instructions in post #8, I
could conclude that it was 64K block size ext4 and
via this web page :
https://n-dimensional.de/blog/2012/05/01/wd-mybook-live-data-rescue/
I found debugfs(8) could be used, with which I was able to
rescue what was relevant from the disk.

DuckHook
February 27th, 2023, 07:28 AM
Congratulations on finding your solution. And thanks for returning to this thread and sharing it.

It's an awesome one and well worth the read.

Good Luck and Happy Ubuntu-ing!