Score:0

How do I mount/find a second HDD in Ubuntu?

lc flag

Hello there and first off apologies if anything I describe is hard to understand, I'll try to be as clear as possible but I'm still a beginner at using Ubuntu. So off to the question:

I'm using Ubuntu with WLS. It's worked fine for the most part but here's my problem:

I've been doing the Odin Project and reached the boilerplate part. Coding and all that. However I installed Ubuntu on my C: drive while placing my programming projects on D: (C is where I keep all the important stuff such as OS and is just a 120GB SSD while D: is a 1TB HDD)

Now at first I tried using lsblk and it only gave me this:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 256G 0 disk sdb 8:16 0 256G 0 disk /

Which is a bit weird since my SSD is 120. I tried first to just go to the disk D directory but it couldn't find it. So I googled how to add a HDD to Ubuntu and doing sudo lshw -C disk, it asks me for my Sudo PW. I use it, I don't get any errors but I also get nothing showing up. If I run the command again, it just repeats with no error.

I looked it up here and I can use this How to mount/access my second hard drive? however it still only detects a 256GB virtual hdd?

TL:DR I want to be able to access my html coding file via the ubuntu terminal while they are in separate HDDs. Apologies in advance if it sounds confusing and thanks for any help.

Edit:After seeing everyone's answers, I've decided I'll just scrap WSL and use a VM with the OS in it. Seems simpler that way. Thanks for the help anyway.

in flag
lsblk and blkid are what I'd use to spot a new drive.. If its not listen and its a usb drive you can also use lsusb
PonJar avatar
in flag
I’m not an expert on WSL but I doubt that Ubuntu can see the physical hardware in your machine. It’s world is probably limited to the virtual environment specified for it. The 250GB drive you see is probably a dynamic file taking up a few 10’s of GB on your system somewhere. The Linux file structure provides a home directory under which, by design, you store your data. It’s easier to fall in with that design than follow a Windows approach of C: for the system and programs with D: for data. If you prefer that just create a /Data folder and store your stuff there.
lc flag
Lsblk shows the name maj.... line on the initial post. And blkid doesn't have anything showing up. It's a HDD connected to the motherboard with a sata cable. I could go with the approach of making a data folder but my OS SSD only has 24GBs free after all the updates which is why I don't think it'd fix my problem with finding the other drive?
ru flag
WSL won't be able to see the 'host disks' when they're claimed by Windows, and to my knowledge does not allow direct passthrough like Hyper-V can do. Unfortunately, in WSL 2 your Linux/Ubuntu environment is virtualized so it can't see the host drives.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.