LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-30-2008, 07:18 PM   #1
raphtor
Member
 
Registered: Aug 2008
Location: india
Posts: 174

Rep: Reputation: 30
hard disk accessing problem in hardy


i had windows XP installed on my 60GB harddisk.i recently installed hardy on my machine using "install in windows" option in the c: drive which occuped 15GB.i was hoping to see the remaining 45GB accessible to both OS.however after installation the ubuntu OS shows only 5GB free and no partitions in filesystem/media.how can i gain access to my 80% harddisk?


during the process of installation it never prompted for any darddisk patition specifications.
what should i do?
 
Old 12-31-2008, 07:27 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
OK, I've never dealt with an "install in Windows" installation. I am hoping there are no differences from a regular installation except for where it lives. In particular I am hoping it accesses the disk in the same way. I am not surprised it didn't prompt you for any partitioning since one of the purposes of that type of installation is to avoid changing partitions.

So clue me in on a couple things here ... Am I correct that you can see what MS calls the "C drive" from within Ubuntu? How is that mounted (i.e. what path do you use to "view" it). Do I understand correctly that the remaining 45 GB of your hard drive is still unpartitioned?

If the rest of the disk is unpartioned, you are going to have to partition it and install filesystem(s) ("format it" in Micrososft lingo) before you can use it. You should be able to do that with GParted. There should also be some comand line tools if you are more comfortable with that. You will have to determine what kind of filesystem(s) to add and whether you want just one additional partition or several. It is my understanding that you can now read/write to NTFS from Linux and that you can read/write ext3 from MS Windows even though I have never done either.

If you alread have a large portion of your disk that is unpartitioned, you might want to consider doing just a regular installation of Ubuntu rather than an installation from "within Windows." With the empty space you won't need to resize your Micrososft partition and you are planning on doing partitioning anyway. If you wish, you could use just a portion of the 45GB for Ubuntu and partition the rest any way you want. I think if you choose "custom installation" (or something like that) the (regular) installer will let you use GParted to partition the disk. Or you can partition it while running the install disk as a live CD before you start installation.
 
Old 12-31-2008, 09:45 PM   #3
raphtor
Member
 
Registered: Aug 2008
Location: india
Posts: 174

Original Poster
Rep: Reputation: 30
i think this is what u were asking:
1)the 60 GB disk is windows partitioned (NTFS) into c: drive of 15GB,E: of 20GB and F: of 25 GB.
2)no unused disk space is still left for partioning.
3)for windows files i have to go via filesystem/host.this is where i find ubuntu and "program files of windows" coexisting.
4)and i believe i am only able to access only the c: partition rather than the entire hard disk.
 
Old 01-01-2009, 06:16 AM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by raphtor View Post
i think this is what u were asking:
Yes it is. Thanks.

Please post everything you see when you open

Places -> Computer
 
Old 01-01-2009, 06:44 AM   #5
raphtor
Member
 
Registered: Aug 2008
Location: india
Posts: 174

Original Poster
Rep: Reputation: 30
cdrom0 cdrom1 filesystem
 
Old 01-01-2009, 06:58 AM   #6
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
OK.

Go to Accessories -> Applications -> Terminal

and type in the following commands and post (using copy/paste) what the results are:

Code:
mount
sudo fdisk -l
ls /mnt
ls /media
 
Old 01-01-2009, 05:57 PM   #7
raphtor
Member
 
Registered: Aug 2008
Location: india
Posts: 174

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by blackhole54 View Post
OK.

Go to Accessories -> Applications -> Terminal

and type in the following commands and post (using copy/paste) what the results are:

Code:
mount
sudo fdisk -l
ls /mnt
ls /media

here the output:


harsha@harsha-laptop:~$ mount
/host/ubuntu/disks/root.disk on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.24-16-generic/volatile type tmpfs (rw)
/host/ubuntu/disks/boot on /boot type none (rw,bind)
securityfs on /sys/kernel/security type securityfs (rw)
gvfs-fuse-daemon on /home/harsha/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=harsha)

harsha@harsha-laptop:~$ sudo fdisk -l
Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1912 15358108+ 7 HPFS/NTFS
/dev/sda2 1913 7295 43238947+ f W95 Ext'd (LBA)
/dev/sda5 1913 4462 20482843+ e W95 FAT16 (LBA)
/dev/sda6 4463 7295 22756041 e W95 FAT16 (LBA)


harsha@harsha-laptop:~$ ls /mnt

harsha@harsha-laptop:~$ ls /media
cdrom cdrom0

Last edited by raphtor; 01-02-2009 at 07:28 AM.
 
Old 01-02-2009, 10:18 AM   #8
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Are "E drive" and "F drive" formatted FAT rather than NTFS? The fdisk output suggests they are FAT16, although this is not conclusive. If they are formmated FAT16 I believe you will only be able to access 2GB of information on each (despite the fact that the partitions themselves are much larger.)

Any way try these commands:

Code:
sudo mkdir /media/drive_E
sudo mkdir /media/drive_F
sudo mount -o dmask=000,fmask=111 /dev/sda5 /media/drive_E
sudo mount -o dmask=000,fmask=111 /dev/sda6 /media/drive_F
The first two commands create directories where we try to "mount" your two partitions with the last two commands. You can use other names in place of "drive_E" and "drive_F" if you wish. If either/both of the mount commands give errors, please post them. If there are no errors, then (hopefully) the two partitions are available for reading and writing by all users (we can change that if you wish). They might show up in

Places -> Computer

If not, look for them in

Places -> Computer -> Filesystem

and click on the folder called media.

