LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot access sda1 through command prompt. (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-access-sda1-through-command-prompt-873614/)

noby950 04-07-2011 11:56 AM

Cannot access sda1 through command prompt.
 
I am trying to access another partition on my drive through the command prompt. I have tried to access it through the /dev directory but when I input "cd ./sda1" or "cd /sda1" it says no such file or directory. Help with this will be greatly appreciated.

jmc1987 04-07-2011 12:18 PM

you can't just cd into /dev/(harddrive) You have to mount the harddrive then you can cd to it. for example

# mkdir /mnt/sda1
# mount -t auto /dev/sda1 /mnt/sda1
# cd /mnt/sda1

Now the file you mount your harddrive does not have to be sda1 i can be anything you want it to be.

Incase sda1 don't mount because it does not exist try

# fdisk -l

See if you can figure it out from here.

noby950 04-07-2011 01:08 PM

Alright I got the partition to mount and now I'm able to look at the contents with the "ls" command. Now my trouble is that I cannot change my directory to one inside the partition. Specifically the "WINDOWS" folder. My ultimate goal is to access the SAM file in "WINDOWS/System32/config".

EDDY1 04-07-2011 01:35 PM

Windows usually creates 2 partitions try mounting sda2.

noby950 04-07-2011 01:45 PM

Yeah I made a typo in my original post. I have mounted sda2 and i can see WINDOWS when I use the "ls" command. When I try to switch to the directory it says the directory doesn't exist.

TobiSGD 04-07-2011 01:56 PM

Please give us the exact command you use to switch to the directory.

noby950 04-07-2011 02:02 PM

cd /mnt/sda2
cd /Windows OR cd ./Windows

The first command successfully got me to /mnt/sda2 but I can't get to the WINDOWS folder.

TobiSGD 04-07-2011 02:04 PM

If the folder is named WINDOWS, you should try cd WINDOWS, in Linux file-handling is case-sensitive.

noby950 04-07-2011 02:11 PM

Alright I found my problem. My problem was that i was adding a "/" before the Windows in "cd Windows".

Thanks for your help guys it was much appreciated.


All times are GMT -5. The time now is 08:07 AM.