Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am running kubuntu 11.04. I installed it in a dual-boot scenario on a single drive, with Windows XP installed first. The XP installation is fubar so I now would like to use the space in kubuntu.

I formatted the old partition in gparted and upon trying to access it in a file manager I got the following error:

An error occurred while accessing 'space', the system responded: org.freedesktop.UDisks.Error.Inhibited: Daemon is inhibited

I am assuming this error is linked to the fact that the partition doesn't have a mount point, but I may well be wrong. I'd just like to have the filesystem set up so that a folder of my specification is using that drive exclusively (e.g. /home/user/files). From what I understand about mount points, I should be able to do that. I am hoping my changing of this drive won't have anything to do with booting or be system-critical. Is this possible? My drive layout looks like this:

/dev/sda1    ext3    90.76 GiB    this is where the xp installation was located
/dev/sda2    ext3    19.53 GiB    lunix
/dev/sda3    swap    1.49 GiB
unallocated           2.49 MiB

Any help in this would be greatly appreciated, as I am running pretty low on drive space!

Thanks

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Just mount them on the folder you want, that won't affect booting or anything dangerous.

First make sure your destination folder ("mount point") exists. You may have to create the folder /path/to/mount/point.

Then mount the drive there using the mount command in a terminal (as root):

mount /dev/sda1 /path/to/mount/point

You may have to change permissions on the folder before you can use it as a normal user:

chown -R your_user_name /path/to/mount/point

When you are satisfied with the setup, edit /etc/fstab to make the system mount the partition automatically. Add the following line:

/dev/sda1    /path/to/mount/point    ext3    defaults,noatime    0    0

Refer to man mount for more information and options.

share|improve this answer

Assuming your Linux partition is directly in front of the Windows XP partition, you can just resize it to encompass both partitions and then run resize2fs on it to have it grow to the larger size of the partition. It's hard to tell if this is the case without seeing the output of fdisk -l /dev/sda. The numbers associated with sda (i.e. sda1) do not necessarily imply the physical order of the partitions, but usually do.

More likely, it appears the case is that the Windows XP partition is first on the disk. In this case, it is a little trickier as you will need to copy the data to the first partition. You will want to format the destination partition with whatever options you like before attempting to copy anything. If both partitions are Ext2/3/4, I'd recommend using dump/restore as the best option to ensure everything is copied correctly. You can also try using rsync with the -aAHX options. I recommend against trying to just use cp. You should copy the data from single user mode with the source partition mounted read-only. Some bootloaders like what comes with Ubuntu call it recovery mode. The mount command will tell you if the filesystem is read-only with a ro flag on the line for the filesystem. If it's not, you can try using mount -o ro,remount / to remount as read-only. Assuming /dev/sda2 is your source filesystem mounted read-only on path / and /dev/sda1 is the destination partition, the way to use dump and restore would be as follows:

mkfs -t ext3 /dev/sda1
mount /dev/sda1 /mnt
cd /mnt
dump -0af - /dev/sda2 | restore -rf -

Once you are done, you can try switching to it with chroot and reinstalling GRUB.

mount -t bind /dev /mnt/dev
mount -t bind /proc /mnt/proc
mount -t bind /sys /mnt/sys
chroot /mnt /bin/sh
/usr/sbin/grub-install /dev/sda

Once GRUB is using the new partition, you can reboot, verify you are really using the new partition, and then remove the old root partition. Then just expand the new root partition and run resize2fs against it:

resize2fs /dev/sda1

Voilà! You should have a root partition using the full space now.

share|improve this answer

First of all, it is not a good idea to partition a drive on which your currently running system is located. Do not do that in the future, as it may lead to problems. I suppose you saw the warnings about backing up your data gparted is showing...

There are at least two reasons, why you couldn't mount the partition.

  1. Gparted has only set the partition type to ext3, but not actually created the filesystem.

  2. Even if the filesystem has been created, the disk state was not synced. This operation is done by system at boot up and shutdown, but can also be performed at other time using the sync command. Again, if you can not be sure doing this is safe in your case, do not use it - just reboot the system.

Once you have your partition set up, you will see it as other drives like external storage in file managers or at your desktop. Depending on the system configuration, you may or may not need root privileges to mount it. But of course, adding it to /etc/fstab is the best solution.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["                  <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2015.5.22.2603\r\n            </div>\r\n                <div id=\"additional-notices\">\r\n                    Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group. <br>This site is not affiliated with Linus Torvalds or The Open Group in an"], "copyright__copyright__copyright": ["ce you have your partition set up, you will see it as other drives like external storage in file managers or at your desktop. Depending on the system configuration, you may or may not need root privileges to mount it. But of course, adding it to /etc/fstab is the best solution.\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}