MountingWindowsPartitions

Revision 10 as of 2006-06-05 23:51:29

Clear message

Introduction

  • It is recommended, if possible, that the windows supported partition that you mount and intend to use under ubuntu be FAT32. The reason for this is that NTFS is currently not as well supported under Ubuntu due to the secretivie nature and lack of documentation on the NTFS architecture. If you have an NTFS partition with data you can convert it to FAT32 using Partition Magic (use at own risk).

Instructions

  • Create a mount point (directory) from where the partition will be accessed. Default for Ubuntu is to create all filesystem mount points in the /media directory.

    mkdir /media/partitionname
  • Mount the right partition to this mount point. Partitions are all found under /dev, and are labeled hd (common harddisk) or sd (SCSI or SATA harddisk) plus a, b, etc for the physical harddisk number, plus 1, 2, etc for the partition-number. On a multiboot system, the Windows C-partition can commonly found as /dev/hda1.

    • FAT partitions can be mounted with

      sudo mount /dev/hda1 /media/partitionname -t vfat -o iocharset=utf8,umask=000
    • NTFS partitions can be mounted with

      sudo mount /dev/hda1 /media/partitionname -t ntfs -o nls=utf8,umask=0222
      Note that you can only read from NTFS partitions, not write to them.
  • To automatically mount partitions at boot-up, edit the file /etc/fstab and add the following line for each:
    • FAT partition:

      /dev/hda1       /media/partitionname  vfat    iocharset=utf8,umask=000   0       0
    • NTFS partitions:

      /dev/hda1       /media/partitionname  ntfs    nls=utf8,umask=0222 0       0
  • Two additional parameters for vfat partitions, that you will not often see suggested, are "shortname=mixed" and "uid=1000,gid=1000". The first will take care that all-caps short filenames show up in all-caps instead of in small characters. The second will take care that you are the owner of all files on the vfat partition, this will allow you to maintain file modification date/time when copying files to the vfat partition.
  • As superuser, enter

    mount -a
    to (re)mount all the partitions.

Also (Comments)

If you need to uninstall ubuntu for any reason and boot into windows in less than 15 minutes use this tip. Taken from http://www.ubuntuforums.org/showthread.php?t=113630 by scole

Well, not many of you would want to do this but about a week ago I was reading a forum post that had someone ask how do you uninstall Ubuntu? I was left wondering because so few people would want to do it. But, I found an easier way than deleting partitions blindly and rewriting a windows mbr which is no fun at all. To do this you need to be in windows (its an exe) download this file http://www.terabyteunlimited.com/bootitng.html You do not need to buy it. Just scroll to the bottom to download from their link. When downloaded run the exe in there. You then may make a bootable floppy or cd your choice. This puts the program on you choice of media so your ready to go. (the cd option makes a cd .iso so you will need a program to burn it.) Both the floppy and cd contain the same program. Next you will restart your computer with the cd or floppy in the drive. Once you boot into the program do not install it to your HDD. Just click cancel to just run it off the cd or floppy. Then go to partion work. Click the oval on the left side of the window (yes you can use your mouse!) to go to your primary hdd. Select and delete every partition except for your standard windows partition. Now you should have a formatless partion that says free space after it. Then select your windows partion and click resize. It will run an error check which may take a while depending on your partion size. Once that finishes type in the largest size in the prompt unless you have other plans for some of that space . Once you do that it will allocate all that space back to your primary partion. Next, if you installed grub the bootloader you will need to reset you mbr or else you can't boot up because grub will crash. To do this select you windows partion go to view mbr on the left. When in there select your windows partion and click std mbr. This will take grub off and set your mbr back to the way it was before. Click apply and the changes will be made. Then eject your media and use the file option at the top left to reboot. Your computer should restart normally into windows . You just uninstalled Ubuntu. This saved you so much pain. You would have had to rewrite the mbr by hand to do this the other way and then have had to figure out a way to delete the linux partions. It is not a bad idea to back your stuff up before doing this because stuff happens and you don;t wanna lose everything. Hope this helps you.

Note: Also never ever try to do this when windows xp is in hibernation mode or any other mode that would change any boot settings, you will corrupt you partition. After you start up sucessfully, you may do anything else you want to.


CategoryDocumentation CategoryCleanup