[SOLVED] can and how can i delete all my windows files?
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would boot up windows and do it but window will no longer open my system crashed and was only able to recover linux. i open up system info and 31 gig of memory are used up on windows. i try to delete them but the option doest pop up and the delete key will not work. how can i remove all the windows files without deleting any of my linux stuff? if its possible.
Hi,
Assuming you can see the windows partition, mount them in your Linux box and backup the important data, then you can use the partition tool to delete it permanently, reformat it & mount the freed space as separate data drive..
Hi,
Assuming you can see the windows partition, mount them in your Linux box and backup the important data, then you can use the partition tool to delete it permanently, reformat it & mount the freed space as separate data drive..
once again how do i do this? when it comes to it i know nothing about computers.
Could that be Opensuse-11.2? To find out, open a terminal/konsole from the menu and enter this: cat /etc/issue
That should tell you the distribution.
While you are in the terminal/konsole, log in as root by typing su -, then enter your root password and enter the following command to get partition information: fdisk -l (lower case Letter L in the command) and post that info here to get more help. With this information, someone should be able to give you specific commands to mount your windows partition(s) to access them. If you want to copy or delete anything on your windows partition, you will probably need to do it as root user.
Could that be Opensuse-11.2? To find out, open a terminal/konsole from the menu and enter this: cat /etc/issue
That should tell you the distribution.
While you are in the terminal/konsole, log in as root by typing su -, then enter your root password and enter the following command to get partition information: fdisk -l (lower case Letter L in the command) and post that info here to get more help. With this information, someone should be able to give you specific commands to mount your windows partition(s) to access them. If you want to copy or delete anything on your windows partition, you will probably need to do it as root user.
Device Boot Start End Blocks Id System
/dev/sda1 1 9843 79055865 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 9843 13379 28407783+ f W95 Ext'd (LBA)
Partition 2 does not end on cylinder boundary.
/dev/sda3 13379 14593 9753600 7 HPFS/NTFS
Partition 3 does not end on cylinder boundary.
/dev/sda5 9843 10104 2104452 82 Linux swap / Solaris
/dev/sda6 10105 11447 10787616 83 Linux
/dev/sda7 11448 13378 15510726 83 Linux
Before we get down to business, I should mention an important tip, which is very handy when posting to forums, and will help people to read your post much more easily... When posting bits of code or the output of a command, select all of the code/command and click the little icon in the form of a hash (#) above the text-entry panel --- this will automatically insert the appropriate BBCode tags and monospace the code so that it's much easier to read. (Trying to read something like fstab or the output of fdisk -l without it is quite difficult, since the columns aren't lined up --- to see the difference, compare the code sections in this post with the unformatted output in your last post.) It's a fairly simple trick, but it makes a world of difference. ...And remember to click "Preview Post" first to make sure it appears as you intended!
Anyway, I've snipped out the relevant bits of your ouput from fdisk.
It shows that your disk is split into three major divisions, the second of which is further subdivided into three minor divisions. You can see this below: /dev/sda1 and /dev/sda3 are so-called primary partitions and contain all your Windows files. This is deduced from the fact that two primary partitions are marked as containing NTFS filesystems (the format used by Windows). Windows and your system & application software are likely to reside on the first primary partition (/dev/sda1), since this is usual practice. As for the other NTFS filesystem (i.e. /dev/sda3), maybe your own personal data files are stored there --- I don't know for sure, but we'll try and find out! The other major division, /dev/sda2, is called an extended partition, and, as its name implies, is used to extend the number of available partitions (if more than four partitions are required).
Code:
Device Boot Start End Blocks Id System
/dev/sda1 1 9843 79055865 7 HPFS/NTFS
/dev/sda2 * 9843 13379 28407783+ f W95 Ext'd (LBA)
/dev/sda3 13379 14593 9753600 7 HPFS/NTFS
Below is the contents of your extended partition, /dev/sda2. As mentioned, it is subdivided into three chunks, labelled /dev/sda5, /dev/sda6 and /dev/sda7, each division being termed a logical partition. Your Linux distribution is spread out over these.
Code:
/dev/sda5 9843 10104 2104452 82 Linux swap
/dev/sda6 10105 11447 10787616 83 Linux
/dev/sda7 11448 13378 15510726 83 Linux
The thing we want to do is to mount the part of your Windows installation which contains the files you wish to rescue, before Windows is wiped out. To mount something in Linux simply means to connect it to your Linux system, so that you can access whatever is contained on it.
...So we need to make a mount point (simply a directory/folder) on your Linux system, and then tell Linux to mount the relevant filesystem at this mount point, so that when we enter that directory (or open that folder), we are actually going into the mounted filesystem (i.e. into the Windows filesystem in your case). The files can then be sucked across safely to Linux, before you destroy the Windows partition and reclaim the space --- either for Linux or to reinstall Windows.
We may not actually need to create a mount point: your Windows partition may indeed already have a mount point somewhere in your Linux system. We can find out whether this is so by examining the contents of your filesystem table --- this holds information on where everything is mounted in your system. You can check this by typing
Code:
cat /etc/fstab
(Remember to format the output as CODE, as described above, otherwise the columns will be all higgledy-piggledy.)
In fact, your Windows partition may already have been mounted automatically when you booted up Linux (this is often the default behaviour in Linux installations): you can see what is currently mounted simply by typing
Code:
mount
Anyway, go and give those two commands a whirl and get back to us. If you have any questions, please just ask! Most of us are fairly friendly here...
linux-82ts:/home/FAILsaurus # mount
/dev/sda6 on / type ext4 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
devtmpfs on /dev type devtmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,mode=1777)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sda7 on /home type ext4 (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sda1 on /windows/C type fuseblk (rw,noexec,nosuid,nodev,allow_other,blksize=4096,default_permissions)
securityfs on /sys/kernel/security type securityfs (rw)
gvfs-fuse-daemon on /home/FAILsaurus/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=FAILsaurus)
Your fstab output above shows that one of your windows partitions (sda1) has an entry and is mounted at /windows/C.
You should be able to navigate to /windows/C directory and view the files. To write to or delete them you may need to be root. Get permissions on these files and owner/group with this command: ls -l /windows/C
To view sda3, you need to create a mount point as indicated above. As root in a terminal type: mkdir /windows/D, then mount with this:
mount -t ntfs /dev/sda3 /windows/D.
You should then be able to navigate to /windows/D which is your sda3 partition. If you have problems or questions, post again.
As yancek said, your first Windows partition (/dev/sda1) is mounted by default under /windows/C: were you able to see the files on it using the list command (ls) as he suggested?
That is, issuing the command
Code:
ls /windows/C
should display a list of files. (If it doesn't, then either the filesystem is empty or there may be some underlying problem with it or with the physical disk itself.) The files on /windows/C are likely to be mostly system files --- the files associated with the Windows operating system itself --- rather than personal data (e.g. your documents, photos, music, etc.). This is why we are interested in checking the other partition, /dev/sda3.
No, it just means that the directory already exists --- it had already been created (probably during the installation process) and trying to create it again results in an error.
This means that you can now just go straight ahead with the mount command
Code:
mount -t ntfs /dev/sda3 /windows/D
This might look complicated but it simply tells Linux to mount your third partition as an NTFS (Windows) filesystem under the mount point /windows/D. That means that your Windows filesystem will be joined to your Linux system, and you will be able to access it.
If this works, then you can type
Code:
ls /windows/D
and see your Windows files. The ones you want to keep can be copied across to your Linux filespace (or a USB key or whatever) and you can then safely wipe the Windows partition clean.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.