# can win7 be made to see NTFS on USB ?



## bartog (Jan 20, 2010)

I have Ubuntu 12.04 64bit full installation running from a 'sandisk cruzer slice' USB 64GB. For Ubuntu I've partitioned 10GB (EXT4). The rest, I want to use with Windows so formatted NTFS. I did the partitioning from within Ubuntu. My computer - Thinkpad x200, 4GB RAM, Win 7pro 32bit - can, and does run 32 & 64 bit Operating Systems.

When i insert the USB while windows in running it asks if I want to format and doesn't recognise the partitioned NTFS space or the EXT4. In fact windows won't recognise the size or contents of the USB at all.

I wanted the USB split into 2 parts so Ubuntu can be run and, when using windows the ability to save files, which is what I mainly want to use the USB for.

Is this because I've mixed 32bit NTFS and 64bit EXT4, even though they're partitioned ?

If not, how can I make windows 7 recognise the NTFS partition on the USB ?

Again, thanks in advance. This is by far the best computer advice site.


----------



## lunarlander (Sep 22, 2007)

If you insert the USB and Windows 7 wants to format, then I would just let it do so. Just take care it doesnt format your EXT4 partition. I assume that they have different sizes, so you can recognize which is which inside Windows.


----------



## saikee (Jun 11, 2004)

All MS Windows systems treat a USB flash drive as a "giant" floppy and do not expect it has more than one partition. If it does the MS Windows only reads the first partition if it recognises it.

If you do not believe the above do a search!


----------



## bartog (Jan 20, 2010)

Yes, Windows only recognizes the first first partition which is where Ubuntu is. It does not see the NTFS partition. 
have downloaded 'EaseUS partition master 9.11' and it recognizes both so do i just 'set active' the NTFS part to make it visible in windows ?


----------



## TerryNet (Mar 23, 2005)

The way I understand *saikee*'s post is that you need to make the NTFS partition be the first one. You can move partitions (at least on hard drives; never tried on flash drives), but it can be a slow process and, as always, data is at a higher risk during a move.


----------



## saikee (Jun 11, 2004)

The active flag is just one byte in the 64-byte partition table. It doesn't help your case at all. Only MS Windows systems use it for booting purpose and the standard MS Windows has not been designed to boot from USB.

MS Windows does not support Linux so you need a driver in Windows to read a Linux partition. In your case the NTFS partition is not the first one so MS Windows will not touch it until you move it to the first partition location.

TerryNet's advice is one of the ways out but it will require you to move the contents of the USB device to a backup storage first, repartition the device to have the NTFS partition as the first partition, move back the data and install Linux in the second partition onward.


----------



## bartog (Jan 20, 2010)

I've re-partitioned the USB, NTFS is now first and windows does recognize it. Formatted and installed Ubuntu to the second partition but now when the computer is booted with the USB, it doesn't find Ubuntu and gives the message : NTLDR is missing
Press Ctrl+Alt+Del to restart

Tried F12 on boot but it's a no go.
have the full Ubuntu 12.04 installed but cannot boot it. How do I make my machine see Ubuntu now ?


----------



## saikee (Jun 11, 2004)

(1) Boot up the Ubuntu from a Live CD.

(2) Click Application, then Accessories then terminal

(3) Become the super user (or root which is equivalent to Admin in Windows) by command

```
sudo su
```
 because using system commands require root privileges.

(4) Confirm your USB drive being the device /dev/sdb. Device /dev/sda should be your internal hard disk. /dev/sdb according to your description should have sdb1 type 7 partition for NTFS filing system and your sdb2 should therefore a Linux partition type 83.

(5) If information in Step (4) is correct then restore Grub in the MBR of sdb with commands

```
mkdir /mnt/sdb2
mount /dev/sdb2 /mnt/sdb2
grub-install --root directory=/mnt/sdb2 /dev/sdb
umount /mnt/sdb2
reboot
```
The above is first create a mounting point /mnt/sdb2, then mount the device /dev/sdb2 on it, tell Grub this is the root partition and restore Grub in the mbr of /dev/sdb. No number after /dev/sdb means for the whole disk and that is the MBR.

Your USB drive should then boot. My guess is when you install Ubuntu you failed to specify the correct location for the boot loader.


----------



## bartog (Jan 20, 2010)

Thanks but I seem to have reached my limit. Got as far as No.3 and from there my brain will not compute. I can't write or understand code. And yes, I probably did choose the wrong place to install the grub loader on the original installation.
I remember a list of 5 or 6 locations being offered and being the dime bar I am, chose the 1st one which I suppose is where NTFS is now located.
If the Terminal screen was a windows like tree then I'd have a chance. It's too much like the old DOS and I was useless with that.


----------



## saikee (Jun 11, 2004)

bartog,

In terminal mode you talk directly to the PC.

In Step (4) you issue the following command

```
sudo fdisk -l
```
 and every partition of every hard disk will be displayed. If you don't know what it means post the output here.


----------



## bartog (Jan 20, 2010)

I have Ubuntu running live from an 8GB USB and the 64GB is plugged in so this is showing both the USB's and hard drive.

[email protected]:~$ sudo su
[email protected]:/home/ubuntu# sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x88da0d4d

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 312578047 156185600 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 8036 MB, 8036285952 bytes
255 heads, 63 sectors/track, 977 cylinders, total 15695871 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 44 15679439 7839698 b W95 FAT32

Disk /dev/sdc: 64.0 GB, 64016220160 bytes
255 heads, 63 sectors/track, 7782 cylinders, total 125031680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005e913

Device Boot Start End Blocks Id System
/dev/sdc1 * 63 102398309 51199123+ 7 HPFS/NTFS/exFAT
/dev/sdc2 102399998 125030399 11315201 5 Extended
/dev/sdc5 102400000 125030399 11315200 83 Linux
[email protected]:/home/ubuntu#


----------



## saikee (Jun 11, 2004)

Now your "fdisk -l" has shown up 3 disks of 160Gb sda, 8Gb sdb and 64Gb sdc.

Your have only one Linux partition which is sdc5 coloured red below

```
Device Boot Start End Blocks Id System
/dev/sdb1 * 44 15679439 7839698 b W95 FAT32

Disk /dev/sdc: 64.0 GB, 64016220160 bytes
255 heads, 63 sectors/track, 7782 cylinders, total 125031680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005e913

Device Boot Start End Blocks Id System
/dev/sdc1 * 63 102398309 51199123+ 7 HPFS/NTFS/exFAT
/dev/sdc2 102399998 125030399 11315201 5 Extended
[COLOR="Red"]/dev/sdc5[/COLOR] 102400000 125030399 11315200 [COLOR="Red"]83[/COLOR] Linux
```
Therefore if you want it boot up the commands with a Ubuntu Live CD should be

```
sudo su
mkdir /mnt/sdc5
mount /dev/sdc5 /mnt/sdc5
grub-install --root directory=/mnt/sdc5 /dev/sdc
umount /mnt/sdc5
reboot
```
The above will work if the current disk order was exactly how your Ubuntu was installed. This means the 8Gb and the 64Gb USB devices were at the exact ports. If you have changed them since then your Ubuntu may not boot.

The reason is if you did not insert the 8Gb USB device the 64Gb device will inherit the sdb status and would have been installed as the 2nd disk. It has now been detected as sdc means its position is the 3rd disk. There is a 50:50 chance the Ubuntu may boot as Grub2 uses the uuid identification and disregards the disk order.

If the Ubuntu fails to boot you can list the Grub2 configuration file here by

```
sudo ls /mnt/sdc5/boot/grub/grub.cfg
```
after you have mounted the partition sdc5.


----------



## bartog (Jan 20, 2010)