If this works as hoped, then we can modify your /etc/fstab file such that they will be automatically mounted each time you boot. In preparation for that, would you please post the current contents of /etc/fstab?
 
Old 01-02-2009, 08:53 PM   #9
raphtor
Member
 
Registered: Aug 2008
Location: india
Posts: 174

Original Poster
Rep: Reputation: 30
no before i installed hardy using wubi,all my windows partions were NTFS formatted.the commands you gave have prompted for the filesystem type.should i type NTFS or fat16 as shown?and where should i add it in the command?is there a chance after installation hardy changes type of filesystem?


heres the output:
harsha@harsha-laptop:~$ sudo mkdir /media/drive_E
[sudo] password for harsha:
harsha@harsha-laptop:~$ sudo mkdir /media/drive_F
harsha@harsha-laptop:~$ sudo mount -o dmask=000,fmask=111 /dev/sda5 /media/drive_E
mount: you must specify the filesystem type
harsha@harsha-laptop:~$ sudo mount -o dmask=000,fmask=111 /dev/sda6 /media/drive_F
mount: you must specify the filesystem type
harsha@harsha-laptop:





CURRENT CONTENTS OF fstab:
# /etc/fstab: static file system information.
#
# -- This file has been automaticly generated by ntfs-config --
#
# <file system> <mount point> <type> <options> <dump> <pass>

proc /proc proc defaults 0 0
/host/ubuntu/disks/root.disk / ext3 loop,errors=remount-ro 0 1
/host/ubuntu/disks/boot /boot none bind 0 0
/host/ubuntu/disks/swap.disk none swap loop,sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/sda1 /media/harsha ntfs-3g defaults,locale=en_US.UTF-8 0 0

Last edited by raphtor; 01-02-2009 at 08:55 PM.
 
Old 01-03-2009, 08:12 AM   #10
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by raphtor View Post
no before i installed hardy using wubi,all my windows partions were NTFS formatted.the commands you gave have prompted for the filesystem type.
Well, as I said, the output of fdisk is not conclusive in this regard. It gives us a "type" that has been assigned to the partition but doesn't actually tell what filesystem is installed on the partition. Lets proceed with the assumption they contain NTFS. (That's why I asked you. )

I consulted several sources in deciding how to proceed. I'll tell what they were so you can follow along in the thought process if you wish.

The first was the following line from your fstab file which already mounts "the C drive":

Code:
 /dev/sda1 /media/harsha ntfs-3g defaults,locale=en_US.UTF-8 0 0
Another was this documentation page from the Ubuntu website. You might find it interesting to take a look at.

I also looked at the following two pages for information about ntfs-3g permisions and mount options.
http://pagesperso-orange.fr/b.andre/...d-ntfs-3g.html
http://pagesperso-orange.fr/b.andre/permissions.html

Those last two pages are a little more advanced so feel free to skip them. Or not.


So to proceed with the manual tests, I would suggest trying:

Code:
sudo mount -t ntfs-3g -o dmask=000,fmask=111,locale=en_US.UTF-8 /dev/sda5 /media/drive_E
sudo mount -t ntfs-3g -o dmask=000,fmask=111,locale=en_US.UTF-8 /dev/sda6 /media/drive_F
You can change locale=en_US.UTF-8 to what is appropriate for your location, if you know what it is. (This is apparently used to decide which Unicode characters are permissble in the NTFS file names.)

If this seems to work to your satisfaction, you can add the following lines to /etc/fstab. (I'll tell you how below.)

Code:
/dev/sda5     /media/drive_E         ntfs-3g       dmask=000,fmask=111,locale=en_US.UTF-8        0         0
/dev/sda6     /media/drive_F         ntfs-3g       dmask=000,fmask=111,locale=en_US.UTF-8        0         0
I've spaced the above out so the fields are obvious. If it is feasible, I suggest trying to line up the columns with what is already in the file to keep the file readable. Again, you can change the locale string if you wish. You can even change the locale string in the line that already exists.

For editing fstab, I am pretty much going to follow the instructions in that first link I gave above. /etc/fstab is a system file and cannot be edited by regular users. Therefore you are going to use sudo and gksudo to gain root (administrator) privilege.

When editing system files it is always a good idea to backup the original file in case you make an error or something goes wrong. That way you can always get back to where you started. The commands below are typed into a terminal like you did before.

To backup /etc/fstab:

Code:
sudo cp -p /etc/fstab /etc/fstab.orig
You can choose whatever editor you are comfortable with. I am going to illustrate with gedit . If you wish to use a different editor, just substitute its name for gedit.

Code:
gksudo gedit /etc/fstab
If you prefer a command line text editor (e.g., vi), use sudo instead of gksudo.

After editing and saving the file, then the next time you boot the machine the partitions should already be mounted for you.



For future reference you might wish to look at the comment about "code tags" in my signature.
 
Old 01-03-2009, 11:21 AM   #11
raphtor
Member
 
Registered: Aug 2008
Location: india
Posts: 174

Original Poster
Rep: Reputation: 30
yeah it worked.thanks for ur patience and time.

Last edited by raphtor; 01-03-2009 at 10:23 PM.
 
  


Reply

Tags
partition


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hardy install doesn't find hard disk baskerville Ubuntu 9 07-02-2008 08:14 PM
Open Suse : Problem accessing hard disk drive hercules.bravo Linux - Hardware 1 09-27-2007 05:26 AM
accessing hard disk carthyc Linux - General 2 08-24-2006 03:45 AM
What's accessing the hard disk? rosslaird Linux - Software 10 10-07-2003 11:33 AM
Accessing a second hard disk martinpanda Linux - General 9 03-11-2002 10:07 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration