Old file transfer

Hi,
I recently installed Ubuntu onto a new secondary hard-drive as my windows system had died. Now I want to transfer my files from my old hard-drive so I can format it and install XP or win 7 as a dual boot.
The problem is I can’t tell which files are on which hard-drive so I don’t know what I need to transfer, what I need to leave (as it’s an ubuntu file) and what is windows rubbish that can go…
Is there an easy way to show the hard-drives separately or am I completely missing the point?

Any help would be appreciated.
Cheers
Elle

As long as you didn’t install Ubuntu using the WUBI installer (ie. INSIDE Windows)

Go to Places>Computer and you should see the seperate drives/partitions.
(just look for the one with a Windows directory on it :wink: )

The drives should be listed separately in the left hand panel of nautilus (if there isn’t a left hand panel, hit F9).

You could format the Windows drive as NTFS from within Gparted, but you would need to install it first:

sudo apt-get install gparted

then you’ll find it in the menu’s at System>Administration>Gparted Partition Editor (it’s a lot like “Partition Magic” on Windows), but make SURE you select the correct drive to format.

You can tell which drives contain which file systems by running:

sudo fdisk -l

BUT, your main problem is going to be that if you install Windows AFTER Linux, Windows is going to overwrite the Linux bootloader (GRUB), leaving you unable to boot Linux.

Ways round this are -

a) Install Windows, THEN install Linux

b) Install windows then reinstall the Ubuntu GRUB bootloader from a LiveCD… instructions here:
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

c) Remove the Linux hard drive, leaving ONLY the hard drive that you want to install Windows onto… Install Windows as normal… reattach the Linux hard drive, and then use the BIOS to decide which drive to boot from (ie. have a bootloader on EACH separate hard drive)

If you DID use WUBI to install Ubuntu, or are unsure, send us the output from:

sudo fdisk -l

It doesn’t seem to be there I only have ‘File system’ that has all my docs in, old and new…

When I run fdisk -1 I get:
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000db24b

Device Boot Start End Blocks Id System
/dev/sda1 * 1 60037 482241536 83 Linux
/dev/sda2 60037 60802 6141953 5 Extended
/dev/sda5 60037 60802 6141952 82 Linux swap / Solaris

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x41ab2316

Device Boot Start End Blocks Id System
/dev/sdb1 1 7 56196 de Dell Utility
/dev/sdb2 * 8 38502 309211087+ 7 HPFS/NTFS
/dev/sdb4 38503 38913 3301357+ db CP/M / CTOS / …
eleanor@eleanor-Dell-DM061:~$ ^C
eleanor@eleanor-Dell-DM061:~$

so they are both there I just can’t see them separately…

I will probably just take the new hard drive out when I install windows and just use bios, but that’s for another day.

OK, try this

sudo mkdir /mnt/windows
sudo mount -t ntfs /dev/sdb2 /mnt/windows
sudo nautilus /mnt/windows

when you are done copying, run

sudo umount /mnt/windows

to unmount the windows partition, or reboot.

Ok I get this (ignore that I did it twice at the beginning)…

eleanor@eleanor-Dell-DM061:~$ sudo mkdir /mnt/windows
[sudo] password for eleanor:
eleanor@eleanor-Dell-DM061:~$ sudo mkdir /mnt/windows
mkdir: cannot create directory `/mnt/windows’: File exists
eleanor@eleanor-Dell-DM061:~$ sudo mount -t ntfs /dev/sdb2 /mnt/windows
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the ‘fuser’ command.
eleanor@eleanor-Dell-DM061:~$ sudo nautilus /mnt/windows
Initializing nautilus-gdu extension

** (nautilus:5164): WARNING **: Failed to get the current CK session: GDBus.Error:org.freedesktop.ConsoleKit.Manager.GeneralError: Unable to lookup session information for process ‘5164’

(nautilus:5164): GConf-CRITICAL **: gconf_value_free: assertion `value != NULL’ failed

(nautilus:5164): GLib-GIO-WARNING **: Missing callback called fullpath = /root/.config/user-dirs.dirs

(nautilus:5164): GConf-CRITICAL **: gconf_value_free: assertion `value != NULL’ failed
Nautilus-Share-Message: Called “net usershare info” but it failed: ‘net usershare’ returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.

(nautilus:5164): GConf-CRITICAL **: gconf_value_free: assertion `value != NULL’ failed

(nautilus:5164): GConf-CRITICAL **: gconf_value_free: assertion `value != NULL’ failed

(nautilus:5164): GConf-CRITICAL **: gconf_value_free: assertion `value != NULL’ failed

(nautilus:5164): GConf-CRITICAL **: gconf_value_free: assertion `value != NULL’ failed

(nautilus:5164): GConf-CRITICAL **: gconf_value_free: assertion `value != NULL’ failed

There’s now a folder open called windows but it’s empty…

Thanks for your help Mark

OK it’s already mounted, can you send the output from:

mount

sorry for the delay, other things became more urgent

here’s mount…

eleanor@eleanor-Dell-DM061:~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
/dev/sdb2 on /windows type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/eleanor/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=eleanor)

your Windows partition is mounted as /windows
so to access it (read/write)

sudo nautilus /windows

ignore any errors in the terminal, theses are only because you haven’t got samba installed/set up

That does the trick.
What is samba? would it be useful for the future?

Thanks for your help.
Elle

Samba is the standard Linux/UNIX <—> Windows interoperability suite of programs… for networking Linux/UNIX <—> Windows.