[email protected]:~$ sudo su
[email protected]:/home/ubuntu# mkdir /mnt/sdc5
mkdir: cannot create directory `/mnt/sdc5': File exists
[email protected]:/home/ubuntu# 

erm, I don't think I cleared the screen first. How do you clear the terminal screen ? Or have I done something else ?


----------



## saikee (Jun 11, 2004)

Just continue with the rest of the command.

The error was reported because you might have created /mnt/sdc5 before and the kernel refuses to re-create it again. That is all.

Remember you can use the direction key (arrow point up or down) to call back the previous commands for edit or repeat.


----------



## bartog (Jan 20, 2010)

It didn't work. Heres the result plus sudo fdisk l again

[email protected]:~$ sudo su
[email protected]:/home/ubuntu# sudo ls /mnt/sdc5/boot/grub/grub.cfg
ls: cannot access /mnt/sdc5/boot/grub/grub.cfg: No such file or directory
[email protected]:/home/ubuntu# sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x88da0d4d

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 312578047 156185600 7 HPFS/NTFS/exFAT

Disk /dev/sdb: 8036 MB, 8036285952 bytes
255 heads, 63 sectors/track, 977 cylinders, total 15695871 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 * 44 15679439 7839698 b W95 FAT32

Disk /dev/sdc: 64.0 GB, 64016220160 bytes
255 heads, 63 sectors/track, 7782 cylinders, total 125031680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005e913

Device Boot Start End Blocks Id System
/dev/sdc1 * 63 102398309 51199123+ 7 HPFS/NTFS/exFAT
/dev/sdc2 102399998 125030399 11315201 5 Extended
/dev/sdc5 102400000 125030399 11315200 83 Linux
[email protected]:/home/ubuntu#


----------



## saikee (Jun 11, 2004)

Why don't you list out the following after mounting the device /dev/sdc5 on mounting point /mnt/sdc5

```
ls /mnt/sdc5
```
This should show up your Linux filing system with /boot, /home, /root etc. You then ls the directory of /boot by

```
ls /mnt/sdc5/boot
```
If you have installed Ubuntu the Grub2 will be inside a folder called grub. You see its contents by

```
ls /mnt/sdc5/boot/grub
```
All the grub system files should then be listed.

Show us what you have got in the above.


----------



## TerryNet (Mar 23, 2005)

*saikee*, is it not true that the "active" flag, which is called the "boot' flag in the Linux world and is represented by an asterisk (*) in the fdisk -l output, should be on sdc5 instead of sdc1?


----------



## bartog (Jan 20, 2010)

[email protected]:~$ sudo su
[email protected]:/home/ubuntu# ls /mnt/sdc5
[email protected]:/home/ubuntu# ls /mnt/sdc5/boot
ls: cannot access /mnt/sdc5/boot: No such file or directory
[email protected]:/home/ubuntu# ls /mnt/sdc5/boot/grub
ls: cannot access /mnt/sdc5/boot/grub: No such file or directory
[email protected]:/home/ubuntu#


----------



## TerryNet (Mar 23, 2005)

I can't check this right now, so sorry if I'm just being stupid.

I think you should use

ls /sdc5/boot

(Don't use the /mnt.)


----------



## bartog (Jan 20, 2010)

I'm quite lost with all this as is probably obvious. 


[email protected]:~$ sudo su [email protected]:/home/ubuntu# ls /sdc5/boot ls: cannot access /sdc5/boot: No such file or directory [email protected]:/home/ubuntu#


----------



## TerryNet (Mar 23, 2005)

> I'm quite lost with all this as is probably obvious.


And I sure ain't helping. Sorry. 

One "trick" I use to stumble around in the file system is to start real simply with ls. So, I might start with

*ls /mnt*

or

*ls /sdc5*

That will let me know if the directory (or folder if you prefer that term) actually exists. And, if it does, what sub-directories it contains, which tells me whether it makes sense to then try ls /mnt/sdc5 or ls /sdc5/boot and so on.


----------



## saikee (Jun 11, 2004)

*bartog*,

Post #16 indicates


> Why don't you list out the following after mounting the device /dev/sdc5 on mounting point /mnt/sdc5


One of the wonders of Linux is everything is a file including hardware like a mouse or a hard disk partition. The biggest joy is to learn how to communicate with a hardware manually.

The /dev/sdc5 is a partition as seen in "fdisk -l". To communicate with it you must mount it on the Linux filing tree in which the standard branch for mounting it is /mnt. Therefore you can only look inside the partition after mounting the hardware device (that is /dev/sdc5) on an arbitary mounting point which I suggest to be /mnt/sdc5. The mounting point is created by command "mkdir" but you can use any name like

```
mkdir /mnt/dude_said_mount_here
mount /dev/sdc5 /mnt/dude_said_mount_here
```
Thereafter you can read from the mounting point by "ls /mnt/dude_said_mount_here", "ls /mnt/dude_said_mount_here/boot/grub", etc

When you finish working with the partition you should always umount the device which can be either

```
umount /dev/sdc5
```
or

```
umount /mnt/dude_said_mount_here
```
Some distros automatically mount every partition for you but it is joy to do it manually! Otherwise why bother with Linux if not to enjoy its power?

*TerryNet*,

Yes the * in the fdisl -l output signifies the partition active (in MS Windows convention). In Linux it is called bootable. It is just the first byte of the 16-byte primary partition table.

The bootable flag or active flag is *used only by the MS Windows*. Linux never uses it.

In Linux convention the first 4 partitions, say sda1 to sda4, are reserved primary partitions regardless if they are used or not. The logical partition always starts at the 5th position. In Linux an logical partition can be made active but no operating system uses it.

In every partitioning software, be it from M$ or Linux, when a primary partition is set to be active or bootable the existing active primary partition will be automatically switched off so as only one primary partition can be active at any one time.

MS boot loader works like a blind person search each of the 4 primary partitions and boot whichever one that has the active flag switched on, even it is not a MS Windows! I have demonstrated this with this thread..

One of the power features of Grub is that it can switch the bootable flag on or off during booting.


----------



## bartog (Jan 20, 2010)

Well, I typed in stuff suggested and was given;

[email protected]:~$ sudo su
[email protected]:/home/ubuntu# ls /mnt
migrationassistant sdc5
[email protected]:/home/ubuntu# ls /sdc5
ls: cannot access /sdc5: No such file or directory
[email protected]:/home/ubuntu# ls /mnt/sdc5
[email protected]:/home/ubuntu# ls /sdc5/boot
ls: cannot access /sdc5/boot: No such file or directory
[email protected]:/home/ubuntu#


----------



## saikee (Jun 11, 2004)

*bartog,*

You have been spoiled by MS Windows and still do not understand what mounting a partition means.

try the following step one line at a time

```
sudo su
mkdir /mnt/bartog
mount /dev/sdc5 /mnt/bartog
ls /mnt/bartog
ls /mnt/bartog/boot/grub
```
show us your output


----------



## bartog (Jan 20, 2010)

hmm why all the bartogs ?

[email protected]:~$ sudo su
[email protected]:/home/ubuntu# mkdir /mnt/bartog
[email protected]:/home/ubuntu# mount /dev/sdc5 /mnt/bartog
[email protected]:/home/ubuntu# ls /mnt/bartog
bin etc lib64 opt sbin tmp << tmp is in a green box
boot home lost+found proc selinux usr
cdrom initrd.img media root srv var
dev lib mnt run sys vmlinuz
[email protected]:/home/ubuntu# ls mnt/bartog/boot/grub
ls: cannot access mnt/bartog/boot/grub: No such file or directory
[email protected]:/home/ubuntu#


----------



## saikee (Jun 11, 2004)

Your command

```
ls mnt/bartog/boot/grub
```
should have been

```
ls [COLOR="Red"]/[/COLOR]mnt/bartog/boot/grub
```
because you were in subdirectory of [email protected]:/home/ubuntu. Without the "/" the kernel assumed it is inside your subdirectory and not outside.

Basically you have two sets of Linux filing trees. One is from the booted up Ubuntu CD which can be seen if you issue the command

```
ls /
```
The other set of filing tree is in your partition sdc5. It is hung on the /mnt branch of the first tree and can be found by

```
ls /mnt/bartog
```


----------



## bartog (Jan 20, 2010)

further down the rabbit hole i go.....

[email protected]:~$ sudo su
[email protected]:/home/ubuntu# mkdir /mnt/bartog
mkdir: cannot create directory `/mnt/bartog': File exists
[email protected]:/home/ubuntu# mount /dev/sdc5 /mnt/bartog
[email protected]:/home/ubuntu# ls /mnt/bartog
bin etc lib64 opt sbin tmp
boot home lost+found proc selinux usr
cdrom initrd.img media root srv var
dev lib mnt run sys vmlinuz
[email protected]:/home/ubuntu# ls /mnt/bartog/boot/grub
915resolution.mod
acpi.mod
adler32.mod
affs.mod
afs_be.mod
afs.mod
aout.mod
ata.mod
ata_pthru.mod
at_keyboard.mod
befs_be.mod
befs.mod
biosdisk.mod
bitmap.mod
bitmap_scale.mod
blocklist.mod
boot.img
boot.mod
bsd.mod
btrfs.mod
bufio.mod
cat.mod
cdboot.img
chain.mod
cmostest.mod
cmp.mod
command.lst
configfile.mod
core.img
cpio.mod
cpuid.mod
crypto.lst
crypto.mod
cs5536.mod
datehook.mod
date.mod
datetime.mod
diskboot.img
dm_nv.mod
drivemap.mod
echo.mod
efiemu32.o
efiemu64.o
efiemu.mod
elf.mod
example_functional_test.mod
ext2.mod
extcmd.mod
fat.mod
font.mod
fshelp.mod
fs.lst
functional_test.mod
g2hdr.img
gcry_arcfour.mod
gcry_blowfish.mod
gcry_camellia.mod
gcry_cast5.mod
gcry_crc.mod
gcry_des.mod
gcry_md4.mod
gcry_md5.mod
gcry_rfc2268.mod
gcry_rijndael.mod
gcry_rmd160.mod
gcry_seed.mod
gcry_serpent.mod
gcry_sha1.mod
gcry_sha256.mod
gcry_sha512.mod
gcry_tiger.mod
gcry_twofish.mod
gcry_whirlpool.mod
gettext.mod
gfxblacklist.txt
gfxmenu.mod
gfxterm.mod
gptsync.mod
grldr.img
grub.cfg
grubenv
gzio.mod
halt.mod
hashsum.mod
hdparm.mod
hello.mod
help.mod
hexdump.mod
hfs.mod
hfsplus.mod
hwmatch.mod
iorw.mod
iso9660.mod
jfs.mod
jpeg.mod
kernel.img
keylayouts.mod
keystatus.mod
legacycfg.mod
linux16.mod
linux.mod
lnxboot.img
loadenv.mod
locale
loopback.mod
lsacpi.mod
lsapm.mod
lsmmap.mod
ls.mod
lspci.mod
lvm.mod
lzopio.mod
mdraid09.mod
mdraid1x.mod
memdisk.mod
memrw.mod
minicmd.mod
minix2.mod
minix.mod
mmap.mod
moddep.lst
msdospart.mod
multiboot2.mod
multiboot.mod
nilfs2.mod
normal.mod
ntfscomp.mod
ntfs.mod
ntldr.mod
ohci.mod
part_acorn.mod
part_amiga.mod
part_apple.mod
part_bsd.mod
part_gpt.mod
partmap.lst
part_msdos.mod
part_sun.mod
part_sunpc.mod
parttool.lst
parttool.mod
password.mod
password_pbkdf2.mod
pbkdf2.mod
pci.mod
play.mod
png.mod
probe.mod
pxeboot.img
pxecmd.mod
pxe.mod
raid5rec.mod
raid6rec.mod
raid.mod
read.mod
reboot.mod
regexp.mod
reiserfs.mod
relocator.mod
scsi.mod
search_fs_file.mod
search_fs_uuid.mod
search_label.mod
search.mod
sendkey.mod
serial.mod
setjmp.mod
setpci.mod
setup_left_core_image_in_filesystem
sfs.mod
sleep.mod
squash4.mod
tar.mod
terminal.lst
terminal.mod
terminfo.mod
test_blockarg.mod
testload.mod
test.mod
tga.mod
trig.mod
true.mod
udf.mod
ufs1.mod
ufs2.mod
uhci.mod
usb_keyboard.mod
usb.mod
usbms.mod
usbserial_common.mod
usbserial_ftdi.mod
usbserial_pl2303.mod
usbtest.mod
vbe.mod
vga.mod
vga_text.mod
video_bochs.mod
video_cirrus.mod
video_fb.mod
videoinfo.mod
video.lst
video.mod
videotest.mod
xfs.mod
xnu.mod
xnu_uuid.mod
xzio.mod
zfsinfo.mod
zfs.mod
[email protected]:/home/ubuntu#


----------



## saikee (Jun 11, 2004)

So you do have Grub's configuration file grub.cfg!

If you follow the instructions in Post #5 but replacing sdc5 with sdb2 and sdc with sdb then that your Ubunu should boot.

If it does not you have to post here the output of 

```
cat /dev/bartog/boot/grub/grub.cfg
```


----------



## bartog (Jan 20, 2010)

the first time I forgot to have the 64GB USB plugged in so on reboot nothing happened.
so I re-did it with USB in and, well, nothing so I guess I screwed the pooch - heres the output;


[email protected]:~$ sudo su
[email protected]:/home/ubuntu# cat /dev/bartog/boot/grub/grub.cfg
cat: /dev/bartog/boot/grub/grub.cfg: No such file or directory
[email protected]:/home/ubuntu#


----------



## saikee (Jun 11, 2004)

Got a feeling Linux isn't for you. If a user thinks Linux can almost be reasoned out without reading the manual.

You have so many times hit back by the kernel complaining "No such file or directory". Every time was due to you not mounting the partition in concerned.

If you look at your Post #27 you can find grub.cfg there. So if you think that you do have this file but kernel refuses to show it then there must be a reason, right? 

Ubuntu actually could have mounted the partition for you if you look through the Ubuntu desktop. It is usually under the /media using a different name. However repairing a boot loader is a job for the terminal only so you should learn and enjoy mounting and dismounting a partition in Linux experience the absolute control.

If you use a Linux you should know its powerful bits and its terminal mode is one of the mightiest available.

If you use another operating system the minimum you need to do is to familiarize with some of the basic commands in order to survive.


----------

